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
-
parvathi
- Participant
- Posts: 103
- Joined: Wed Jul 05, 2006 4:48 am
-
Contact:
Post
by parvathi »
Hi
I have varibale with in duoble quotes
ex var="hello"
I want the variable without duoble quotes
just var = hello
how can i do this?
-
ArndW
- Participant
- Posts: 16318
- Joined: Tue Nov 16, 2004 9:08 am
- Location: Germany
-
Contact:
Post
by ArndW »
Use TRIM(Your.ColumnName,'"','B')
-
ray.wurlod
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
-
Contact:
Post
by ray.wurlod »
Or InLink.ColName[2,Len(InLink.ColName)-2]
Or Field(InLink.ColName, '"', 2, 1)
Question: which of the three methods is the most efficient?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
parvathi
- Participant
- Posts: 103
- Joined: Wed Jul 05, 2006 4:48 am
-
Contact:
Post
by parvathi »
Thanks a lot
Trimming with field function i find it as the most efficient
But Even trim functions is also easier to me
-
kumar_s
- Charter Member
- Posts: 5245
- Joined: Thu Jun 16, 2005 11:00 pm
Post
by kumar_s »
Thanks for mentioning the option that you going to use. So its time for you to mark the topic as resolved.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
kejuste
- Premium Member
- Posts: 11
- Joined: Wed Jun 01, 2005 11:42 pm
- Location: Brisbane, Australia
Post
by kejuste »
I tried using all the there options.
I found function InLink.ColName[2,Len(InLink.ColName)-2] is more useful than other.
thanks Ray
Kathy Juster
-
chulett
- Charter Member
- Posts: 43085
- Joined: Tue Nov 12, 2002 4:34 pm
- Location: Denver, CO
Post
by chulett »
Hmmm... I would use Convert() for that.
Convert('"','',InLink.ColName)
-craig
"You can never have too many knives" -- Logan Nine Fingers
-
ray.wurlod
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
-
Contact:
Post
by ray.wurlod »
I'd be more cautious and check first that the characters occur only on the ends.
Code: Select all
If InLink.TheString Matches \'"'0X'"'\ Then InLink.TheString[2,Len(TheString)-2] Else InLink.TheString
Using substring allows for the possibility that there are double-quote characters within the string as well as surrounding it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.