Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adjust a table that is loaded from Oracle

Dear all,

I'm using a ODBC connection to load in a table from Oracle with a code that looks like this:

ODBC CONNECT32 TO [DWH_P3.world;DBQ=DWH_P3] (XUserId is BQYVFIBHWBMOTcAHbCTCEBdLTKREFLFJDKRGVOVD, XPassword is dUbMAYVMQbcSWYIGTBSB);
SQL SELECT *
FROM "LAB_SERVICES"."FBI_LKR_OFF_UITVAL";

This all works fine but what I would like to do now is add some columns based on the records that are older then today. So with inline data the case would be like:

vDate = today()

LOAD * INLINE [
Item, Date
1, 02-08-2016
2, 03-08-2016
3, 04-08-2016
If(Date < vDate, "Older", "Not older") as [Classification]

];

Any thoughts on how I can do this when loading a sql statement from Oracle?

1 Solution

Accepted Solutions
t_moutault
Contributor III
Contributor III

You can specify the columns you need in the ;load statement (or sql statement) so that you do like inline load

Load

column1,

column2,...

If(Date < vDate, "Older", "Not older") as [Classification];

SQL SELECT *
FROM "LAB_SERVICES"."FBI_LKR_OFF_UITVAL"

View solution in original post

2 Replies
t_moutault
Contributor III
Contributor III

You can specify the columns you need in the ;load statement (or sql statement) so that you do like inline load

Load

column1,

column2,...

If(Date < vDate, "Older", "Not older") as [Classification];

SQL SELECT *
FROM "LAB_SERVICES"."FBI_LKR_OFF_UITVAL"

sunny_talwar

You can do all the manipulations you want in the preceding load:

Preceding Load