Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

how to convert the following query to sql server 2005

$
0
0

hi

i have the following query in ms access and i want to convert it into sql server 2005 express edition

SELECT iif(Max(BNo) is null,1,Max(BNo)+1) AS BNo from (

SELECT iif(Max(Product.BNo) is null,0,Max(Product.BNo)) AS BNo FROM Product

union all SELECT iif(Max(grndetail.BNo) is null,0,Max(grndetail.BNo)) AS BNo FROM grndetail

UNION ALL SELECT iif(Max(srdetail.BNo) is null,0,Max(srdetail.BNo)) AS BNo FROM srdetail ) as t

how to do this

Viewing all articles
Browse latest Browse all 23857

Trending Articles



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