Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SamuelT
Starting Member
6 Posts |
Posted - 2007-08-10 : 11:55:42
|
Hi all,I'm trying to create a number of tables that relate to projects which have numberic names (e.g. 93002, 93009, 93012). However it appears that I'm unable to create a table with numeric values. When I try to create the table I get:Msg 102, Level 15, State 1, Line 1Incorrect syntax near '.93009'.Am I right in presumung that I can't create numerically named tables, and can anyone suggest a naming convention that isn't NineThreeZeroZeroNine ?TIA,SamuelT |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-08-10 : 12:14:44
|
Use brackets around the number. Create table dbo.[93002] ... Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2007-08-10 : 12:53:19
|
| This is a really, really bad database design. Your tables should *contain* data, not *be* data. If you have multiple projects, they should all be stored in one "Projects" table with a "ProjectCode" column that stores the project number. A design like you are trying to do will be a nightmare to maintain.- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-08-10 : 13:17:01
|
quote: Originally posted by jsmith8858 This is a really, really bad database design. Your tables should *contain* data, not *be* data. If you have multiple projects, they should all be stored in one "Projects" table with a "ProjectCode" column that stores the project number. A design like you are trying to do will be a nightmare to maintain.- Jeffhttp://weblogs.sqlteam.com/JeffS
Totally agree.Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
SamuelT
Starting Member
6 Posts |
Posted - 2007-08-13 : 04:38:19
|
Hi,Thanks for the advice ( 'This is a really, really bad database design' !!!). I already have a Project table that lists all the project codes - I also have a Sites table. I've joined these two tables to list all sites that are related to jobs (ProjectSites). The reason for extracting this data to a seperate table is that I want individual tables for each project as each is bespoke and contains various milestones that need reporting against. If this still appears to be really, really bad ( ) how would you guys go about doing this?TIA,SamuelT |
 |
|
|
|
|
|
|
|