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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Checking condition

how to use below SQL code in qlikview  i need to check column from tbl1 & if exist then need to

run select * from tbl222; statement...i tried below code

PQR:

IF EXISTS

(

select distinct clumn1 from tbl1

where tbl1.clumn1 ='ABC'

)

select * from tbl222;

2 Replies
Anonymous
Not applicable
Author

Rahul

How about something like this :

PQR:

load sql

select distinct clumn1 from tbl1

where tbl1.clumn1 ='ABC'

;

let vNoOfRows =  NoOfRows('SalaryBin') ;

Trace $(vNoOfRows) Rows in table PQR ;

if vNoOfRows > 0 then

  let vTraceMess = today() ;

  Trace Getting data from tbl222 ;

  // and here insert code to get the data from tbl222

  else

  Trace  NOT Getting data from tbl222 ;

endif

Best Regards,     Bill

Not applicable
Author

Thanks Bill.....!!