Hi All,
I would like to add a new field name in an existing table and load the data using if condition in the SQL statement.
Example
LOAD
[c1],
[c2],
[c3],[c4],[c5],
SQL SELECT `c1`,
`c2`,
`c3`,
`c4`,
`c5`,
Here c5 is the new column which I am trying to create in the load script and then I want to use some kind of condition in the SQL statement to insert the value into c5 which is newly created.
c5 | Products | Sticky | Digi |
AA | A1 | A2 | A3 |
BB | B1 | B2 | B3 |
CC | C1 | C2 | C3 |
so here the condition would be if Products=A1 & Sticky=A2 & Digi=A3 then we need to insert 'AA' into a newly created column which is c5 and similar logic to all the others. Also, I would like to use OR condition between AA , BB and CC so on .
Thank you.