Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can some one help with the following script conversion.. from sq lPLEASE.
// CASE WHEN (CASE WHEN "ACCOUNTTRANSACTIONSET"."ATA_PAID_IND" IS NULL THEN 'No Result'
// WHEN "ACCOUNTTRANSACTIONSET"."ATA_PAID_IND" = 'N' THEN 'N'
// WHEN "ACCOUNTTRANSACTIONSET"."ATA_PAID_IND" = 'Y' THEN 'Y'
// END) = 'No Result' AND MaxAccTransKey."MAXACCOUNTTRANSACTIONSET_KEY"= "ACCOUNTTRANSACTIONSET"."ACCOUNTTRANSACTIONSET_KEY" THEN 1
// WHEN (CASE WHEN "ACCOUNTTRANSACTIONSET"."ATA_PAID_IND" IS NULL THEN 'No Result'
// WHEN "ACCOUNTTRANSACTIONSET"."ATA_PAID_IND" = 'N' THEN 'N'
// WHEN "ACCOUNTTRANSACTIONSET"."ATA_PAID_IND" = 'Y' THEN 'Y'
// END) = 'N' AND MaxAccTransKey."MAXACCOUNTTRANSACTIONSET_KEY" = "ACCOUNTTRANSACTIONSET"."ACCOUNTTRANSACTIONSET_KEY" THEN 1
// WHEN (CASE WHEN "ACCOUNTTRANSACTIONSET"."ATA_PAID_IND" IS NULL THEN 'No Result'
// WHEN "ACCOUNTTRANSACTIONSET"."ATA_PAID_IND" = 'N' THEN 'N'
// WHEN "ACCOUNTTRANSACTIONSET"."ATA_PAID_IND" = 'Y' THEN 'Y'
// END) = 'Y' AND MaxAccTransKey."MAXACCOUNTTRANSACTIONSET_KEY" = "ACCOUNTTRANSACTIONSET"."ACCOUNTTRANSACTIONSET_KEY" THEN 1
// ELSE 0
// END AS "Summary"
Well, it's possible to rewrite this. But if it's a working sql statement why not simply use it as it is:
Table1:
select aaa, bbb, ccc from xxx where zzzz;
Qlikview simply passes the sql statement to the database and the database executes the statement and gives qlikview back the results.
hi Gysbert,
the thing is am trying to move away from using the sql because i am trying to use qvds which i have generated and so i am trying to do the selections within the load statements of qlikview unlike doing it from the database. am assuming it will improve performance. any comments or suggestions.
the qvds have being create by simple QVD generators loading entire tables
I think this would do the same thing as your sql case statement.
if([MaxAccTransKey.MAXACCOUNTTRANSACTIONSET_KEY]= [ACCOUNTTRANSACTIONSET.ACCOUNTTRANSACTIONSET_KEY],
if(len(trim([ACCOUNTTRANSACTIONSET.ATA_PAID_IND]))=0
or [ACCOUNTTRANSACTIONSET.ATA_PAID_IND] = 'N'
or [ACCOUNTTRANSACTIONSET.ATA_PAID_IND] = 'Y',
1,0),
0) as Summary
Anyways, won't you still need to get 'fresh' data from the database? If you let the database do the stuff it's supposed to be good at, executing sql statements, then you can store the results in qvd's already processed the way you want it. You then won't have to process the data in qlikview anymore, so you win performance there.
Hi,
I was thinking in those as well though i have a bit of a fix u store one table per QVD so how can i process the data in the database from defferent tables and then load in a QVD?? thanks for all the help