Hi,
I'm trying to run following query in sqllite,
select
a.extract_sequence,a.file_location,a.active,b.start_date,b.end_date,b.po
rtfolio_code,c.status
from extract_master a,
extract_parameter b,
( select
extract_sequence,status,user_id
from extract_status e
where datetime = (select
max(datetime)
from
extract_status s
where
e.extract_sequence = s.extract_sequence)
) c
where a.extract_sequence =
b.extract_sequence
and b.extract_sequence =
c.extract_sequence
and c.extract_sequence =
a.extract_sequence
And it gives me an error saying "e.extract_sequence" does not exist".
Then I tried writing the same query using a different syntax,
select
a.extract_sequence,a.file_location,a.active,b.start_date,b.end_date,b.po
rtfolio_code,c.status
from extract_master a,
extract_parameter b,
( select extract_sequence,status,user
from extract_status e
where (extract_sequence,datetime)
in (select extract_sequence,max(datetime)
from extract_status
group by extract_sequence )
) c
where a.extract_sequence =
b.extract_sequence
and b.extract_sequence =
c.extract_sequence
and c.extract_sequence =
a.extract_sequence
But, unfortunately this does not work either and gives an error [syntax
error near "," ] in the above line.
Please let me know if there is anyother way to achieve this in SQLite.
Regards
Ajay
THE INFORMATION CONTAINED IN THIS MESSAGE AND ANY ATTACHMENT MAY BE PRIVILEGED,
CONFIDENTIAL, PROPRIETARY OR OTHERWISE PROTECTED FROM DISCLOSURE. If the reader
of this message is not the intended recipient, you are hereby notified that any
dissemination, distribution, copying or use of this message and any attachment
is strictly prohibited. If you have received this message in error, please
notify us immediately by replying to the message and permanently delete it from
your computer and destroy any printout thereof.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------