- Jun 1, 2000
- 6,551
- 40
- 91
I am playing around with MS SQL Server Dev Edition SP2.
What is wrong with this query:
select * from
(select * from adventureworks.person.contact)
it throws the error:
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ')'.
but if i give it a correlation name it works fine:
select * from
(select * from adventureworks.person.contact) as x
Yes this is a useless query (its just an example) and i could accomplish many of the things I want to do with the proper joins and unions, but i need to do some quick and dirty data validation. As far as I remember this kind of thing worked fine in Oracle.
What is wrong with this query:
select * from
(select * from adventureworks.person.contact)
it throws the error:
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ')'.
but if i give it a correlation name it works fine:
select * from
(select * from adventureworks.person.contact) as x
Yes this is a useless query (its just an example) and i could accomplish many of the things I want to do with the proper joins and unions, but i need to do some quick and dirty data validation. As far as I remember this kind of thing worked fine in Oracle.
