Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikapple
Creator
Creator

query not working in script

hi all,

i have a query which is working fine in  oracle ,

if i am keeping the same query in qlikview load script, it is throwing error,

can anyoe please help.

please find the below query which is working fine in oracle

SQL

select
* from
(
SELECT * FROM lplada.MEASURED_PLO WHERE PERIOD_ID IN (
SELECT PERIOD_ID FROM MEASUREMENT_PERIOD WHERE FRQ_ID=4 AND (TO_CHAR(START_DATETIME,'MON-YYYY') like TO_CHAR(CURRENT_DATE,'MON-YYYY')
or TO_CHAR(START_DATETIME,'MON-YYYY') like TO_CHAR((current_date-extract(day from current_date)),'MON-YYYY') )
)
and PLO_ID IN (SELECT DISTINCT PLO_ID FROM lplada.PLO WHERE PLA_ID IN (1122,6973,7343,7363,7703,8083,9723,18223,19684,19728,19843,22195,26017,21541,26847,28497,28739,32680,33286,33600,39524,41255,39560)
AND KPI_CODE IN (12,20) and frq_id = 4 and STATUS_CODE='ACTIVE')

) A

inner JOIN

(SELECT * FROM MEASUREMENT_PERIOD WHERE  (TO_CHAR(START_DATETIME,'MON-YYYY') like TO_CHAR(CURRENT_DATE,'MON-YYYY')
or TO_CHAR(START_DATETIME,'MON-YYYY') like TO_CHAR((current_date-extract(day from current_date)),'MON-YYYY') )
) B

on A.PERIOD_ID = B.PERIOD_ID;

can anyone please tell me  for which  the query needs to get run fine in qlikview load script as well.

the  error which i am geting is below.

8 Replies
jobsonkjoseph
Creator III
Creator III

Hi Sahaja,

Have you tried the debug option in script editor.

qlikapple
Creator
Creator
Author

yes i have tried

qlikapple
Creator
Creator
Author

Its very urgent can anyone please help

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

Your sql request "select * from" return two fields named MODIFIED_MEASURE_PLO

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!
qlikapple
Creator
Creator
Author

anyone please help

tharanikannan
Contributor III
Contributor III

Hi ,

This issue comes , when you try to rename a field with an existing name on the same table. Kindly check your script again.

jobsonkjoseph
Creator III
Creator III

Dear Sahaja,

Is this the first data pull, i mean is there any other data in the application, if so is the data model without any duplicates.

Just a thought.

Mark_Little
Luminary
Luminary

Hi

It suggests that the field MEASURED_PLO exists already.


Is that the full load script?

Have you just tried loading that table.

Also you would normally expect to see

Load *  before the SQL select


Mark