We are converting from Db2 to SQL Server 2008. In Db2, my program returns -811 as SQL code if my Select query returns multiple rows. How do I get the same or similar return code in SQL Server 2008. Currently as I found, SQL server returns 0 and fetches first record if there are multiple rows. There is no inforamtion or hint that would say there are multiple rows. My program has special logic if there are multiple rows and now that logic doestn work because SQL server 2008 doesnt tell the error.