Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
tejes
Contributor III
Contributor III

Insert value based on condition

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.

c5ProductsStickyDigi
AAA1A2A3
BBB1B2B3
CCC1C2C3

 

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.

Labels (2)
0 Replies