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 |
|
snufse
Constraint Violating Yak Guru
469 Posts |
Posted - 2008-01-24 : 15:45:46
|
| Not sure if this is possible, here is the scope:I have a vb program that calls a sp. My vb program connects to DataSource1, Catalog1 and to DataSource2, Catalog2. My sp resides in Catalog1 using a table from catalog1 and a table from catalog2.Is this possible to do? |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-01-24 : 15:53:14
|
| yes. use 3 or 4 part naming convention. serverName.dbName.schemaName.tableNameor dbName.schemaName.tableName_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out |
 |
|
|
snufse
Constraint Violating Yak Guru
469 Posts |
Posted - 2008-01-25 : 08:55:34
|
| Here is how I have qualified the path using 4 part naming in my sp:SELECT vgiwpw03-sql3/equentialprod.goLabor30.Batch.ReportDate AS job_dateI also tried this:SELECT 'vgiwpw03-sql3\equentialprod.' + goLabor30.Batch.ReportDate AS job_dateMy vb program gives me error when calling the sp:Invalid object name 'Batch'My server is VGIWPW03-SQL3\EQUENTIALPROD and database = goLabor30 and table = batch |
 |
|
|
|
|
|