This is a discussion on Delimiting Single and Double Quotes within the DB2 forums, part of the Database Server Software category; --> After searching this forum, I think I've got delimiters right for single quotes. but I'm still lost on double ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| After searching this forum, I think I've got delimiters right for single quotes. but I'm still lost on double quotes. Here's what I'm after: Update .... set mytext = 'O''Brien said, "I inserted quotes," yesterday.' The O'Brien gets delimited with two single quotes to replace the one between O and B, but what do I need to get the quotes around ->I inserted quotes,<- ? Thanks. |
| ||||
| The following works for me: C:\SQLLIB\BIN>db2 "select '\"This is so cool\"' from syscat.tables fetch first 1 rows only" 1 ----------------- "This is so cool" 1 record(s) selected. C:\SQLLIB\BIN>db2 "select '''This is so cool''' from syscat.tables fetch first 1 rows only" 1 ----------------- 'This is so cool' 1 record(s) selected. hth, dotyet rchrismon@fragomen.com (Randy) wrote in message news:<dae79e25.0311031240.2ad2f1fc@posting.google. com>... > After searching this forum, I think I've got delimiters right for > single quotes. but I'm still lost on double quotes. Here's what I'm > after: > > Update .... set mytext = 'O''Brien said, "I inserted quotes," > yesterday.' > > The O'Brien gets delimited with two single quotes to replace the one > between O and B, but what do I need to get the quotes around ->I > inserted quotes,<- ? > > Thanks. |