I have an issue while converting oracle query into teradata.below is the oracle query,
select table1.productid,table2.productid,table2.max_rowid from table1,table2
where table1.productid=table2.productid and
Please help me ASAP, it would be appriciate for your immediate responce.
What is this query supposed to return?
Seems to be a single row per productid, but as ROWID without unique ordering is not reliable there's no guarantee for a consistent result set.
Or are table1 and table2 Derived Tables (Oracle calls them Inline Views) of the same table?
Then it's probably a simple
select * from tab
qualify row_number() over (partition by productid order by whatever_defined_max_rowid desc) = 1