Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL query help
Sorry my mistake. Original query is
query1:
SELECT Client_Structure_Version.CLIENT_STRUCTURE_ID, FIELD_NAME,
FIELD_TYPE, FIELD_WIDTH, FIELD_ORDER FROM Client_Structure_Version Inner Join Client_Structure ON Client_Structure_Version.Client_Structure_ID = Client_Structure.Client_Structure_ID WHERE Client_ID = 556 AND effective_date = ( SELECT MAX(Effective_Date) FROM Client_Structure_Version WHERE Client_ID = 556) AND discontinue_date IS NULL ORDER BY client_structure_record_id,FIELD_ORDER
query 2:
select distinct * from (
SELECT Client_Structure_Version.CLIENT_STRUCTURE_ID, FIELD_NAME,
FIELD_TYPE, FIELD_WIDTH, FIELD_ORDER FROM Client_Structure_Version Inner Join Client_Structure ON Client_Structure_Version.Client_Structure_ID = Client_Structure.Client_Structure_ID WHERE Client_ID = 556 AND effective_date = ( SELECT MAX(Effective_Date) FROM Client_Structure_Version WHERE Client_ID = 556) AND discontinue_date IS NULL ORDER BY client_structure_record_id,FIELD_ORDER)
Thanks Received on Wed Aug 23 2006 - 10:44:53 CDT