I am using SQL Server Compact Edition as database for my Windows Application. I am having a problem while using ISNULL
. I wrote a query
SELECT
ISNULL(MAX(TransactionID) + 1, 100) AS TransactionId
FROM
TBLTransactionMain
But this query returns only true or false. Is there anything I can do to get the same result as in SQL Server 2008?
You need to use coalesce http://technet.microsoft.com/en-us/library/ms174075.aspx
The syntax is the same as the isnull.