I have a table with 2 fields:
I have to display the fields in one column
If idNo is null then I want to show the passport number in the column but if neither passport or idNo are null then I want to show the idNo.
I tried the following select query but it only works if both fields are numeric and i can't change the data type for one of the fields as it will coz huge problems:
(case when idno is null then passport else idno end) as sid
How can I make it work?