truncating a table from inside an application
716610Oct 28 2009 — edited Oct 28 2009Hi all,
Got a new problem to tackle. I am creating an application to calculate a very complex production bonus based on alot of different variables...
I am working through retrieving all the data and created an apex temp table called site_bonus. I dump all the retireved values I get from Oracle for attendance, SIT data on discipline etc into the temp table as a count of number of occureneces to start the calculation of the bonus factors - here's the gotcha.....
Prior to dumping the new run data into the temp table I want to truncate the table to remove anyprevious run data so that I dont get duplicate records cuased by a previous run. I created an on demand application process that basically does the following:
truncate table "SITE_BONUS" /
( I basically copied it right from SQL workshop inside apex,by retrieving the SQL fromthe table truncate process where it works....
When I run it anywhere inside my page as an on demand process It fails with the following error:
ORA-06550: line 1, column 16: PLS-00103: Encountered the symbol "TABLE" when expecting one of the following: := . ( @ % ; The symbol ":= was inserted before "TABLE" to continue.
Error
OK
I have tried it as a plsql process, an on demand process....and I get teh same error from any page inside my app and I cant figure out why I can do this from SQL worksop but cant call it from a page within my app.....
Any ideas?
Edited by: DSULLIVAN on Oct 28, 2009 3:13 PM - I corrected the typo