Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sql syntax error

Hi QlikView Friends,

Please help me with this strange issue.

i'm running this syntax in qlikview on oracle database, but gives me error.

SQL SELECT * FROM MSEG WHERE MBLNR IN (SELECT MBLNR FROM MKPF WHERE CPUDT >$(LASTRELOADTIME));


Thanks

vishwaranjan

14 Replies
er_mohit
Master II
Master II

Hi Try this way

Istly make Date variable in number format.

Let vToday = num(Date#('01-01-2008', 'DD-MM-YYYY'));

SQL SELECT * FROM MSEG WHERE MBLNR IN

(SELECT MBLNR FROM MKPF WHERE CPUDT >= $(vToday ) );

Not applicable
Author

hi mohit

thanks for response,

but my CPUDT field in 'DD.MM.YYYY' format in oracle database

dinuwanbr
Creator III
Creator III

Hi,

Use this then and try

Let vToday = num(Date#('01-01-2008', 'DD.MM.YYYY'));

SQL SELECT * FROM MSEG WHERE MBLNR IN

(SELECT MBLNR FROM MKPF WHERE CPUDT >= $(vToday ) );

BR,

dinu1

er_mohit
Master II
Master II

ok so make variable with this

Let vToday = num(Date#('01-01-2008', 'DD.MM.YYYY'));

Not applicable
Author

hi friends

thanks for all,

i got solution, the problem is that our CPUDT date field  by default in 'YYYYMMDD'  that is  in system format. so i  have use this syntax.

let LASTRELOADTIME = date(date#('20140915','YYYYMMDD'),'YYYYMMDD');

SQL SELECT * FROM MSEG WHERE MBLNR IN (SELECT MBLNR FROM MKPF WHERE CPUDT >'$(LASTRELOADTIME)');


Thanks & Regards

vishwaranjan kumar