Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello community,
I am loading a sql table with the columns order_ID, customer and a order_date via editor.
What I want to do is to create a new column to identify first orders.
So, if the customer name never appeared before that order gets a 1,
if the customer name appears before it gets a 0.
I don't know how to solve it, it should actually be fairly easy.
can anyone help me with that?
If you sort the table by order_date. and then use something like: "if(exists(customer),0,1)" to create that field you want.
If you sort the table by order_date. and then use something like: "if(exists(customer),0,1)" to create that field you want.
The table I have is actually sorted by date. When I try this formular, every line gets a 0.
Do I need to specify the order, does that make a diference?
I mean, even if its not sorted, it should mark some orders,
since there are definetly customers who ordered only one time.
I found the mistake. I used Trim(Lower(Customer)) to clean the entries.
That's why it couldn't be matched.
Without that your solution works perfetly.
Thanks for the support.