Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
paomeow
Starting Member
5 Posts |
Posted - 2005-01-11 : 22:21:43
|
| Can anyone please advice me if this is optimized enough?(Select Top 1 from Table1 where col1 = 12)Union ALL(Select Top 1 from Table1 where col1 = 13)Thanks in advance. |
|
|
paomeow
Starting Member
5 Posts |
Posted - 2005-01-11 : 23:59:03
|
Also this doesn't seem to work because it didn't get the top most record with the date:Select * from(Select Top 1 * from Table1 where col1 = 12order by postdateUnion ALLSelect Top 1 * from Table1 where col1 = 13order by postdate) |
 |
|
|
paomeow
Starting Member
5 Posts |
Posted - 2005-01-12 : 00:14:55
|
| solved the 2nd question by adding a select statement wrapped around individual queries.... |
 |
|
|
|
|
|