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
 General SQL Server Forums
 New to SQL Server Programming
 Need Help Accessing Data From Tables

Author  Topic 

msw1090
Starting Member

1 Post

Posted - 2010-04-01 : 20:43:52
Hello,

For an internship challenge, I've been tasked to take a table of data values in SQL, collect certain values, then create a new table.

Basically there are three tables: USERS, CAR_LEND, and and CARS. USERS contains the first names, last names, and user ID's of workers at this fictitious company, CAR_LEND contains users ID's alongside the vehicle ID they are currently using, and CARS has the vehicle ID alongside make and model number for cars.

How exactly would I go about creating a new table that had 3 rows for the 3 employees, with 4 columns for make, color, and employee first and last names?

Sorry if that doesn't make too much sense. I'll try and revise my question if it's not very clear. I've never worked with SQL before so I'm not sure how to start.

Thanks!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-02 : 02:11:53
you need a simple inner join with tables on common fields and then you will get required result. Read about JOINs in BOL and try it out and come here if you face any problem, we will help you out.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -