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 |
|
weazy
Starting Member
7 Posts |
Posted - 2006-06-08 : 13:12:44
|
| I have a dsn that defaults to database1. I have permissions on database2. How do I indicate in the query to use database2?I am currently using:$sql1 = "SELECT field FROM dbo.database2.table WHERE dbo.database2.table3.field = '". $field ."' AND dbo.database2.table3.field1 = dbo.database2.table4.field2";I get:Warning: odbc_exec(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'dbo.database2.table'., SQL state S0002 in SQLExecDirect inthanks. |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-06-08 : 14:24:46
|
| SELECT field FROM database2.dbo.table ...Kristen |
 |
|
|
weazy
Starting Member
7 Posts |
Posted - 2006-06-08 : 15:02:05
|
| thanks. |
 |
|
|
|
|
|