Quote(') or Quote(")

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Quote(') or Quote(")

Post by prabu »

Hi everyone,
maybe one of the silliest questions ever! should i use quote(') or quote(") when referring strings. any differences?.

regards,
Prabu
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can use either interchangeably, so it is just a matter of personal preference. You can also use the backslash as a quote character if you really want to, so a string of the form \He's a real "DataStager"\ is valid as well.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not that I've ever seen... unless something like your database cares.
-craig

"You can never have too many knives" -- Logan Nine Fingers
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Post by prabu »

thanks ArndW and Craig! it's good to get clarified on this.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

While it does not matter in DataStage itself you do have to get it right in a number of locations.
  • In SQL, double quotes are used for identifiers and single quotes for string constants.

    In shell scripts, single quotes are "hard quotes" while double quotes are "soft quotes": some expansions are possible within soft quotes.

    In C or C++ routines double quotes (only) surround string literals.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply