SQL SYNTAX ON ORACLE SQL DEVELOPER [message #471944] |
Wed, 18 August 2010 00:37 |
ayubx
Messages: 4 Registered: August 2010
|
Junior Member |
|
|
Hi all ,
I am having an issue with the following query in Oracle SQL Developer connected to a SQL SERVER 2000 database ,
declare @loc varchar(4);
declare @logdate varchar(12);
set @loc = (select value from pg_system_config_det where name = 'LocationID')
set @logdate = '10-aug-10'
select
sum(LocalCurrency_Amount),
c.logical_date,
c.OpenAccount_Time,
c.CloseAccount_Time,
t.batch_no,
c.location_id
from
pg_cashier_login_det c ,
pg_trans_tender_det t
where
c.location_id = @loc
and c.logical_date = @logdate -- and '29-nov-09'
and t.location_id = c.location_id
and c.Cashier_login_id = t.Cashier_login_id
group by c.logical_date,c.location_id, t.batch_no,c.OpenAccount_Time,c.CloseAccount_Time
order by c.logical_date asc
Error messages
"Error starting at line 1 in command:"
and
"Invalid JDBC escape syntax at line position 19 '=' character expected"
This query works fine on MS SQL Query analyzer. I am not facing any issue with queries without variable declaration on SQL Developer. what could be wrong ?
Thanks
|
|
|
|
|
|
|
|
|