Showing posts with label 624ce800. Show all posts
Showing posts with label 624ce800. Show all posts

Sunday, March 25, 2012

Accessing Different Databases on Same Server with Dot Notation.

This is a multi-part message in MIME format.
--=_NextPart_000_000B_01C58C65.624CE800
Content-Type: multipart/alternative;
boundary="--=_NextPart_001_000C_01C58C65.624CE800"
--=_NextPart_001_000C_01C58C65.624CE800
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
BlankHello,
I'm using Query Analyzer and I'm trying to select from a table on = another database...
i.e..I'm on DB2 in query analyzer and this is what my query looks like
Select *
FROM DB1..Test1
But I'm getting an error
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'DB1.'.
This query worked on my local machine... Could it be a set-up issue on = a different server?
Thanks for any help,
Matt
--=_NextPart_001_000C_01C58C65.624CE800
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Blank
BODY {
MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #000000; = FONT-FAMILY: Arial, Helvetica
}
P.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; = FONT-FAMILY: Helvetica, "Times New Roman"
}
LI.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; = FONT-FAMILY: Helvetica, "Times New Roman"
}
Hello,
I'm using Query Analyzer and I'm trying to select from a = table on another database...

i.e..I'm on DB2 in query analyzer and this is what my query looks like

Select *
FROM DB1..Test1

But I'm getting an error

Server: Msg 170, Level 15, State 1, Line 2Line 2: Incorrect = syntax near 'DB1.'.

This query worked on my local machine... Could it be a = set-up issue on a different server?

Thanks for any help,
Matt
--=_NextPart_001_000C_01C58C65.624CE800--
--=_NextPart_000_000B_01C58C65.624CE800
Content-Type: image/gif;
name="Blank Bkgrd.gif"
Content-Transfer-Encoding: base64
Content-ID: <000601c58c86$e95b7ac0$bf01010a@.ssimedcorp.local.com>
R0lGODlhLQAtAID/AP////f39ywAAAAALQAtAEACcAxup8vtvxKQsFon6d02898pGkgiYoCm6sq2
7iqWcmzOsmeXeA7uPJd5CYdD2g9oPF58ygqz+XhCG9JpJGmlYrPXGlfr/Yo/VW45e7amp2tou/lW
xo/zX513z+Vt+1n/tiX2pxP4NUhy2FM4xtjIUQAAOw==
--=_NextPart_000_000B_01C58C65.624CE800--This is a multi-part message in MIME format.
--=_NextPart_000_0047_01C58C61.410F5F50
Content-Type: multipart/alternative;
boundary="--=_NextPart_001_0048_01C58C61.410F5F50"
--=_NextPart_001_0048_01C58C61.410F5F50
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
BlankTry specifying the object owner:
Select *
FROM DB1.dbo.Test1
-- Kevin Hill
President 3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your =questions
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message =news:%23IGqqbIjFHA.3704@.TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Query Analyzer and I'm trying to select from a table on =another database...
i.e..I'm on DB2 in query analyzer and this is what my query looks like
Select *
FROM DB1..Test1
But I'm getting an error
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'DB1.'.
This query worked on my local machine... Could it be a set-up issue =on a different server?
Thanks for any help,
Matt
--=_NextPart_001_0048_01C58C61.410F5F50
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Blank
BODY {
MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #000000; =FONT-FAMILY: Arial, Helvetica
}
P.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =FONT-FAMILY: Helvetica, "Times New Roman"
}
LI.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =FONT-FAMILY: Helvetica, "Times New Roman"
}
Try specifying the object owner:
Select *
FROM DB1.dbo.Test1
-- Kevin HillPresident 3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm">www.3nf-inc.com/NewsGroups=.htm
http://www.DallasDBAs.com/forum">www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
http://www.experts-exchange.com">www.experts-exchange.com - experts compete for points to answer your questions
"Matthew Beirn" wrote in =message news:%23IGqqbIjFHA.=3704@.TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Query Analyzer and I'm trying to select from a =table on another database...

i.e..I'm on DB2 in query analyzer and this is what my query looks = like

Select *
FROM DB1..Test1

But I'm getting an error

Server: Msg 170, Level 15, State 1, Line 2Line 2: Incorrect =syntax near 'DB1.'.

This query worked on my local machine... Could it =be a set-up issue on a different server?

Thanks for any help,
Matt

--=_NextPart_001_0048_01C58C61.410F5F50--
--=_NextPart_000_0047_01C58C61.410F5F50
Content-Type: image/gif;
name="Blank Bkgrd.gif"
Content-Transfer-Encoding: base64
Content-ID: <004201c58c8b$29df4cd0$be0a050a@.newbridgeis.com>
R0lGODlhLQAtAID/AP////f39ywAAAAALQAtAEACcAxup8vtvxKQsFon6d02898pGkgiYoCm6sq2
7iqWcmzOsmeXeA7uPJd5CYdD2g9oPF58ygqz+XhCG9JpJGmlYrPXGlfr/Yo/VW45e7amp2tou/lW
xo/zX513z+Vt+1n/tiX2pxP4NUhy2FM4xtjIUQAAOw==--=_NextPart_000_0047_01C58C61.410F5F50--|||This is a multi-part message in MIME format.
--=_NextPart_000_000D_01C58C6B.0831D500
Content-Type: multipart/alternative;
boundary="--=_NextPart_001_000E_01C58C6B.0831D500"
--=_NextPart_001_000E_01C58C6B.0831D500
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
BlankThanks for the help Kevin,
I actually tried that with no luck whatsoever..... Thanks for the =insight, I appreciate the feedback.
Matt
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message =news:%23r5pqsIjFHA.3300@.TK2MSFTNGP15.phx.gbl...
Try specifying the object owner:
Select *
FROM DB1.dbo.Test1
-- Kevin Hill
President 3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area =DBAs.
www.experts-exchange.com - experts compete for points to answer your =questions
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message =news:%23IGqqbIjFHA.3704@.TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Query Analyzer and I'm trying to select from a table on =another database...
i.e..I'm on DB2 in query analyzer and this is what my query looks =like
Select *
FROM DB1..Test1
But I'm getting an error
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'DB1.'.
This query worked on my local machine... Could it be a set-up =issue on a different server?
Thanks for any help,
Matt
--=_NextPart_001_000E_01C58C6B.0831D500
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Blank
BODY {
MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #000000; =FONT-FAMILY: Arial, Helvetica
}
P.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =FONT-FAMILY: Helvetica, "Times New Roman"
}
LI.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =FONT-FAMILY: Helvetica, "Times New Roman"
}
Thanks for the help Kevin,
I actually tried that with no luck whatsoever..... =Thanks for the insight, I appreciate the feedback.
Matt
"Kevin3NF" wrote in message news:%23r5pqsIjFHA.=3300@.TK2MSFTNGP15.phx.gbl...
Try specifying the object owner:

Select *
FROM DB1.dbo.Test1
-- Kevin HillPresident 3NF Consulting

http://www.3nf-inc.com/NewsGroups.htm">www.3nf-inc.com/NewsGroups=.htm

http://www.DallasDBAs.com/forum">www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.

http://www.experts-exchange.com">www.experts-exchange.com - experts compete for points to answer your questions


"Matthew Beirn" wrote in =message news:%23IGqqbIjFHA.=3704@.TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Query Analyzer and I'm trying to select from a =table on another database...

i.e..I'm on DB2 in query analyzer and this is what my query =looks like

Select *
FROM DB1..Test1

But I'm getting an error

Server: Msg 170, Level 15, State 1, Line 2Line 2: Incorrect =syntax near 'DB1.'.

This query worked on my local machine... Could it =be a set-up issue on a different server?

Thanks for any help,
Matt

--=_NextPart_001_000E_01C58C6B.0831D500--
--=_NextPart_000_000D_01C58C6B.0831D500
Content-Type: image/gif;
name="Blank Bkgrd.gif"
Content-Transfer-Encoding: base64
Content-ID: <000801c58c8c$8c800f40$bf01010a@.ssimedcorp.local.com>
R0lGODlhLQAtAID/AP////f39ywAAAAALQAtAEACcAxup8vtvxKQsFon6d02898pGkgiYoCm6sq2
7iqWcmzOsmeXeA7uPJd5CYdD2g9oPF58ygqz+XhCG9JpJGmlYrPXGlfr/Yo/VW45e7amp2tou/lW
xo/zX513z+Vt+1n/tiX2pxP4NUhy2FM4xtjIUQAAOw==--=_NextPart_000_000D_01C58C6B.0831D500--|||This is a multi-part message in MIME format.
--=_NextPart_000_0031_01C58C6C.45DE4B80
Content-Type: multipart/alternative;
boundary="--=_NextPart_001_0032_01C58C6C.45DE4B80"
--=_NextPart_001_0032_01C58C6C.45DE4B80
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
BlankAny Other Suggestions?......
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message =news:%23r5pqsIjFHA.3300@.TK2MSFTNGP15.phx.gbl...
Try specifying the object owner:
Select *
FROM DB1.dbo.Test1
-- Kevin Hill
President 3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area =DBAs.
www.experts-exchange.com - experts compete for points to answer your =questions
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message =news:%23IGqqbIjFHA.3704@.TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Query Analyzer and I'm trying to select from a table on =another database...
i.e..I'm on DB2 in query analyzer and this is what my query looks =like
Select *
FROM DB1..Test1
But I'm getting an error
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'DB1.'.
This query worked on my local machine... Could it be a set-up =issue on a different server?
Thanks for any help,
Matt
--=_NextPart_001_0032_01C58C6C.45DE4B80
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Blank
BODY {
MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #000000; =FONT-FAMILY: Arial, Helvetica
}
P.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =FONT-FAMILY: Helvetica, "Times New Roman"
}
LI.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =FONT-FAMILY: Helvetica, "Times New Roman"
}
Any Other Suggestions?......
"Kevin3NF" wrote in message news:%23r5pqsIjFHA.=3300@.TK2MSFTNGP15.phx.gbl...
Try specifying the object owner:

Select *
FROM DB1.dbo.Test1
-- Kevin HillPresident 3NF Consulting

http://www.3nf-inc.com/NewsGroups.htm">www.3nf-inc.com/NewsGroups=.htm

http://www.DallasDBAs.com/forum">www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.

http://www.experts-exchange.com">www.experts-exchange.com - experts compete for points to answer your questions


"Matthew Beirn" wrote in =message news:%23IGqqbIjFHA.=3704@.TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Query Analyzer and I'm trying to select from a =table on another database...

i.e..I'm on DB2 in query analyzer and this is what my query =looks like

Select *
FROM DB1..Test1

But I'm getting an error

Server: Msg 170, Level 15, State 1, Line 2Line 2: Incorrect =syntax near 'DB1.'.

This query worked on my local machine... Could it =be a set-up issue on a different server?

Thanks for any help,
Matt

--=_NextPart_001_0032_01C58C6C.45DE4B80--
--=_NextPart_000_0031_01C58C6C.45DE4B80
Content-Type: image/gif;
name="Blank Bkgrd.gif"
Content-Transfer-Encoding: base64
Content-ID: <002c01c58c8d$cc2f81b0$bf01010a@.ssimedcorp.local.com>
R0lGODlhLQAtAID/AP////f39ywAAAAALQAtAEACcAxup8vtvxKQsFon6d02898pGkgiYoCm6sq2
7iqWcmzOsmeXeA7uPJd5CYdD2g9oPF58ygqz+XhCG9JpJGmlYrPXGlfr/Yo/VW45e7amp2tou/lW
xo/zX513z+Vt+1n/tiX2pxP4NUhy2FM4xtjIUQAAOw==--=_NextPart_000_0031_01C58C6C.45DE4B80--|||This is a multi-part message in MIME format.
--=_NextPart_000_0092_01C58C65.02A65D50
Content-Type: multipart/alternative;
boundary="--=_NextPart_001_0093_01C58C65.02A65D50"
--=_NextPart_001_0093_01C58C65.02A65D50
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
BlankNone. I pasted your code into my QA and it parses correctly (as I =assumed). When I ran it, I got the expected:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'DB1..Test1'.
-- Kevin Hill
President 3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your =questions
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message =news:OgBOO3IjFHA.1148@.TK2MSFTNGP12.phx.gbl...
Any Other Suggestions?......
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message =news:%23r5pqsIjFHA.3300@.TK2MSFTNGP15.phx.gbl...
Try specifying the object owner:
Select *
FROM DB1.dbo.Test1
-- Kevin Hill
President 3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area =DBAs.
www.experts-exchange.com - experts compete for points to answer your =questions
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message =news:%23IGqqbIjFHA.3704@.TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Query Analyzer and I'm trying to select from a table =on another database...
i.e..I'm on DB2 in query analyzer and this is what my query looks =like
Select *
FROM DB1..Test1
But I'm getting an error
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'DB1.'.
This query worked on my local machine... Could it be a set-up =issue on a different server?
Thanks for any help,
Matt
--=_NextPart_001_0093_01C58C65.02A65D50
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Blank
BODY {
MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #000000; =FONT-FAMILY: Arial, Helvetica
}
P.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =FONT-FAMILY: Helvetica, "Times New Roman"
}
LI.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =FONT-FAMILY: Helvetica, "Times New Roman"
}
None. I pasted your code into my QA and it parses correctly =(as I assumed). When I ran it, I got the expected:
Server: Msg 208, Level 16, State 1, Line 1Invalid object name 'DB1..Test1'.
-- Kevin HillPresident 3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm">www.3nf-inc.com/NewsGroups=.htm
http://www.DallasDBAs.com/forum">www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
http://www.experts-exchange.com">www.experts-exchange.com - experts compete for points to answer your questions
"Matthew Beirn" wrote in =message news:OgBOO3IjFHA.1148=@.TK2MSFTNGP12.phx.gbl...
Any Other Suggestions?......
"Kevin3NF" wrote in message news:%23r5pqsIjFHA.=3300@.TK2MSFTNGP15.phx.gbl...
Try specifying the object owner:

Select *
FROM DB1.dbo.Test1
-- Kevin HillPresident 3NF Consulting

http://www.3nf-inc.com/NewsGroups.htm">www.3nf-inc.com/NewsGroups=.htm

http://www.DallasDBAs.com/forum">www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.

http://www.experts-exchange.com">www.experts-exchange.com - experts compete for points to answer your questions


"Matthew Beirn" wrote =in message news:%23IGqqbIjFHA.=3704@.TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Query Analyzer and I'm trying to select from =a table on another database...

i.e..I'm on DB2 in query analyzer and this is what my query =looks like

Select *
FROM DB1..Test1

But I'm getting an error

Server: Msg 170, Level 15, State 1, Line 2Line 2: =Incorrect syntax near 'DB1.'.

This query worked on my local machine... Could it =be a set-up issue on a different server?

Thanks for any help,
=Matt

--=_NextPart_001_0093_01C58C65.02A65D50--
--=_NextPart_000_0092_01C58C65.02A65D50
Content-Type: image/gif;
name="Blank Bkgrd.gif"
Content-Transfer-Encoding: base64
Content-ID: <008d01c58c8e$eb764ad0$be0a050a@.newbridgeis.com>
R0lGODlhLQAtAID/AP////f39ywAAAAALQAtAEACcAxup8vtvxKQsFon6d02898pGkgiYoCm6sq2
7iqWcmzOsmeXeA7uPJd5CYdD2g9oPF58ygqz+XhCG9JpJGmlYrPXGlfr/Yo/VW45e7amp2tou/lW
xo/zX513z+Vt+1n/tiX2pxP4NUhy2FM4xtjIUQAAOw==--=_NextPart_000_0092_01C58C65.02A65D50--|||If your database name were not valid (or table name, for that matter), the
error you should get is:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'DB1..Test1'.
Therefore, that leads me to believe that there is more to your query than
you posted.|||Now you post a different error message than you posted earlier. "Invalid object name" simply states
that there is no table or view named "Test1" inside the DB1 database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:%23fCPs7IjFHA.2156@.TK2MSFTNGP14.phx.gbl...
BlankNone. I pasted your code into my QA and it parses correctly (as I assumed). When I ran it, I
got the expected:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'DB1..Test1'.
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your questions
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message news:OgBOO3IjFHA.1148@.TK2MSFTNGP12.phx.gbl...
Any Other Suggestions?......
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:%23r5pqsIjFHA.3300@.TK2MSFTNGP15.phx.gbl...
Try specifying the object owner:
Select *
FROM DB1.dbo.Test1
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your questions
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
news:%23IGqqbIjFHA.3704@.TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Query Analyzer and I'm trying to select from a table on another database...
i.e..I'm on DB2 in query analyzer and this is what my query looks like
Select *
FROM DB1..Test1
But I'm getting an error
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'DB1.'.
This query worked on my local machine... Could it be a set-up issue on a different server?
Thanks for any help,
Matt|||Yes there was... My database name was a number.
I had to enclose in quotations...
Thanks for your help
"Scott Morris" <bogus@.bogus.com> wrote in message
news:%23Xs4C9IjFHA.3012@.TK2MSFTNGP12.phx.gbl...
> If your database name were not valid (or table name, for that matter), the
> error you should get is:
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'DB1..Test1'.
> Therefore, that leads me to believe that there is more to your query than
> you posted.
>|||That was me, not the OP...;-)
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e9vm%23DJjFHA.3704@.TK2MSFTNGP10.phx.gbl...
> Now you post a different error message than you posted earlier. "Invalid
> object name" simply states that there is no table or view named "Test1"
> inside the DB1 database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
> news:%23fCPs7IjFHA.2156@.TK2MSFTNGP14.phx.gbl...
> BlankNone. I pasted your code into my QA and it parses correctly (as I
> assumed). When I ran it, I got the expected:
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'DB1..Test1'.
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
> news:OgBOO3IjFHA.1148@.TK2MSFTNGP12.phx.gbl...
> Any Other Suggestions?......
> "Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
> news:%23r5pqsIjFHA.3300@.TK2MSFTNGP15.phx.gbl...
> Try specifying the object owner:
> Select *
> FROM DB1.dbo.Test1
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
> news:%23IGqqbIjFHA.3704@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I'm using Query Analyzer and I'm trying to select from a table on
> another database...
> i.e..I'm on DB2 in query analyzer and this is what my query looks
> like
> Select *
> FROM DB1..Test1
> But I'm getting an error
> Server: Msg 170, Level 15, State 1, Line 2
> Line 2: Incorrect syntax near 'DB1.'.
> This query worked on my local machine... Could it be a set-up issue
> on a different server?
> Thanks for any help,
> Matt|||Ahh, sloppy me... :-)
Thanks for catching that, Kevin.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:%23YgOUYJjFHA.1044@.tk2msftngp13.phx.gbl...
> That was me, not the OP...;-)
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your questions
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:e9vm%23DJjFHA.3704@.TK2MSFTNGP10.phx.gbl...
>> Now you post a different error message than you posted earlier. "Invalid object name" simply
>> states that there is no table or view named "Test1" inside the DB1 database.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
>> news:%23fCPs7IjFHA.2156@.TK2MSFTNGP14.phx.gbl...
>> BlankNone. I pasted your code into my QA and it parses correctly (as I assumed). When I ran it,
>> I got the expected:
>> Server: Msg 208, Level 16, State 1, Line 1
>> Invalid object name 'DB1..Test1'.
>> --
>> Kevin Hill
>> President
>> 3NF Consulting
>> www.3nf-inc.com/NewsGroups.htm
>> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
>> www.experts-exchange.com - experts compete for points to answer your questions
>>
>> "Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
>> news:OgBOO3IjFHA.1148@.TK2MSFTNGP12.phx.gbl...
>> Any Other Suggestions?......
>> "Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
>> news:%23r5pqsIjFHA.3300@.TK2MSFTNGP15.phx.gbl...
>> Try specifying the object owner:
>> Select *
>> FROM DB1.dbo.Test1
>> --
>> Kevin Hill
>> President
>> 3NF Consulting
>> www.3nf-inc.com/NewsGroups.htm
>> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
>> www.experts-exchange.com - experts compete for points to answer your questions
>>
>> "Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
>> news:%23IGqqbIjFHA.3704@.TK2MSFTNGP10.phx.gbl...
>> Hello,
>> I'm using Query Analyzer and I'm trying to select from a table on another database...
>> i.e..I'm on DB2 in query analyzer and this is what my query looks like
>> Select *
>> FROM DB1..Test1
>> But I'm getting an error
>> Server: Msg 170, Level 15, State 1, Line 2
>> Line 2: Incorrect syntax near 'DB1.'.
>> This query worked on my local machine... Could it be a set-up issue on a different server?
>> Thanks for any help,
>> Matt
>