Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SQL Load

Hello!

I am struggling with a data model based off of a SQL query from Teradata. The code is below. I am getting an ODBC Error. I have 4 other Loads connecting to the same DB without any problem. I have checked the query against Teradata directly and it works perfectly, even as a copy/paste. Can any one help?

SalesByProd:
LOAD
"ENTRY_DATE" & "PRODUCT" & "INV_NUM" as "ID",
Trim("PRODUCT") & Trim("PACK") & Trim("WH") as "PRODWHID",
"INV_NUM",
Trim("PRODUCT") & Trim("PACK") as "PRODUCT",
*;

SQL SELECT
"RECORD_ID",
"SM",
"WH",
"ACCT_NUM",
"PRODUCT",
"PACK",
"INV_NUM",
"post_date",
"QTY_ORD",
"QTY_DEL",
"ENTRY_DATE",
"ENTRY_TIME",
"ENTRY_BY",
"ORD_STATUS",
"DELMSG",
"DELDT",
"DELETE_DT",
"OR_TIME",
"DELETED_BY",
"REASON"
FROM "PROD_WHOLESALE_VIEWS"."WSale_PDS_ORDERS_COMB"
WHERE PCAT > 8 and PCAT < 27 and ENTRY_DATE > date - 367;

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

In your load you are loading two fields twice with the same name. QlikView will not accept that.

Since you use "INV_NUM" and "PRODUCT" which you also will be loading since you have a * too you get the duplicate fields names... Try calling them something else and see what happens...

View solution in original post

2 Replies
petter
Partner - Champion III
Partner - Champion III

In your load you are loading two fields twice with the same name. QlikView will not accept that.

Since you use "INV_NUM" and "PRODUCT" which you also will be loading since you have a * too you get the duplicate fields names... Try calling them something else and see what happens...

Not applicable
Author

That solved the problem! I also discovered that the DBAs created several date/time fields that all have the same name but are not relevant to the data. That caused Qlikview to create invalid associations. Wildcard Select statements are not always the best.

Thank you, Petter!