Re: Error: ORA-00911: invalid character
From: Norman Dunbar <oracle_at_dunbar-it.co.uk>
Date: Fri, 11 Mar 2016 16:24:34 +0000
Message-ID: <56E2F142.1070002_at_dunbar-it.co.uk>
Hi Zabair,
Date: Fri, 11 Mar 2016 16:24:34 +0000
Message-ID: <56E2F142.1070002_at_dunbar-it.co.uk>
Hi Zabair,
On 11/03/16 15:38, Zabair Ahmed wrote:
> , 'select count(*) from '||tname||' where last_modified < sysdate - '
> ||P_Days|| ';'
Change the above line to
, 'select count(*) from '||tname||' where last_modified < sysdate - ' ||P_Days
And it should be fine. I'm away from my databases at the moment, so untested, but when "executing immediate" you don't put a semi-colon in the SQL statement, only after the execute immediate statement.
HTH
Cheers,
Norm.
-- Norman Dunbar Dunbar IT Consultants Ltd Registered address: 27a Lidget Hill Pudsey West Yorkshire United Kingdom LS28 7LG Company Number: 05132767 -- http://www.freelists.org/webpage/oracle-lReceived on Fri Mar 11 2016 - 17:24:34 CET