![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
This (demo) statement is fine in Access, and so far as I can see, should be OK in SQL Server. But Enterprise Manager barfs at the final bracket. Can anyone help please? select sum(field1) as sum1, sum(field2) as sum2 from (SELECT * from test where id < 3 union SELECT * from test where id > 2) In fact, I can reduce it to :- select * from (SELECT * from test) with the same effect - clearly I just need telling :-) |
#2
| |||
| |||
|
|
This (demo) statement is fine in Access, and so far as I can see, should be OK in SQL Server. But Enterprise Manager barfs at the final bracket. Can anyone help please? select sum(field1) as sum1, sum(field2) as sum2 from (SELECT * from test where id < 3 union SELECT * from test where id > 2) In fact, I can reduce it to :- select * from (SELECT * from test) with the same effect - clearly I just need telling :-) cheers, Jim |
![]() |
| Thread Tools | |
| Display Modes | |
| |