Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8635

Re: Using LIMIT 1 instead of TOP 1 in subquery

$
0
0

Appears like both TOP & LIMIT are not supported.

 

You can try using the RANK or ROW_NUMBER option shown in the SAP Note 1885029.

 

Something like,

 

select

field1,

field2,

(select PROFIT_CTR (select PROFIT_CTR, rank() over (order by COMP_CODE) rnk from "MySchema"."MyTable" where COMP_CODE = '1234') WHERE rnk <= 1 as PC)

from "MySchema"."OtherTable" where....

etc

 

Thanks,


Viewing all articles
Browse latest Browse all 8635

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>