Solved

Double quote in SQL insert values..

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 (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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

11 Experts available now in Live!

Get 1:1 Help Now