Skip to Content
0

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

Oct 30, 2017 at 12:13 PM

57

avatar image
Former Member

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Dirk Venken
Oct 30, 2017 at 12:51 PM
1

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.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 30, 2017 at 12:59 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded