Wednesday, March 21, 2012

Problem with 1 Table in MSDE DB

Hello all.

First I will be the first to say that I'm very inexperienced when it comes to working with MS SQL DBs. I'm doing my best to learn though.

Here is my problem. I have a piece of software that connects up to an MSDE instance. Within this instance there is a database called TTUSER. And within the TTUSER database, there are several tables, one of which called User. I can not seem to do anything with this table. For example when I just try to see the contents of the UserID column, I get:

1> select UserID from User
2> go
Msg 156, Level 15, State 1, Server <MyMsdeServerName>, Line 1
Incorrect syntax near the keyword 'User'.

However, when I try the exact same command above, but use the Logon table instead of the User table, it works just fine, and I see the contents of the UserID column from the Logon table.

I also tried copying the User Table with this:

1> select * into Test from User
2> go
Msg 156, Level 15, State 1, Server 10250-JORUM, Line 1
Incorrect syntax near the keyword 'User'.

And again, if I just substitute the User table with the Logon table, it copies just fine. Both of these tables, Logon and User, are in the same database, TTUser.

I would just like to be able to view the contents of the User table from command line, and maybe send it into a text file. Thanks for your help.

Jnuw"User" is a keyword. Try this:

select *
from [User]|||MCrowley, thank you! That did the trick.

No comments:

Post a Comment