longneckGoosie
Programmer
I don't know what's going on with an insert.
I am using Java to build many (11000 or so) SQL insert statments. I am looping through many ASCII comma delimited files pulling out the fields I need and putting them in the proper order.
The problem is this. In one of the string fields, single ticks occur as accent marks in some of the names, XI'AN, for example. Well when I build my SQL statment, I get:
Oracle thinks that since there is a ' after XI, that ends the string. So, it expects a comma. I get an error. How do I get around this? I can manipulate the ASCII files before I pump them in, if required. In fact I tried to change the ticks to %%039, but to no avail. I wind up with XI%%039AN in the table.
Any help here would be greatly appreciated.
I am using Java to build many (11000 or so) SQL insert statments. I am looping through many ASCII comma delimited files pulling out the fields I need and putting them in the proper order.
The problem is this. In one of the string fields, single ticks occur as accent marks in some of the names, XI'AN, for example. Well when I build my SQL statment, I get:
Code:
Insert into <table_name> values (00, 00, 00, 'XI'AN', 00, 00)
Oracle thinks that since there is a ' after XI, that ends the string. So, it expects a comma. I get an error. How do I get around this? I can manipulate the ASCII files before I pump them in, if required. In fact I tried to change the ticks to %%039, but to no avail. I wind up with XI%%039AN in the table.
Any help here would be greatly appreciated.