ORA-12704 CHARACTER SET MISMATCH ( ORACLE PL/SQL )
<p>i'm getting the ora-12704 error for the pl/sql query below - can anyone help point me in the right direction for a solution please?</p>

<pre><code>SELECT "STAT"."ORD"."SAMPLEID",

MAX(CASE WHEN "STAT"."ORDANAEL"."MC"='QAERS' THEN "STAT"."ORDANAEL"."RES_TXT" ELSE 

'' END)  AS ERSID,

"STAT"."ORDMCSTP_V"."SEQNB", "STAT"."ORD"."ORDPATNAME", 

"STAT"."ORD"."ORDPATBIRTHDT", "STAT"."ORD"."CORORDNB", "STAT"."ORD"."PROJNB",

Max(CASE WHEN "STAT"."ORDANAEL"."MC"='AMMOL' THEN 'AMMOL' 

WHEN "STAT"."ORDANAEL"."MC"='AMMOLR' THEN 'AMMOLR' ELSE '' END) AS TEST, 


Max(CASE WHEN "STAT"."ORDANAEL"."MC"='AMMOL' THEN "STAT"."ORDRESMCEL"."MC_RES"

WHEN "STAT"."ORDANAEL"."MC"='AMMOLR' THEN "STAT"."ORDRESMCEL"."MC_RES" ELSE '' 

END) AS MC_RES, 



Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMIMI' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END) AS IMI, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMIMP' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS IMP, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMNDM' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS NDM, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMOX48' THEN 

"STAT"."ORDMCSTPEL"."RES" ELSE '' END)  AS OXA48, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMSPM' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS SPM, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMVIM' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS VIM, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMDIM' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS DIM, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMKPC' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS KPC, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMGES' THEN"STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS GES, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMSME' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS SME, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMFRI1' THEN 

"STAT"."ORDMCSTPEL"."RES" ELSE '' END)  AS FRI1, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMSIM' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS SIM, 

Max( CASE WHEN "STAT"."ORDMCSTP_V"."STEPMC"='AMGIM' THEN "STAT"."ORDMCSTPEL"."RES" 

ELSE '' END)  AS GIM,



Max( CASE WHEN "STAT"."ORDANAEL"."MC"='AMMOL' THEN "STAT"."ORDANAEL"."VALMED" ELSE 

'' END)  AS VALMED_AMMOL, 

Max( CASE WHEN "STAT"."ORDANAEL"."MC"='AMMOL' AND 

"STAT"."ORDANAEL_D"."DFIELD"='RR' THEN "STAT"."ORDANAEL_D"."DVALUE" ELSE '' END)  

AS RPT_DT_AMMOL, 

"STAT"."ORDANAEL"."RES_ST" 



FROM (("STAT"."ORDMCSTPEL" INNER JOIN ("STAT"."ORDMCSTP_V" INNER JOIN 

("STAT"."ORD" INNER JOIN "STAT"."ORDANAEL" ON ("STAT"."ORD"."LID" = 

"STAT"."ORDANAEL"."LID") AND ("STAT"."ORD"."LPERIOD" = 

"STAT"."ORDANAEL"."LPERIOD") AND ("STAT"."ORD"."ORDNB" = 

"STAT"."ORDANAEL"."ORDNB")) ON ("STAT"."ORDMCSTP_V"."LID" = "STAT"."ORD"."LID") 

AND ("STAT"."ORDMCSTP_V"."LPERIOD" = "STAT"."ORD"."LPERIOD") AND 

("STAT"."ORDMCSTP_V"."ORDNB" = "STAT"."ORD"."ORDNB")) ON ("STAT"."ORDMCSTPEL"."BC" 

= "STAT"."ORDMCSTP_V"."BC") AND ("STAT"."ORDMCSTPEL"."CURRENT_STEPNB" = 

"STAT"."ORDMCSTP_V"."CURRENT_STEPNB")) INNER JOIN "STAT"."ORDANAEL_D" ON 

("STAT"."ORDANAEL"."NBINT" = "STAT"."ORDANAEL_D"."DNBINT") AND 

("STAT"."ORDANAEL"."SPSEQ" = "STAT"."ORDANAEL_D"."DSPSEQ") AND 

("STAT"."ORDANAEL"."ORDNB" = "STAT"."ORDANAEL_D"."DORDNB") AND 

("STAT"."ORDANAEL"."LPERIOD" = "STAT"."ORDANAEL_D"."DLPERIOD") AND 

("STAT"."ORDANAEL"."LID" = "STAT"."ORDANAEL_D"."DLID")) INNER JOIN 

"STAT"."ORDRESMCEL" ON ("STAT"."ORDMCSTP_V"."SEQNB" = "STAT"."ORDRESMCEL"."SEQNB") 

AND ("STAT"."ORDANAEL"."ORDNB" = "STAT"."ORDRESMCEL"."ORDNB") AND 

("STAT"."ORDANAEL"."LPERIOD" = "STAT"."ORDRESMCEL"."LPERIOD") AND 

("STAT"."ORDANAEL"."LID" = "STAT"."ORDRESMCEL"."LID")





WHERE (("STAT"."ORD"."LID")='H1')

AND (("STAT"."ORD"."LPERIOD")&gt;'5200') 

AND (("STAT"."ORD"."PROJNB")='ACPOERS')



GROUP BY "STAT"."ORD"."SAMPLEID", "STAT"."ORDMCSTP_V"."SEQNB", 

"STAT"."ORD"."ORDPATNAME", "STAT"."ORD"."ORDPATBIRTHDT", "STAT"."ORD"."CORORDNB", 

"STAT"."ORD"."PROJNB", "STAT"."ORDANAEL"."RES_ST"
HAVING ((("STAT"."ORDMCSTP_V"."SEQNB") Is Not Null) AND (("STAT"."ORD"."PROJNB")

='ACPOERS') AND (("STAT"."ORDANAEL"."RES_ST")&gt;'4'))
</code></pre>