Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a script to load data fron an excel files :
Directory;
commesse_clienti :
LOAD Cod_interno, ragsoc_chiamata, cliente_chiamata, coddest_chiamata, commessa_chiamata
FROM elenco_cli_com.xls (biff, embedded labels, table is Foglio1$);
and then i would to use this in a SQL statement SQL server ( sfter a connection ODBC ...)
...
SELECT *
FROM CHIAMATE
WHERE cliente in
( SELECT cliente_chiamata FROM commesse_clienti);
How can i do ??
Thanks
You may also try using the following sample using INNER JOIN. This will load only the data from both tables that have matching sKey value.
Table1:
LOAD sKey,
Tab_Field1
FROM [Sample Data.xls] (biff, embedded labels, table is Sheet1$);
INNER JOIN (Table1)
LOAD sKey,
Tab2_Field1,
Tab2_Field2,
Tab2_Field3,
Tab2_Field4;
ODBC CONNECT TO sqlDatasource;
SQL SELECT *
FROM sqlDatasource.dbo.Tab2;
Hi,
an idea is to have a preceding LOAD combined with WHERE EXISTS (FieldName):
Test:
LOAD * Where Exists (ClienteId);
SQL SELECT
FieldName1,
FieldName2,
etc
FROM Table;
Good luck!
Rainer
You may also try using the following sample using INNER JOIN. This will load only the data from both tables that have matching sKey value.
Table1:
LOAD sKey,
Tab_Field1
FROM [Sample Data.xls] (biff, embedded labels, table is Sheet1$);
INNER JOIN (Table1)
LOAD sKey,
Tab2_Field1,
Tab2_Field2,
Tab2_Field3,
Tab2_Field4;
ODBC CONNECT TO sqlDatasource;
SQL SELECT *
FROM sqlDatasource.dbo.Tab2;