Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: UNION: Selecting from multiple tables in one statement
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 07/31/2000 :  17:00:42  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
Rick writes "I am trying to design an ASP page that allows the user to input one or more parameters to search on. When they click on submit, I need to build a SQL statement that reflects their desired choices. The information they can search on, is spread across multiple tables." We'll cover the UNION statement which allows you to join multiple select statements together.

Article Link.

Starting Member

0 Posts

Posted - 02/27/2001 :  11:01:17  Show Profile  Reply with Quote
Using UNION to join tables

I am able to search across several tables using a UNION join, but why dose this not work with a "WHERE something LIKE '%keyword%'" clause?

Go to Top of Page

Starting Member

1 Posts

Posted - 03/21/2002 :  16:01:45  Show Profile  Reply with Quote
Hi, I am trying to do so with an Access db, and appears to fail.
Is that "adding extra fields in a query" an SQL Server exclusive feature?

If so, how could I retrieve each record's original table in a multiple UNION clause?

I mean:

SELECT name , id FROM table1
SELECT name.....


John - Table1
Peter - Table3
Nicholas - Table2

Thank you

Go to Top of Page

Starting Member

8 Posts

Posted - 07/25/2011 :  02:24:10  Show Profile  Visit Piyush's Homepage  Reply with Quote
Difference between Union and Union All?
SQL Server- Union and Union All…’s not the same stuff…

Piyush Bajaj
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000