What about:
SELECT
A,
B,
COALESCE(C, 'some value here')
FROM
MyTable
Greetings.
Walter.
On Tue, Oct 10, 2017 at 2:56 PM, 'Daniel Miller' dmil...@amfes.com
[firebird-support] wrote:
>
>
> I don't think you could express it in the SELECT directly
I don't think you could express it in the SELECT directly (someone else
will probably build a statement refuting that) but you could do:
SELECT r.RDB$FIELD_NAME FROM RDB$RELATION_FIELDS r where
r.RDB$RELATION_NAME=
and then process that result set to build your appropriate SELECT for
the
> Is there a way to include a column in a SELECT but substitute a value if
> it doesn't? I need my code to work with different versions of my db schema.
>
> eg I want to SELECT A, B, C, ... but C might not exist.
>
> SELECT * would work of course, except it will fetch a bunch of columns I
>
Is there a way to include a column in a SELECT but substitute a value if
it doesn't? I need my code to work with different versions of my db schema.
eg I want to SELECT A, B, C, ... but C might not exist.
SELECT * would work of course, except it will fetch a bunch of columns I
don't need.