[dba-SQLServer] Weird table name restriction

O'Connor, Patricia (OTDA) Patricia.O'Connor at otda.state.ny.us
Fri Nov 30 13:16:21 CST 2007


Know where you are coming from.  
For YEARS I sent out NAMING CONVENTIONS that have told coworkers to NOT name files with dashes, special characters, start with numbers, even to not use spaces but to use HelloMyFile or Hello_My_File.
 
I have also told them to still think of naming fields differently in the 1st 8 characters. strLName instead of  str_Name_Last.  There are so many 3rd party softwares that will not transfer into or out of MS products becuase of names 
I am constantly fixing messes, renaming files, etc. 
 
*************************************************************
* Patricia E. O'Connor
* Associate Computer Programmer/Analyst
* OTDA - BDMA
* (W) mailto:Patricia.O'Connor at otda.state.ny.us
* (W) mailto:aa1160 at otda.state.ny.us
***********************************************************


--------------------------------------------------------
This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments.  Please notify the sender immediately by reply e-mail and delete the e-mail from your system. 


________________________________


From: dba-sqlserver-bounces at databaseadvisors.com on behalf of jwcolby
Sent: Fri 11/30/2007 2:04 PM
To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com
Subject: [dba-SQLServer] Weird table name restriction



I just discovered that SQL Server (or VB.Net) does not like dashes in table
names.

If I use a table name "ZIP4-AA_X", the BulkCopy.WriteToServer throws an
error "can't access destination table" but if I remove the dash "ZIP4AA_X"
it works just fine.

The problem is that I take the name of the datafile, strip off the extension
and use that as my table name.  Thus I now have to start doing edits of the
file name before I can use it as a field name.

The hoops we have to jump through...

John W. Colby
Colby Consulting
www.ColbyConsulting.com

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com <http://www.databaseadvisors.com/>





More information about the dba-SQLServer mailing list