Conversion of oracle query into teraadata query(Row id is not working)

Database
Enthusiast

Conversion of oracle query into teraadata query(Row id is not working)

Hi All,

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

table1.rowid=table2.max_rowid

Please help me ASAP, it would be appriciate for your immediate responce.

1 REPLY
Junior Contributor

Re: Conversion of oracle query into teraadata query(Row id is not working)

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

Dieter