Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table that looks like this
LOAD * INLINE [ ordernum, 1, -, -,
2, 3, -, 4, ];
It has distinct order numbers, I would like to make a column next to it that has 1 (if order number) and 0 (if not order number, in this case, if its a `-`)
How can I do this?
LOAD *
,if(ordernum='-',0,1) as ordernum_flag
;
Load * INLINE [ ordernum, 1, -, -,
2, 3, -, 4, ];
LOAD *
,if(ordernum='-',0,1) as ordernum_flag
;
Load * INLINE [ ordernum, 1, -, -,
2, 3, -, 4, ];