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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to use the UNION operator

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-24 : 19:16:53
Curious writes "In SQL Server 7, Query Analyzer, T-SQL Help, there's no example given in the online help for the UNION operator.

According to the online help, all rows of all queries are put into a single result set.

Is there any practical example of this UNION operator? Can it be used, using your structure of the forum table in the article "SQL for Threaded Discussion Forums" (http://www.sqlteam.com/item.asp?ItemID=1353), to determine the highest numerical value of a PostId for the most recent PostDate, I can't seem to construct the necessary SQL statement.

Do I need to use the UNION operator or something else(IN, EXISTS, etc...)?

Sounds simple, doesn't it?"
   

- Advertisement -