|
Hallo Alle zusammen,
In einer SQL-Server View m�chte ich zwei Tabellen mit UNION verbinden. Mein
Problem ist, das ich nicht wei� ob die 2te Tabelle auch wirklich da ist. Wenn
NEIN reicht ein einfaches select. Als Proc l�uft das, aber ich brauch's als
View.
IF EXISTS (SELECT table_name FROM
information_schema.tables
WHERE TABLE_NAME = 'Gbkmut_shadow') SELECT * From [dbo].[Gbkmut] UNION SELECT * FROM
[dbo].[Gbkmut_shadow]
else
SELECT * From [dbo].[Gbkmut]
GO
Bescheidene Frage: Warum funzt das nicht als View?
Was ist falsch?
Viele Gr��e von der K�ste
Andreas |
