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 Rhinorhino 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
Joined
Jul 28, 2005
Messages
86
Location
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
 
works just fine for me, no issues at all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top