BusinessObjects Board

Error in sql script

WHEN i try to run this query data integrator

SQL(‘CM_DS’,'DELETE from DWH_HROLES_FULL '||
'WHERE MANDT = $G_MANDNT ’ ||
‘AND MONTH = TO_CHAR(TO_DATE($G_DATE_INI,‘YYYY.MM.DD’),‘MM’)’ ||
‘AND YEAR = $G_YEAR_FIN’);

SHOW THIS ERROR

1466476 1 RUN-050304 01/06/2011 10:03:42 a.m. TO_CHAR($G_DATE_INI,‘MM’)AND YEAR = $G_YEAR_FIN ) > failed, due to error <70301>: <Oracle <BO_EBD> error message for operation
1466476 1 RUN-050304 01/06/2011 10:03:42 a.m. : <ORA-00911: invalid character


jgalvanhdz (BOB member since 2010-12-16)

Have you used the square brackets?

‘AND MONTH = TO_CHAR(TO_DATE([$G_DATE_INI],‘YYYY.MM.DD’),‘MM’)’


rbowie (BOB member since 2005-10-03)

Hi can you try this:

SQL(‘CM_DS’,'DELETE from DWH_HROLES_FULL '||
'WHERE MANDT = $G_MANDNT ’ ||
‘AND MONTH = TO_CHAR(TO_DATE($G_DATE_INI,‘YYYY.MM.DD’),‘MM’)’ ||
‘AND YEAR = $G_YEAR_FIN’);


chaithu23 (BOB member since 2011-03-25)


Werner Daehn :de: (BOB member since 2004-12-17)

thanks for your help

the problem was fixed

thanks


jgalvanhdz (BOB member since 2010-12-16)