Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Please help i have below Sql query that I need to plug in Qlikview but the problem is it reload but it doesn't pull any data or table in Qlikview.
Maybe I am missing a syntax in Qlikview .
SELECT distinct a.*, B.TRNS_VOL
FROM DBA.FACT_PRICE A,
(
SELECT distinct PR,
CASE WHEN TRNS_CODE in (55,525,85,35,525,516,528,529) AND BULK_IND = 0 THEN 'CD'
WHEN TRNS_CODE in (554,555,853,853,515,516,528,529) AND BULK_IND = 1 THEN 'CDB'
WHEN TRNS_CODE in (151,102,155,156) AND BULK_IND = 0 THEN 'CQASFL'
WHEN TRNS_CODE in (400,692,934,696,698,40,62,69,69) AND BULK_IND = 0 THEN 'CI'
WHEN TRNS_CODE in (7241,7242,7767,7768,7093,7094,7111,7112,7121,7122) AND BULK_IND = 0 THEN 'CSRN'
WHEN TRNS_CODE in (7241,7242,7767,7768,7093,7094,7111,7112,7121,7122) AND BULK_IND = 1 THEN 'CSLK'
WHEN TRNS_CODE in (7000,7708,7001,7709,8158,8159) AND BULK_IND = 0 THEN 'CQDPADT'
WHEN TRNS_CODE in (7002,7003,7279,7280,7095,7096,7113,7114,7123,7124,7127,7128) AND BULK_IND = 0 THEN 'CQFC'
ELSE 'N/A'
END AS 'CHARGE_CODE',
convert(int,sum(TRNS_VOL)) as 'TRNS_VOL'
FROM DBA.PFACT_TRANS
GROUP BY PRF,CHARGE_CODE
)B
WHERE a.PROD_NAME = 'DDA'
AND a.UCN = b.PRFL_ID
AND a.CHARGE_CODE = b.CHARGE_CODE
(2) I have attached how my script start and looks like in Qlikview
First check Whether the same Query fetching any records or not by firing the same to Database.
Thanks for quick respond from SQL server it pulls the data.
I don't know what I am doing wrong or maybe do I need to do some setting from ODCE/OLE DB before running sql Script in QV?
Starting the Query in QV by the word SQL will make different?
Thanks
Thanks dhasharadh I got it right.