Hi everyone,
maybe one of the silliest questions ever! should i use quote(') or quote(") when referring strings. any differences?.
regards,
Prabu
Quote(') or Quote(")
Moderators: chulett, rschirm, roy
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.
<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:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.