So I was wondering how I can do this, I am using SQL Server Compact and need to do a specific thing.
I need to append a string to an int, resulting in a string if a column is not equal to a value
For example lets say I have this query here
SELECT id, Auto FROM example
Right now to get what I want I will have to do this select and then resolve it after like so
string id = dr["id"].ToString() +
dr["Auto"].ToString().IsNotNullOrWhitespace()
? " (Auto)" : "");
How can I get the same result in SQL? AS something like this
SELECT id ..... as id FROM example
(Auto is defined asINT NULL)