July 15, 2009 at 8:53 pm
Hi there
My hosting provider has created a table name starting with numbers if u do normal query it throws error can u advice how to query this table pls
select * from 170703-test
Error:
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '170703'.
Cheers
July 15, 2009 at 9:02 pm
wrap any object name with brackets(or double quotes) if it doesn't follow normal naming conventions, has spaces in it, or are the same as a reserved word:
select * from [170703-test]
or
select * from "170703-test"
this could happen to database names,column names, procedure names, etc...not just tables.
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply