Discussion Board for collaboration on QlikView Scripting.
I am trying to reduce loads by using INNER KEEP (<table>).
(Inner joins which reduce number of rows loaded for subsequent tables).
Tried all kind of syntax combinations, but its not working.
Please note that I am loading from SQL, not qvd.
Go to Solution.
This works, but its slow. (the INNER KEEP is not needed)
LOAD Account AS PatientAccountID, PatientClass, ADDate, Discharged, LOS, Provider, PrimaryDX, PrimaryProcedure, ECD, NerveBlock, FPxDate FROM$(vPathName)xxxxyyyyy.xls(biff, embedded labels, table is KWMatch$);Table2:INNER KEEP (Table1)LOAD [PatientAccountID] ,[ObjectID] AS PatientVisitOID ,[VisitDSC] ,[StartDTS] ,[StartDTS] AS VisitDate ,[EndDTS] ,[VisitTypeCD] ,[CategoryDSC] ,[FinancialClassCD] ,[UnitContactedNM] ,[DischargeDispositionDSC] ,[AccommodationTypeCD] ,[DischargeToDSC] ,[AdmitReasonCD] ,[PreVisitDTS] ,[AdmitSourceDSC] ,[EDWLastModifiedDTS]WHERE Exists(PatientAccountID); SQL SELECT *FROM SQL.DBO.zzzzzzwhere [IsDeletedFLG] = 0 and DatePart(Year, [StartDTS]) = 2014order by ObjectID DESC;
Select A.* from TableA as A
inner join TableB as B on A.fld1 = B.fld1
let me know
Will check it out.
I thought the “ON” is only a SQL syntax, not a QlikView scripting.
Yes it is, I thought you need help on SQL (as you said)
You can use in the script the code I sent to you.
I am loading a list of items from Excel, then I want to load from a SQL table (20 million rows), only the rows that include these items.
So I thought of having a Qlikview “INNER KEEP” in the script, to reduce the rows loaded.
So you have to
1) load the Excel list
2) LEFT Join the table from sql
in this way only records matchink the Excel list will be taken (no way to reduce data before loading the sql)
Yes, that’s what I am realizing.
However, it can be done with EXISTS
Try this one.
Select * from Table1;
Select * from Table2;
If its not working, please post the error which you are getting.
Yes but the Whole set of data must be read from sql ... where exists ...
I think you should look into using EXISTS function in your WHERE clause