October 28, 2005 at 2:47 pm
Select * from "table_name"
I'm trying to select everything from a user table, but continues to give me an error.
But when I select everything from a system table, it works...
Why?
October 28, 2005 at 2:50 pm
Remove quotes around the tablename (unless you want to start messing with the quoted identifiers)
Does the table exist?
What's its real name?
October 28, 2005 at 2:52 pm
Yeah, sorry... I'm not using quotes...
This is the error message I get:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'ARM11'.
October 28, 2005 at 2:54 pm
check the owner of the table
Amit Lohia
October 28, 2005 at 2:54 pm
select * from ARM11
October 28, 2005 at 2:55 pm
If you're sure that the table exists then try this :
Select * from YourUserName.TableName
to find your username :
Select USER_NAME()
October 28, 2005 at 2:57 pm
I figured it out... Needed the database name + .dbo.ARM11
October 28, 2005 at 2:59 pm
IF in QA >>
USE CorrectDatabaseName
or in the connection string of the application, you can specify the correct database with the option catalog (IIRC).
Check out http://www.ConnectionStrings.com
October 28, 2005 at 4:55 pm
or
if your in query analzyer, select the database your working in on the top of the app.
Or in query analyzer
use Mydatabasename
Select *
from mytable
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply