Microsoft
Software
Hardware
Network
Question : ORA-12704: character set mismatch
Hi Experts,
I have a java program that uses 2 ODBC connections to retrieve data from a Oracle-DB and insert it to an DB2-DB.
The program was running fine, but a new option should be added. if a particular field is empty I have to fill it with a '.' dot.
So no big deal I thought but now i get the error :
"java.sql.SQLException: ORA-12704: character set mismatch"
on the
rs = stmtOra.executeQuery();
The original SQL-string looked like this:
stmtOra=dbConnOra.prepareS
tatement("
select " +
" a.Field1, " +
" b.Field2, " +
" replace(c.Field3,'''',''''
'')," +
Etc.etc.etc.
I changed it into:
stmtOra=dbConnOra.prepareS
tatement("
select " +
" a.Field1, " +
" b.Field2, " +
" case when (c.Field3 = NULL) then '.'" +
" when (c.Field3 = ' ') then '.'" +
" else replace(c.Field3,'''',''''
'') end,"
Etc.etc.etc.
Remark: fields 1,2 and 3 are also defined in the "group by" clause
Answer : ORA-12704: character set mismatch
Addr2 = varchar
but I found the problem :
I had to replace the '.' in to n'.' to indicate the characterset :(
(a typical Oracle messy way to solve thing....)
Thanks for all your time and help
Murphey
DB2 rulez
Random Solutions
Help me find a Dual DVI low profile video card with bracket
How to select only odd or even rows from a table in Mysql
How do I pass a request to Google Map from a .NET application?
How do you tell if valid LOB indicator? ORA-22275
How To Run an Excel Application from VB.Net
Crystal Reports database security
What's wrong with this SQL?
ASP.Net : Determine the currently logged on user's UserId value - Cannot insert the value NULL into column 'UserId',
How To Locate Items Displayed In The Immediate Window Dialog Box of Visual Studio Express 2008
Powershell - Comparison Operators with Multiple Values