hi
i have the following query in ms access and i want to convert it into sql server 2005 express edition
how to do thisSELECT 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