Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have
Load;
Text('ID') as ID,
Timestamp(`date`,'MM/DD/YYYY') as "Order date"
From _________________;
Output:
ID Order date
500001238 11/01/2018
0500001238 11/02/2018
000008734 11/01/2018
100007738 11/01/2018
0100007738 11/02/2018
0100007738_dd 11/02/2018
How do I replace 500001238 with 0500001238, 100007738 with 0100007738 keep the same order dates and not affect the two other rows?
Hi! I dunno if you have some id's that start with 0, anyway this is a way to introduce a 0 at the begening of a value
TableName:
Load
Text('0'&ID), //It needs to be TEXT datatype
ORDER_DATE
Resident Table;
I dunno if this is what you are looking for,
GL!
Just use the Text() function when you first load this field from the source (ie not in a resident load -- the leading zero may have already been discarded at this point):
LOAD ...
Text(ID) as ID,
...
FROM ...
The field will now be a text field where 0500 <> 500.