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: 
qlikapple
Creator
Creator

upload excel files in the source

Hi ,

 i have  one table in which i am extracting the data  by adding those ID's in  the source every time. I want to automate through excel file so that to avoid everytime logging into the server and uploading those ID's in server,

For exxample i am giving the query

 

SQL
SELECT * FROM l1.MEASURE  WHERE ID IN (
SELECT ID FROM MEA_PERIOD WHERE FR_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 ID IN (SELECT DISTINCT LO_ID FROM l1.P WHERE ID IN (122,693,733,763,703,803,973,1823,184)

AND Code IN (10,20) and frid = 4 and STATUS='ACTIVE');

 

---------------------
in which i want  to add ID's in excel file  to insert into datasource, how to do that

 

1 Reply
Vegar
MVP
MVP

Maybe you could do something like this?

Excel:
LOAD Concat(ID,',') as IDs
FROM MyExcel;
let vMyIDs = peek('IDs', -1, 'Excel')

SQL SELECT * FROM l1.MEASURE WHERE ID IN ( SELECT ID FROM MEA_PERIOD WHERE FR_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 ID IN (SELECT DISTINCT LO_ID FROM l1.P WHERE ID IN ($(vMyIDs)) AND Code IN (10,20) and frid = 4 and STATUS='ACTIVE');