Solved

Double quote in SQL insert values..

Posted on 2003-11-18
2
4,266 Views
Last Modified: 2012-08-13
Hi everybody, I am a new one. I am doing a porject on network database. Just got stuck on the problem of double quote.
I want to insert the sentence:
 <b>it is as good as "Wonderfulland"</b>
I take this statement and try to insert to my db2 databse, but it turns out giving me a sentence of :
<b>it is as good as</b>
seems like it delete everything inside the double quote.....
but whne I try:
<b>it is as good as ""Wonderfulland""</b>
DB2 SQL can take the whole sentence.....
Just how can I enter the original sentence will only one pair of double quotes into DB2 database usinf SQL?
0
Comment
Question by:stomata
2 Comments
 
LVL 2

Accepted Solution

by:
askanivg earned 50 total points
ID: 9773334
Stomata
Have the insert statement but the inverted commas preceded by \
For e.g.

db2 "update btadstg.btt_office set off_nm='HELLO\"' where off_cd='CLOU'"

$db2 "select off_nm from btadstg.btt_office where off_cd ='CLOU'"        

OFF_NM                                            
--------------------------------------------------
HELLO"                                            


So I can have " in the column

HtH
0
 

Author Comment

by:stomata
ID: 9774121
Thx anyway,
I found out that's the problem with my html.....not SQL...haha
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question