Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error using CREATE TABLE statement

Status
Not open for further replies.

meldrape

Programmer
Joined
May 12, 2001
Messages
516
Location
US
Hello, I'm getting an error when trying to create a table that starts with a numerical character, with the following SQL statement:
Code:
CREATE TABLE 2004apr25
I get the following error: Incorrect syntax near '2004'. I've tried everything, putting half quotes around it, putting brackets but it won't work.
Code:
CREATE TABLE test
works great, no errors because the first character is alpha I guess:
I can manually do it but that defeats the purpose. Any thought would be helpful. Thanks. (asp sql2000)
 
Square brackets are always a good way to indicate that you mean a name and not something else, but if you've tried them:
Code:
CREATE TABLE [2004apr25]
and they don't work, then I have no idea.
 
Thanks anyway. Yes, I've tried them and tried them. I've done a response.write on my statement and everything so now I guess I'll just have to change the file name configuration. THanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top