Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Why am I getting an error on the script below?
//ODBC CONNECT32 TO Craftsman (XUserId is eMbVZQJMBLdaWQZNaH, XPassword is LIJYDUBGOCMEHaD);
Load
*From q:\abauman\qlikview_qvd\youarehereab.qvd
(qvd);
ITEMLOC:
LOAD
VersionNum,ItemNum,
ItemNum &'-'& ItemNum as ItemNumLoc,
LocationNum,
PiecesOnHand,
TotalCost as TotalCostLoc,
SQL SELECT *
FROM TTM.ITEMLOC;
Store
* FROM ITEMLOC into Q:\ABauman\QLIKVIEW_QVD\YOUAREHEREAB.qvd;Why am I gett an error on this below.
//ODBC CONNECT32 TO Craftsman (XUserId is eMbVZQJMBLdaWQZNaH, XPassword is LIJYDUBGOCMEHaD);
Load
qvd);ITEMLOC:
LOAD
VersionNum,
ItemNum
,
ItemNum
&'-'& ItemNum as ItemNumLoc,
LocationNum
,
Description as DescriptionLoc,
*From q:\abauman\qlikview_qvd\youarehereab.qvd(
PiecesOnHand,
TotalCost
as TotalCostLoc,
SQL
SELECT *FROM TTM.ITEMLOC;
Store
Q:\ABauman\QLIKVIEW_QVD\YOUAREHEREAB.qvd;
* FROM ITEMLOC intoI just attached the file and commented out the large ITEMLOC table because it was too large to post.
My tables are not working together. I need the tables to be joined by the ITEMNUMLOC.
The code should be like this:
ODBC CONNECT32 TO Craftsman (XUserId is eMbVZQJMBLdaWQZNaH, XPassword is LIJYDUBGOCMEHaD);
Load *
From q:\abauman\qlikview_qvd\youarehereab.qvd
(qvd);
ITEMLOC:
LOAD
VersionNum,
ItemNum &'-'& ItemNum as ItemNumLoc,
Description as DescriptionLoc,
LocationNum,
PiecesOnHand,
TotalCost as TotalCostLoc;
SQL SELECT *
FROM TTM.ITEMLOC;
Store ITEMLOC into Q:\ABauman\QLIKVIEW_QVD\YOUAREHEREAB.qvd;
Copy it and paste in your second tab of script. it should work.
Hi
Thanks for the help.
I need to put an if Statement in the script.
can you correct the way I have it now?
if OH >0 then PiecesOnHand else 0
How do I make that work in my script?
Thanks for all your help today.
Adam
it should be like ( assuming that OH is a field name):
LOAD field1, field2,....
If( OH>0, PiecesOnHand , 0) as YourConditionalOH
FROM .....;
and yes, you haven't mentioned if the code (i suggested) worked. i am just curious.
My tables from this file are not working together like i need them too. Should I do a left or an outer join?
I need my xls file to be the main table and then I need the actual "live" table to be updating fields only by the ItemNum's in my xls spreadsheet.
Where do I put the left or outer Join?
i am not too sure what is you are looking for. guessing you need a LEFT JOIN (you should load excel file and put LEFT JOIN and load from your live data). in that case what would happen is:
all the records from excel would exist and the matching ItemNumLoc (key) records would be joined with the table (mentioned fields would be added for matched ItemNumLoc).
if you want this, go ahead with left join as mentioned.
Hope this helps.