UNION in view in SQL7 (why does this work?)

UNION in view in SQL7 (why does this work?)

Post by Derek Course » Wed, 08 Mar 2000 04:00:00



My understanding with SQL 6.5 was that a UNION query was not permitted in a
view.

I recently installed MSDE/SQL7 to use with Access 2000.

As an experiment, I tried to create a view that included a UNION clause.  It
gave me an error saying that "UNION is not supported" but then it created
the view anyway, and it appears to work fine.

Has anyone had any experience with this in MSDE or in the full size SQL7?  I
need this view to do some crucial things, but I want to know that its not
going to blow up later in some way...

Thanks!

Derek

 
 
 

UNION in view in SQL7 (why does this work?)

Post by BPMargoli » Wed, 08 Mar 2000 04:00:00


Derek,

Views containing UNIONs were not supported **until** SQL Server 6.5. Beginning
with SS6.5, SQL Server has supported views containing UNIONs. SS7.0 continues
this support.

Perhaps you could post the DDL of your table schemas and the view so that we can
understand what caused the error message to appear.


Quote:> My understanding with SQL 6.5 was that a UNION query was not permitted in a
> view.

> I recently installed MSDE/SQL7 to use with Access 2000.

> As an experiment, I tried to create a view that included a UNION clause.  It
> gave me an error saying that "UNION is not supported" but then it created
> the view anyway, and it appears to work fine.

> Has anyone had any experience with this in MSDE or in the full size SQL7?  I
> need this view to do some crucial things, but I want to know that its not
> going to blow up later in some way...

> Thanks!

> Derek


 
 
 

1. Why no union in view select statement?

Can anybody tell me why it isn't possible to define a view over a union
of select statements on different tables? At least Informix 5.0 cannot
do that. Is it possible in Informix 7.0? What does the SQL standard have
to say about this topic?

        Rainer
--
Rainer Staringer

2. WWW database creation from HTML with FxHTML

3. Why is UNION not allowed in view creation?

4. Access97, VB6, & pictures

5. Why can't ASE use a UNION in a VIEW definition ** YOU CAN **

6. North Carolina-Oracle Systems Analyst/Programmer

7. Union works, but not as view?

8. How delete data from Sqlsserver datbase

9. sort a union, view of union

10. UNION and UNION ALL working backwards?????

11. why SQL7 Schedule backup doesn't work?

12. Why does data syncronization no longer work after upsize to SQL7