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
 

 

Insertion of Apostrophe vale in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
nightbuzzz

New User


Joined: 04 May 2007
Posts: 21
Location: kuala lumpur

PostPosted: Mon Dec 22, 2008 1:20 pm    Post subject: Insertion of Apostrophe vale in DB2
Reply with quote

Hi,

I want to insert an apostrophe value in DB2 varchar field.
What will be the syntax of that??

for eg.: THOMSON'S 75X104 HME1

Please let me know.
Back to top
View user's profile Send private message

atosvv

New User


Joined: 04 Dec 2008
Posts: 11
Location: Mumbai

PostPosted: Mon Dec 22, 2008 2:11 pm    Post subject: Reply to: Insertion of Apostrophe vale in DB2
Reply with quote

Hi,


Code:

create table vv9(name varchar(45), no integer);
insert into vv9 values(('Insert'||''''||'Apostrophe'), 100);
select * from vv9;

The result is
NAME              NO
Insert'Apostrophe 100



Will it useful...

Thanks.

-VV
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Mon Dec 22, 2008 3:11 pm    Post subject: Reply to: Insertion of Apostrophe vale in DB2
Reply with quote

Hi,

Where are you executing your query ?
1) If its a cobol code, you may easily populate your string to the host variable and use insert verb should work. I don't think there should be any problem because of apostrophe.

2) If you want to run the query in SPUFI, you may try using hex values for apostrophe.

eg: select "thomson||x'7D'||is good" from sysibm.sysdummy1 ;

Please let me know if this works.
Thanks,
-Kapil.
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
No new posts Sending IMS (DBCTL) command and get r... lind sh CICS 2 Tue Mar 01, 2016 2:32 pm
No new posts How to delimit data with '|' which ha... gch77 DFSORT/ICETOOL 5 Wed Aug 13, 2014 9:16 am
No new posts Dropping all Apostrophe's sivasaras DB2 3 Fri Nov 22, 2013 7:30 pm
No new posts PDS member insertion into a GDG dataset Todd.Proganal JCL & VSAM 8 Wed Jun 05, 2013 5:43 pm
No new posts Doubts related to insertion of table ... Vidya Kajale COBOL Programming 1 Tue Apr 24, 2012 11:54 am


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