My source is XML file and I am doing lookup to pull the ID joining the creation date but I need to get the max(ID) and when I am trying to use this User-defined query from RDMS stage its not working..................
SELECT Max(schema.tblname.DocumentID),schema.tblname.Created
FROM schema.tblname
WHERE schema.tblname.Created=?
This query I am giving in lookup table.
Its a SQL server DB.
Thanks,
Lookup stage
Moderators: chulett, rschirm, roy
Re: Lookup stage
If you're using Max you need to group by the schema.tblname.Createdshilpa79 wrote:My source is XML file and I am doing lookup to pull the ID joining the creation date but I need to get the max(ID) and when I am trying to use this User-defined query from RDMS stage its not working..................
SELECT Max(schema.tblname.DocumentID),schema.tblname.Created
FROM schema.tblname
WHERE schema.tblname.Created=?
This query I am giving in lookup table.
Its a SQL server DB.
Thanks,
Code: Select all
SELECT Max(schema.tblname.DocumentID),schema.tblname.Created
FROM schema.tblname
WHERE schema.tblname.Created=?
group by schema.tblname.Created
Regards,
Nick.
Nick.