Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a list of sql servers, and i have to load data from each other, they all have the same structure, with tiny difference in default database.
i want to find a way, to load inline the connection or any other way, to be able to make the script parameterized scrip
something like
load * inline [
par, string conection];
use conection
for i=1 to n
load * from conection{i}.table;
next
thank you
hi
something like this should work for you
connections:
Load * inline [
par, string conection];
for i=0 to noofrows('connections')-1 /////row index starts at 0
let vConnectionString = peek('string conection',$(i),'connections');
load * from $( vConnectionString).table;
next
hi
My script looks like this:
connections:
Load * inline [
par, string conection
1, CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=cristian.jugaru;Initial Catalog=BizPharmaFranciza;Data Source=x.x.x.x;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=DESKTOP-U59F549;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is VIeZcSAJZbZGDABEQaMEXaMGAKJYH)
2, CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=cristian.jugaru;Initial Catalog=BizPharmaFrancizaFarmpil;Data Source=x.x.x.x;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=DESKTOP-U59F549;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is KKFMVSAJZbZGDABEWKMYVXAIFBDA)
];
for i=0 to noofrows('connections')-1 /////row index starts at 0
let vConnectionString = peek('string conection',$(i),'connections');
load * from $( vConnectionString).table;
next
and i got the following error:
i think that my problem is that it does not know when the connection string is ended.
how can i be sure that a string is exactly what i told him , because now, i think it does not stop at the "
thank you