Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using two databases. one is SQL server and another one is oracle db.
First :
The purpose of SQL server to use, i am maintaining all predefined values in this SQL Server table. instead of using hardcode in the Qlik variable, i am just using SQL Server Table.
Second:
The second DB is oracle, my all requirement columns and values have been defined in this DB.
my requirement is, i want to pass SQL server table value in Oracle table where clause.
How to pass multiple values (SQL Server column values) in Oracle where clause.
For Example,
SQL Server table is below :
vENO vNAME vPLACE
101 JIVE vUSA
102 RIJI UK
103 BIJA CANADA
My Qlik Script is below
OLEDB CONNECT32 TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=xxxx;Initial Catalog=SQLTEST;Data Source=xxxxx;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=xxxx;Use Encryption for Data=False;Tag with column collation when possible=False];
SQL_EMP_DETAILS:
LOAD vENO,
vENAMe,
vEPLACE;
SQL SELECT *
FROM TESTRA12.dbo."tbl_Emp_Details";
OLEDB CONNECT32 TO [Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=xxxxx;Data Source=xxxxxx;Extended Properties=""] (XPassword is xxxxxxxx);
SELECT EMPNO,EMPNAME,EPLACE,ECOUNTRY where EMPNO in () ?????? // here pass SQL server column value --> vENO
How to do this..?
pls. reply immediately, i am struggling in between...
Thanks...
Something like below (very rough code) .
SQL_EMP_DETAILS:
LOAD vENO,
vENAMe,
vEPLACE;
SQL SELECT *
FROM TESTRA12.dbo."tbl_Emp_Details";
Temp:
SELECT EMPNO,EMPNAME,EPLACE,ECOUNTRY;
noconcatenate
FinalTemp:
load *
resident Temp where exists(EMPNO,vENO);
drop table Temp;