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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-12-14 : 07:52:06
|
| Lee-Anne writes "HI,i have looked but can not seem to find how to write this stored procedurei have one database called FNF (orders tables)the other called BMS (workforce tables)what i need to do is write a stored procedure that looks at both the databases.can this be done.thanksLee-Anne" |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-12-14 : 07:56:31
|
Hi Lee-Anne, Welcome to SQL Team!Something like:SELECT Col_A, Col_BFROM FNF.dbo.MyOrdersTable AS O JOIN BMS.dbo.MyWorkForceTable AS WF ON WF.MyPKColumn = O.MyPKColumn Kristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-14 : 07:59:40
|
Also use Alias names in the ColumnsSELECT O.Col_A, WF.Col_BFROM FNF.dbo.MyOrdersTable AS O JOIN BMS.dbo.MyWorkForceTable AS WF ON WF.MyPKColumn = O.MyPKColumn MadhivananFailing to plan is Planning to fail |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-12-14 : 08:01:43
|
| "Also use Alias names in the Columns"Good plan! Thanks MaddyKristen |
 |
|
|
|
|
|