Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

Loading a SQL API (function) field not found error

I am getting a field not found <TTT_NO> error when trying to runt his load script:

super:

LOAD "SSS_NO" AS [S Number],

"TTT_NO" AS [T Hours]; ----- THIS LINE

SQL SELECT

et.SSS_NO,

et.CCC_ID,

WSA_API.GSH (et.CCC_ID, et.SSS_NO, trunc(sysdate)+2) AS TTT_NO

FROM SSS_TABBLE et;

STORE super INTO $(vDetailsQVDDirectory)super.qvd (qvd);

DROP TABLE super;

1 Solution

Accepted Solutions
trdandamudi
Master II
Master II

Give a try on the below code and let me know the result:

super:

LOAD *;

SQL SELECT

et.SSS_NO,

et.CCC_ID,

WSA_API.GSH (et.CCC_ID, et.SSS_NO, trunc(sysdate)+2)

FROM SSS_TABBLE et;

STORE super INTO $(vDetailsQVDDirectory)super.qvd (qvd);

DROP TABLE super;

View solution in original post

9 Replies
Anil_Babu_Samineni

Because you are attempting the preceding load. Can I know what are you expecting from this. And please try database and then try in qlikview

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
matthewp
Creator III
Creator III
Author

SELECT

et.SSS_NO,

et.CCC_ID,

WSA_API.GSH (et.CCC_ID, et.SSS_NO, trunc(sysdate)+2) AS TTT_NO

FROM SSS_TABBLE et;

works fine in oracle sql developer

Anil_Babu_Samineni

Then use same expression to get the values using alias names then trace to debug see whether the values are coming or not

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
matthewp
Creator III
Creator III
Author

I want to run the sql in the load script not in the qvd extract

trdandamudi
Master II
Master II

Give a try on the below code and let me know the result:

super:

LOAD *;

SQL SELECT

et.SSS_NO,

et.CCC_ID,

WSA_API.GSH (et.CCC_ID, et.SSS_NO, trunc(sysdate)+2)

FROM SSS_TABBLE et;

STORE super INTO $(vDetailsQVDDirectory)super.qvd (qvd);

DROP TABLE super;

stabben23
Partner - Master
Partner - Master

trunc(sysdate) is not valid in SQL use something like CONVERT(date,getdate()) instead

trdandamudi
Master II
Master II

Trunc() is a valid function in Oracle unless there is a change, I used to use Oracle long years back.

matthewp
Creator III
Creator III
Author

The SQL is fine, its the QV part

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I would rather test it like this:

super:

SQL SELECT

et.SSS_NO,

et.CCC_ID,

WSA_API.GSH (et.CCC_ID, et.SSS_NO, trunc(sysdate)+2) AS TTT_NO

FROM SSS_TABBLE et; // Correct spelling?

Now check in the Table Viewer which fields names you do get in the super table...

Peter