cancel
Showing results for 
Search instead for 
Did you mean: 

Data Services sql() statement in script truncates the result after +- 500 characters

Former Member
0 Kudos

I am pushing down a sql statement to our Teradata database, but the result is a long character string.

If I pass the variable eg.

$GV_RESULT = sql('DB name', 'select FIELD1 from ...')

it returns only the first 500 characters (don't know exact size, but thereabouts). The actual size it should be returning is more like 10000 characters.

The variable $GV_RESULT is sufficient in length.

Is this a feature or am I missing something?

Accepted Solutions (1)

Accepted Solutions (1)

former_member187605
Active Contributor

RT*M. SAP Data Services Reference Guide, section 6.3.139 sql:
Runs a SQL operation against tables in the specified database.

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.

Answers (1)

Answers (1)

Former Member
0 Kudos

Ah apologies, I do see this in manual. However then I actually want to change the question to, how can I return a variable that is larger than 1020. Is there no way to do this via a script?

I have tried the parameter and variable passing from a Dataflow, but I have additional issue there. Also logged specific question around that.