dirai Posted May 16, 2011 Share Posted May 16, 2011 Hi Forum,Please help me to resolve the problem mentioned in the attached report. A.S.A.P. I guess there is some problem with the input parameters I am passing to this report.Dipak.Code:Caused by: java.sql.SQLException: ORA-00911: invalid character Link to comment Share on other sites More sharing options...
doru_voinea Posted May 16, 2011 Share Posted May 16, 2011 Check and remove the semicolon at the end of SQL or a the comments (-- /**/) at begin Link to comment Share on other sites More sharing options...
dirai Posted May 16, 2011 Author Share Posted May 16, 2011 Hi Doru,I did and that works. Can you have a look with this query and let me know what's wrong: /************************************************ *//* MC30 - Stock Check Audit Report *//* *//* REBELJ01 11-APR-2011 ORIGINAL QUERY Written for *//* Swindon RDC Project. *//* *//************************************************ */SELECT itl.site_id, itl.sku_id, itl.location_id, TO_CHAR(MAX(dstamp), 'DD-MON-YYYY') latest_check_date, COUNT(1) total_stock_checksFROM (SELECT itl_current.site_id, itl_current.from_loc_id location_id, itl_current.sku_id, itl_current.dstamp FROM inventory_transaction itl_current WHERE itl_current.code = 'Stock Check' AND itl_current.site_id = NVL($P{site_id}, itl_archive.site_id) AND itl_current.dstamp >= to_timestamp_tz($P{fromdate},'DD-MON-YYYY') AND itl_current.dstamp <= to_timestamp_tz($P{todate},'DD-MON-YYYY') UNION SELECT itl_archive.site_id, itl_archive.from_loc_id location_id, itl_archive.sku_id, itl_archive.dstamp FROM inventory_transaction_archive itl_archive WHERE itl_archive.code = 'Stock Check' AND itl_archive.site_id = NVL($P{site_id}, itl_archive.site_id) AND itl_archive.dstamp >= to_timestamp_tz($P{fromdate},'DD-MON-YYYY') AND itl_archive.dstamp <= to_timestamp_tz($P{todate},'DD-MON-YYYY') )itlGROUP BY itl.site_id, itl.sku_id, itl.location_idORDER BY 1,2 Link to comment Share on other sites More sharing options...
dirai Posted May 16, 2011 Author Share Posted May 16, 2011 Duro, Please leave it. It is because of multiple table definition in the same query. Sorry!: ) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now