Login Register Actian.com  

Actian Community Forum


Go Back   Actian Community Forums > Ingres Forums > Database Migration
 

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 2009-09-27   #1 (permalink)
Junior Member
 
Join Date: Jul 2009
Location: Melbourne - Australia
Posts: 9
Default Ingres JDBC, \', insert names like: O'Brien, Eto'o

I did a dump from my MySql database and there is string field which value is: D'Angelo

Code:
The sql sentence generate is this from mysqldump:
INSERT INTO myTable VALUES ('D\'Angelo');
I tested the same sentence in MySql and works fine but in ingres doesn't.
Here is the error:

Code:
Error: com.ingres.gcf.util.SqlEx: Unmatched quote, parenthesis, bracket or brace., SQL State: 42000, Error Code: 802835
I imagine there is something to do with ingres jdbc driver. I read this: JDBC Driver - Ingres Community Wiki
but I haven't found anything.

Nothing similar in: Java Code Samples - Ingres Community Wiki

Thanks
Leonardo
kallunga is offline   Reply With Quote
Old 2009-09-27   #2 (permalink)
Junior Member
 
Join Date: Jul 2009
Location: Melbourne - Australia
Posts: 9
Default

Same error in isql. So there's nothing with JDBC.
Anyway, I just want to be able to insert via jdbc those kind of values: Eto'o, O'Brien...
Leonardo
kallunga is offline   Reply With Quote
Old 2009-09-27   #3 (permalink)
Ingres Community
 
Join Date: Mar 2007
Location: Orpington, Kent, UK
Posts: 111
Default

Hi kallunga,

Take a look at http://docs.ingres.com/Ingres/9.3/SQ...ngliterals.htm.

To include a single quote within a string it needs to be doubled. In your example 'D\'Angelo' becomes 'D''Angelo'.

HTH
notnull is offline   Reply With Quote
Old 2009-09-28   #4 (permalink)
Junior Member
 
Join Date: Jul 2009
Location: Melbourne - Australia
Posts: 9
Default

Yes notnull, I found somewhere else similar... I tested and worked fine!
Thanks!
kallunga is offline   Reply With Quote

Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2011 Actian Corporation. All Rights Reserved