homepage Welcome to WebmasterWorld Guest from 54.197.183.230
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Parenthesis In Column Names
Will parenthesis in column names cause problems?
RWSteele

10+ Year Member



 
Msg#: 510 posted 1:10 pm on May 11, 2006 (gmt 0)

When upgrading to SQL Server 2K what problems, if any, can I expect from column names that contain parenthesis?


CREATE TABLE [dbo].[Fail-Status] (
[ID] [nvarchar] (20) COLLATE NOT NULL ,
[Row (X)] [nvarchar] (50) COLLATE NULL ,
[Column (Y)] [nvarchar] (50) NULL

And yes, those are spaces in the column names. Between spaces, parenthesis, and about 40 tables with [ID] as a column name, I've pulled a lot of hair out since taking over this project. And just for the record, I did NOT design this database.

Thanks in advance for any input.

 

aspdaddy

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 510 posted 2:12 pm on May 11, 2006 (gmt 0)

That should be fine in SQL2K.

If you have a lot of dependant views and procedures I'd plan in some database refactoring anyway.

RWSteele

10+ Year Member



 
Msg#: 510 posted 2:29 pm on May 11, 2006 (gmt 0)

Actually the only things I need to worry about are the Access forms used on the client. Of course all SQL is hard-coded, tables are queried directly, and columns are referenced by position instead of name. ex:RS.Fields(0)

If the parens and spaces do become an issue, I thought about creating queries in Access which have the same names as original tables. Then I could rename the tables and columns as needed and use aliases to keep things from breaking. But I'll cross that bridge when I come to it.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved