Forum Moderators: open

Message Too Old, No Replies

Database table is called an sql reserved word.

How do I connect to it?

         

AsleepATheWheel

6:34 pm on Dec 11, 2003 (gmt 0)

10+ Year Member



Hi,

First off I'd better let you know I'm pretty new to sql, now on to the problem.

I'm trying to connect to a few tables in a database. I've connected to most of them ok, and can get the information I need. Then I try to connect to this one table that is called Order. After a few hours flapping around I suss out that I cant connect to it because Order is an sql reserved word. I cant change the table name, but I realy need to be able to connect to it. Any ideas?

Cheers in advance,

Paul

Dreamquick

6:43 pm on Dec 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As always delimiters are your friend, personally I never code without those little square brackets around my table, field or object names...

SELECT *
FROM [Order]

Hope that helps.

- Tony

txbakers

8:32 pm on Dec 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You would really be better off in the long run to rename the table and bite the bullet now before it becomes really unweildy later.

AsleepATheWheel

8:51 pm on Dec 11, 2003 (gmt 0)

10+ Year Member



Thanks for the help,

SELECT *
FROM [Order]

Seems to of worked a treat cheers. If I could change the table name I would, but its part of an ecommerce package we sometimes use, and it breaks the whole thing if we mess about with anything like that.

Cheers,

Paul