Solved

Double quote in SQL insert values..

Posted on 2003-11-18
2
4,265 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

919 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now