Universe Stage and substrings

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
trokosz
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 16, 2004 6:38 pm
Contact:

Universe Stage and substrings

Post by trokosz »

In the Universe Stage I know I can write some SQL type code. I'm doing something silly when trying to execute a substring function as follows:

SUBSTR(FULL.TEXT,1,254).....I even tried @SUBSTR(FULL.TEXT,1,254) but still no go....

The error I get is "call to SQLFetach failed.....row length exceeds buffer size".... Any idea what is wrong?


Thanks
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You need to create a dictionary item or use EVAL.

SELECT EVAL "FULL.TEXT[1,20]" FROM RT_LOG123;

EVAL has several options to it where you can format it or name the column. Do a search. Ray has lots of posts using EVAL.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

UniVerse SQL uses SUBSTRING as defined in ANSI SQL and in ODBC 2.0

Code: Select all

SELECT SUBSTRING(FULL.TEXT FROM 1 FOR 254) FROM ...
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
trokosz
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 16, 2004 6:38 pm
Contact:

Post by trokosz »

Thanks a bunch
Post Reply