Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Joins... PLEASE HELP!!!!

Status
Not open for further replies.

aaaaaaa2000

Programmer
Dec 26, 2004
1
US
I have two tables, one for employees and one for customers.

Customer Employee
---------- ---------
CustomerID [PK] EmployeeID [PK]
Name Name
Contact ..
.. Password
Password
Note

Both of these tables have many columns in them but the important ones are the EmployeeID, CustomerID and the Passwords.

I need to make a view(query, custom view) so that All of the Customer IDs and EmployeeIDs would be together in one column and all of their passwords would be in another column.

As a result I will have a two columned table with all Usernames(IDs) and Passwords


Please answer asap. I really need this right away.
Thanks for your time
 

Code:
SELECT name, password
FROM Customer

UNION ALL

SELECT name, password
FROM Employee

ORDER BY name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top