Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
i have 3 tablestable 1 ec_build Phone_buildbuild_idbuild startbuild endbuild finishuser_namebuild_nametable 2 uniq_usersuser_iduser_nametable 3 batch_recordsrecord_idjob_idstart_timefinish_timeuser_namenow 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.
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.
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