Page 1 of 1
Can I add a comment line in the query box in turbo integrator
Posted: Wed Mar 16, 2016 8:00 am
by davidh
Hi all.
Is there an option to add a comment line in the Query box on the data source page in turbo integrator. We have many processes with SQL queries inside this query box and they don't work if there are any comment lines starting with -- which is perfectly fine in SQL. I understand you can use # in the prolog, metadata and data tabs, but this too does not work in the query box on the data source page.
Apologies if this is really basic, but I have not been able to find an answer anywhere.
Regards
David
Re: Can I add a comment line in the query box in turbo integrator
Posted: Wed Mar 16, 2016 8:20 am
by Wim Gielis
Hello David,
Would it be an option if you use a really basic, quick, query in the Data source query box - and in the Prolog tab you set the real query using the variable DataSourceQuery ?
The first query should return all the correct fields to set the variables in the Variables tab, but other than that, the real query is set at run-time near the end of the Prolog tab.
Wim
Re: Can I add a comment line in the query box in turbo integrator
Posted: Wed Mar 16, 2016 8:48 am
by Ajay
David
I have used the following which is suggested by Wim, which works for me.
In the "Query" box on the Datasource tab, I simply have the query to identify the columns needed on the Variables tab of the TI, which once set, I then remove the login credentials.
In the "Prolog" though I have comments added to the query, eg
#****Begin: Generated Statements***
#****End: Generated Statements****
# ==============================================================================
# Datasource connection details
# ==============================================================================
DataSourceType='ODBC';
DatasourceNameForServer='Name of ODBC';
DatasourceNameForClient='Name of ODBC';
DatasourceUserName='UserName for ODBC';
DatasourcePassword='Password for UserName of ODBC';
# ==============================================================================
# Datasource query
# ==============================================================================
DatasourceQuery =
'Select' |
# add text or comments needed for SQL query
'Column 1, Column 2' |
'from Database' ;
Hope this helps.
Ajay
Re: Can I add a comment line in the query box in turbo integrator
Posted: Wed Mar 16, 2016 9:58 am
by Douard
Hi
You can add a comment if you use the syntax /* ENTER COMMENT HERE */
This works across single or multiple lines. The fact that you cannot use -- is frustrating but the /**/ work just as well.
Douard
Re: Can I add a comment line in the query box in turbo integrator
Posted: Wed Mar 16, 2016 9:28 pm
by davidh
Thanks for the responses guys.
Douard, not sure why I never even tried that one, so thanks. Works fine.
A couple of interesting options to consider from Wim and Ajay. Thanks for your help.