View previous topic :: View next topic
|
Author |
Message |
nightbuzzz
New User
Joined: 04 May 2007 Posts: 21 Location: kuala lumpur
|
|
|
|
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 |
|
|
atosvv
New User
Joined: 04 Dec 2008 Posts: 11 Location: Mumbai
|
|
|
|
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 |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
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 |
|
|
|