Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Below is the code that I used to load PO with trackCode BOOKCONF or BOOKED.
I want to look for BOOKED first, if not found use BOOKCONF.
How should I code. Appreciate your help.
Load
Date(trackDate) as StatusDate, fileNumber , trackCode, loggedBy as POConfirmBy
FROM [TrackTrace.qvd] (qvd)
where trackDate >= '01-01-2015' and MATCH(trackCode,'BOOKCONF','BOOKED') ;
Straight Table result. I only want BOOKED if both BOOKED & BOOKCONF are found for OMSPO# 00065849 .
Hi Sergey,
I tried your code, but the system hung at table T1. Pls see the attach script.
Appreciate your help again. Thank you.
Regards,
Andros Goh
Hello!
See attach. Could you add a logfile next time?
Hi Sergey,
I tried but still can’t get the desired result. Pls see my result in EXCEL and the script.
I should have BOOKED & BOOKCONF lines appear in the result.
The logic is that if BOOKED & BOOKCONF are found, get the date from BOOKED and ignore BOOKCONF.
But if only BOOKCONF is found, then get the date from BOOKCONF.
Sorry, I couldn’t find the location of the Log file in QlikTech folder.
Thank you.
Regards,
Andros Goh
Hello!
Let's do the next:
1. Replace qvd files with "inline load".
2. add some rows in the inline load that show possible situation for BOOKED & BOOKCONF
3. Attach qvw file with what you do above.
Hi Sergey,
Attached are the import files and QVD. Appreciate your help. Thank you.
Regards,
Andros Goh
Hi!
Your problems are:
1. inner join instead of left join
2. where cause - you exclude some lines and so your cannot find BOOKCONF
I checked sript for T1 - there were lines with BOOKCONF.
Anywhere see attach with script.
Best regards
Hi Sergey,
Thank you very much, it work now.
· But when I select the period e.g. 2016/04 from the box, those item in T1 didn’t appear.
· If I didn’t make any selection, the records in T1 appear.
· I just join this T1 to main table ??
· Also I must remark the statement Drop table, else it won’t work.
Appreciate your help.
Without selection shown T1 records which is correct
With selection
Regards,
Andros Goh
Hello!
If my advise is correct then could you close the topic and start a new one.
If you add your qvw to a new topic you will recieve an answer faster from community.
Best regards, Sergey