cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SQL output in Print function

narayanan_kuppuraj
Participant
0 Likes
3,578

Hi Experts,

I have a table with one columne with few rows. I want to print all the rows in BODS using print function. I used as below , but its printing only the first row from the the oracle table and does not print the rest of the rows. What settings i need to change in order to print all the rows.

print(sql('DSSTAGING',  'select col from test_error '));

Appreiate your help..

Thanks,

narayanan

View Entire Topic
former_member275696
Active Participant
0 Likes

Hi Guys,

Here is the description of the function sql() from DS reference guide.

sql()

Runs a SQL operation against tables in the specified database.

Syntax

sql(datastore, sql_command)

Return value

varchar(1020)

Returns the first 1020 characters from the query's output. Typically, if sql_command is a SELECT

statement, the return value is the first row value of the first column. If sql_command is not a SELECT

statement, the return value is typically NULL. You must remember this if you assign the value returned to a variable.