Page 1 of 1

Turbointegrator odbc import - how to pass parameter to sql

Posted: Wed Oct 16, 2013 2:25 pm
by Motyl
Hi

I have problem, i'm bulding import from odbc (mssql - query). This process will be started by another process, which will provide a parameter to the sub-processes.
Parameter should be used in sql query after "where", for example select * from locations where location_code = parameter.
How to do it? in advanced tab, i don't see sql statement, so i can't put my parameter

P.S Sorry for my english :oops:

Re: Turbointegrator odbc import - how to pass parameter to s

Posted: Wed Oct 16, 2013 2:36 pm
by qml
There were only about 2841 threads on that subject.

Two options:

1) You can include any variable reference directly in the query box, enclosing it in question marks, e.g. 'where location code = ?pParameter?'.

2) You can construct the entire query in Prolog and replace whatever you have in the query box with the constructed query string at runtime. The variable you need is DatasourceQuery. Also check out the other TI Local Variables, they can be extremely useful.

Niezamaco.

Re: Turbointegrator odbc import - how to pass parameter to s

Posted: Thu Oct 17, 2013 7:46 am
by Motyl
qml wrote:There were only about 2841 threads on that subject.
Niezamaco.
Sorry ;-), and thank You
"Nie ma za co" ;-)

Re: Turbointegrator odbc import - how to pass parameter to s

Posted: Thu Oct 17, 2013 10:40 am
by qml
Motyl wrote:Sorry ;-), and thank You
"Nie ma za co" ;-)
Oj tam, oj tam. 8-)