File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Sql server keyword 'user' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Sql server keyword Watch "Sql server keyword New topic
Author

Sql server keyword 'user'

Alana Sparx
Ranch Hand

Joined: Feb 14, 2006
Posts: 121
Ok, i know that strictly speaking this isn't JDBC, but it could be!

The following sql statement fails in Sql Server:

because the table name 'user' is a keyword. How can I retrieve the data from this table?


don't work!

NB, Some other clown designed the schema.

Many thanx
Alana Sparx
Ranch Hand

Joined: Feb 14, 2006
Posts: 121
Ah! Bless the advent of the square bracket, a la


toodle-pip.
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
Originally posted by Alana Sparx:
Ah! Bless the advent of the square bracket, a la


toodle-pip.


On at least many other databases, "USER" would have worked; on some databases, the quotes make the column name case-sensitive, where it normally is not.
 
Don't get me started about those stupid light bulbs.
 
subject: Sql server keyword 'user'