Solved

Double quote in SQL insert values..

Posted on 2003-11-18
2
4,267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

751 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