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
 joining?

Author  Topic 

rds207
Posting Yak Master

198 Posts

Posted - 2009-08-12 : 13:54:47
i have 3 tables
table 1 ec_build
Phone_build
build_id
build start
build end
build finish
user_name
build_name
table 2 uniq_users
user_id
user_name
table 3 batch_records
record_id
job_id
start_time
finish_time
user_name

now i want to get build and job details together like for a particulra phone build what is the build name,build start and stop,what is the job name,job start time,job finish time.......

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-08-12 : 14:10:18
How are table1 and 3 related?
EDIT : Please provide some sample data and expected output for a quicker solution.
Go to Top of Page

rds207
Posting Yak Master

198 Posts

Posted - 2009-08-12 : 14:59:09
THE FEILD I HAVE IN COMMON IS USER_NAME

quote:
Originally posted by vijayisonly

How are table1 and 3 related?
EDIT : Please provide some sample data and expected output for a quicker solution.

Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-08-12 : 15:28:47
Cant really tell without sample data and expected output...but maybe this?

SELECT a.build_name, 
a.build_start,
a.build_end,
b.job_id,
b.start_time,
b.finish_time
FROM ec_build a
INNER JOIN batch_records b
ON a.user_name = b.user_name
Go to Top of Page
   

- Advertisement -