max length between two value marks in a multi value column
Moderators: chulett, rschirm, roy
max length between two value marks in a multi value column
RT_LOGxxx has a multi value column MSG.TEXT with output depth of 60T.
What would be the maximum length between two value marks? This is required to determine FMT format value to get the text in one line without any breaks.
Below statement works as expected when number of characters before the first value mark are less than 100 but fails when it exceeds. So I would like to know what value we can use for FMT so that irrespective of length all the TEXT is displayed in one line?
SELECT EVAL "FIELD(MSG.TEXT,CHAR(253),1)" AS EVENT FMT '100L' FROM RT_LOGxxx
What would be the maximum length between two value marks? This is required to determine FMT format value to get the text in one line without any breaks.
Below statement works as expected when number of characters before the first value mark are less than 100 but fails when it exceeds. So I would like to know what value we can use for FMT so that irrespective of length all the TEXT is displayed in one line?
SELECT EVAL "FIELD(MSG.TEXT,CHAR(253),1)" AS EVENT FMT '100L' FROM RT_LOGxxx
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There are no limits. The original UniVerse database storage concept allowed for completely arbitrary stucture sizes (limited only by machine resources).
Some log messages, particularly those returned from Microsoft ODBC data sources, are thousands of characters long.
Some log messages, particularly those returned from Microsoft ODBC data sources, are thousands of characters long.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thank you Ray!
I am not a premium member but planning to be one very soon. Would you mind suggesting the alternative for my requirement so that below sql works without any line breaks for each row it returns irrespective of log message length.
SELECT EVAL "FIELD(MSG.TEXT,CHAR(253),1)" AS EVENT FMT '100L' FROM RT_LOGxxx
Please help me out! I really appreciate it!
I am not a premium member but planning to be one very soon. Would you mind suggesting the alternative for my requirement so that below sql works without any line breaks for each row it returns irrespective of log message length.
SELECT EVAL "FIELD(MSG.TEXT,CHAR(253),1)" AS EVENT FMT '100L' FROM RT_LOGxxx
Please help me out! I really appreciate it!
Your are using "FMT '100L'" in your command, so if you have more than 100 characters the SELECT inserts a line break. It is easiest to filter those out yourself from UNIX or elsewhere.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Your SELECT output is comin into your script on stdin, right? So just filter it with "tr -d '\n' " and you've achieved your goal.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Change your query to
Then convert the '*' character back into a <Lf> after removing all linefeeds; use some other character if the '*' appears in your text.
Code: Select all
SELECT EVAL "'*':FIELD(MSG.TEXT,CHAR(253),1)" AS EVENT FMT '100L' FROM RT_LOGxxx
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: