Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SQL concatenation is taking ' as the string terminator

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: SQL concatenation is taking ' as the string terminator
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: 3158
Location: Tucson AZ

PostPosted: Thu Feb 01, 2007 6:54 pm    Post subject:
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    Post subject:
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    Post subject: Re: SQL concatenation is taking ' as the string terminator
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: 3158
Location: Tucson AZ

PostPosted: Fri Feb 02, 2007 2:42 pm    Post subject: Re: SQL concatenation is taking ' as the string terminator
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts Which function does the Ampersand (&a... Andi1982 PL/I & Assembler 3 Wed Aug 24, 2016 2:05 pm
No new posts Need a help how to replace a string i... gurunath82 CLIST & REXX 12 Tue Jul 26, 2016 11:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us