I am getting the "Invalid character constant" due to single quot in java sql string, i need double quote which i have put in single quote
new StringBuffer("SELECT REPLACE(u.nombre,',',' ') as Organizacion, ")
.append(" CONCAT(' " ',REPLACE(s.direccion,',',' '),'"') as Street, '""' as Street2,")
You have to escape quotes in java string literals :
.append(" CONCAT('\"',REPLACE(s.direccion,',',' '),'\"') as Street, '\"\"' as Street2,")
You want to add "
in the string but the problem is you did not escape it causing to break the whole string.
You need to escape it using \
, ex.
" CONCAT('\"',REPLACE(s.direccion,',',' '),'\"') as Street, '\"\"' as Street2,"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With