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.
| Author |
Topic |
|
drm_mmon
Starting Member
6 Posts |
Posted - 2007-08-08 : 12:29:17
|
| Hello Friends,1) I have a table and column names areExecutiveidcompanynamepositiontitlestart dateenddateI want to see all executives who worked for more than 1000 days in one job. I am not sure but may be i need to use datediff function.i have 3 tables and i have to use joinstable 1 executiveexecutiveidfirstnamelastnamecompanyidtable2 companycompanyidcompanynamesalescurrencycodetable3 currencycurrencycodedescriptionhow am i supposed to join 3 tables. i know how to give joins on 2 tables.Your help will be greatly appreciated. Thanks |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-08-08 : 12:33:29
|
| 1. where datediffd, startDate, enddate) > 10002. 3 joins are same as 2 joins:select...from table1 t1 join table2 t2 on t1.id = t2.idjoin table3 t3 on t2.id = t3.idwhere ..._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
drm_mmon
Starting Member
6 Posts |
Posted - 2007-08-08 : 12:42:25
|
| Thank You Spirit1. Appreciate it. |
 |
|
|
|
|
|