On Mar 28, 3:19=A0pm, Ubiquitous <web...@[EMAIL PROTECTED]
> wrote:
> Is there a way to force a static row in a SELECT statement?
>
> For example, I have a SELECT statement which is a UNION of two identical
> tables, "A" and "B". How would one create a column which identifies the
so=
urce
> table?
>
> TABLE NAME REC#
> ----- ---- ----
> A =A0 =A0 Bob =A0001
> A =A0 =A0 Tim =A0002
> B =A0 =A0 Joe =A0001
> A =A0 =A0 Sue =A0003
This should work:
Select 'A' as 'TABLE', name, recno
from a
UNION
select 'B' as 'TABLE', name, recno
from b


|