Semi Colon in SQL String
Moderators: chulett, rschirm, roy
Semi Colon in SQL String
Hi All, trying to pass a SQL statement to DataStage job to execute:
INSERT INTO TABLEA (Col1) VALUES('This ; is a test' ;
Doesn't like the semi colon in the string
teraTargetTable: RDBMS code 3707: Syntax error, expected something like ',' or ')' between a string or a Unicode character literal and the word
Any ideas on how to get around this error
Thanks In Advance
INSERT INTO TABLEA (Col1) VALUES('This ; is a test' ;
Doesn't like the semi colon in the string
teraTargetTable: RDBMS code 3707: Syntax error, expected something like ',' or ')' between a string or a Unicode character literal and the word
Any ideas on how to get around this error
Thanks In Advance
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's more of a DataStage thing it would seem. Found out long ago that (for Oracle in my case) it didn't want the trailing semi-colon that Toad would add and didn't mind if it was there. People would "user define" something that wouldn't run simply because of the semi-colon.
I don't see the issue here, take it out and you're fine.
I don't see the issue here, take it out and you're fine.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Other than fiddling around with escaping either the quote characters or the semi-colon character I have no suggestions. Perhaps you should involve your official support provider - this seems to me like incorrect behaviour.
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.
Oh heck, I thought we were talking about the trailing semi-colon, not the one in your data... sorry. What happens if you escape it? Definitely involve your support provider as it certainly does seem like bad behaviour and perhaps there is a fix/patch for it out there.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers