[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

No Subject



Hi,

I don't think this made it the last time I sent it, so I'm resending
it.  I am trying to insert a string into an Oracle database,
occasionally the name in the string is possessive - it has an
apostrophe S ('S) on
the end of it.  Oracle is interpreting the ' as the end of the string
value, and then it doesn't know what to do with the remainder of the
string.

In native SQL (using SQLPlus) if I double the ' then I can insert the
string.  So I wrote the following code to do that:

find '''' in $vendor_name 0 #position
if (#position != -1)
   let #position2 = #position + 1
   let $vendor_name = substr($vendor_name, 1,
   #position) || '''' || rtrim((substr
   ($vendor_name,    #position2, 29)), ' ')
end-if

The value of the string goes from:
  DOUG'S USA TEST BUSINESS
to
  DOUG''S USA TEST BUSINESS

But the insert is still not working.  Does anyone have any other ideas
/ thoughts?  Thanks in advance,

Duncan.




_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com