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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a table

Status
Not open for further replies.

JackSkellington

Technical User
Jul 28, 2005
86
GB
Is there any way to create a new table with a space in the middle i.e TABLE 1. I have tried using [] but get an error.

CREATE TABLE `TABLE 1` (
`Supply Sub System` VarChar (8) ,
`SSS Description` VarChar (40) ,
`DG1` VarChar (4) ,
`Site Ref` VarChar (8) ,
`Site Description` VarChar (40) ,
`Input or Output` VarChar (1) ,
`Include` VarChar (1) )
 
that should work just fine
Code:
CREATE TABLE [table 1](
 [Supply Sub System] VarChar (8) , 
 [SSS Description] VarChar (40) , 
 DG1 VarChar (4) , 
 [Site Ref] VarChar (8) , 
 [Site Description] VarChar (40) , 
 [Input or Output] VarChar (1) , 
 [Include] VarChar (1)
)
Although, unless there is some sort of predefined business rule where you need spaces, you should refrain from using them; instead use underscores or no spaces at all
 
This would work as a SQL statment but doesn't work when creating thetable through DTS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top