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

Reading values from an excel file into a SQL query

I have an excel file with a list of contract numbers.

I need to pull data from an Oracle database using SQL for these contract numbers.

In other words, I need to use the excel list of contract numbers in the WHERE clause of the Oracle SQL.

Any help will be greatly appreciated.

Thank you,

Viral Mehta

2 Replies
Not applicable
Author

Hi Viral,

Althought I am sure some guru on here can tell you how to do this within QlikView. I would just say that what you are trying to do is extract two seperate data sources and bolt them together. Although this could (maybe) be done via ODBC, you may wish to consider a staging area for all your extractions and use QlikView on that platform.

I.e. in our organsiation we extract data from MS SQL, MY SQL, Access & Oracle using Microsoft SSIS into a staging area and use Qlikview from there. This gives us optimum control over the base data being extracted from each source then makes connecting the disperate tables far less painfull than trying to perform the whole exercise in QV.

Not the exact answer you were after but hope it helps.

Regards,

Jon

Miguel_Angel_Baeyens

Hello Viral,

I'd do that using an exists() function using the value from excel:

ContractsToLoad:LOAD ContractNoFROM Excel.xls; DatabaseContracts:LOAD ContractNo, Field2, Field3WHERE EXISTS(ContractNo);SQL SELECT ContractNo, Field2, Field3FROM Database.ContractTable; DROP TABLE ContractsToLoad;


I've used sometimes a mapping table/applymap, but I think this will work.

Hope this helps