Please look at the following simple query:
Select CustomerID
From Customers c
Where c.CustomerId = "1234"
I want to write similar query that does the following:
Always return 2 columns with constant string instead of CustomerID in this structure:
If value was found then return 2 columns:
Found Value in DB, CustomerId
Else return:
Didn't found value in DB, CustomerId
How can I do that? Especially in Microsoft compact SQL server limited syntax…
Best Answer
Derived tables and Case statements are supported in SQL CE, so you can use this script
for reference check what can and what cannot be used in SQL CE