IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SQL concatenation is taking ' as the string terminator


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
garv_fundu
Warnings : 1

New User


Joined: 02 Nov 2006
Posts: 22

PostPosted: Thu Feb 01, 2007 6:48 pm
Reply with quote

hi all,

i have a query like...

select * from Tbl where Name in ('hello','children's','world');

its not recognizing any character after 's in children's...

i think its taking ' as the string terminator...

kindly help me regarding this...

thanks in advance
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Feb 01, 2007 6:54 pm
Reply with quote

Have you checked the manual to see how quotes can be handled within quotes?
Back to top
View user's profile Send private message
garv_fundu
Warnings : 1

New User


Joined: 02 Nov 2006
Posts: 22

PostPosted: Thu Feb 01, 2007 6:57 pm
Reply with quote

William Thompson wrote:
Have you checked the manual to see how quotes can be handled within quotes?



no... just post the solution here please....
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Feb 02, 2007 7:05 am
Reply with quote

Check HERE for an example from the manual
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Feb 02, 2007 2:42 pm
Reply with quote

DavidatK wrote:
Check HERE for an example from the manual
Thanks Dave, like a well trained dog, I went searching but just couldn't find the example needed (limited, sloooow resources at home)....
Bill
Back to top
View user's profile Send private message
pravena

New User


Joined: 31 Jan 2007
Posts: 9
Location: chennai

PostPosted: Mon Feb 05, 2007 11:47 am
Reply with quote

Hi,
If you include another ' (single quotes) before s in childern''s i think u can get the required result
Pls correct me if i am wrong
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Mon Feb 05, 2007 3:02 pm
Reply with quote

select * from Tbl where Name in ('hello','children''s','world'); should work.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Search string in job at regular Spool... CLIST & REXX 0
Search our Forums:

Back to Top