String Handling

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

veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Post by veera24 »

chulett wrote:Obviously, they want or need something quoted or this conversation would have been over quite some time ago. :wink:
Yeah chulett. We want some of the columns needs to be quoted and the rest needn't.
Thanks in advance...
veera...
veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Post by veera24 »

ray.wurlod wrote:Use 000 for the quote character on the Format, and use SQuote() function for each field that needs to be quoted. This allows individual fields to be quoted without all string fields to be quoted. ...
Hi ray,
Thanks for your suggestion. By doing so i can achieve the quotes in the column wherever i want.am i right?

Previously i thought that i can concatenate the double quotes in the columns i want. But now, by using SQuote() function i can achieve i suppose. Let me check the output. Thanks again ray.
Thanks in advance...
veera...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

veera24 wrote:
chulett wrote:Obviously, they want or need something quoted or this conversation would have been over quite some time ago. :wink:
Yeah chulett. We want some of the columns needs to be quoted and the rest needn't.
:? You *do* realize that in all of this exchange that you've never given us specific examples of the data types in this file and what in the heck you want quoted and what you don't want quoted? This really isn't rocket science here.

SQuote() will wrap data in single quotes and DQuote() will do the same with double-quotes. If you really need some odd, non-standard mishmash of quoted and unquoted fields then make them all strings, set the quote character to '000' in the file and use one of the two functions noted to add quotes of the proper type to the fields that need them.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply