"-" not "_"

I wrote a SQL statement in the data tab. I wrote a bunch of alaises as example ' word-type ' but when I hit the layout tab it converts the "-" to "_". So now my field name is ' word_type '. Is there any way to prevent this?


CardGunner
0
Card
7/24/2007 1:18:45 PM
📁 asp.net.vs2002-vs2003
📃 3502 articles.
⭐ 0 followers.

💬 3 Replies
👁️‍🗨️ 2044 Views

Don' use a hypen ( - ).  It isn't a valid character for column names.

 

See http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1188931,00.html

 

Here's an excerpt about column names:

  • Letters as defined in the Unicode Standard 2.0
  • Decimal numbers from either Basic Latin or other national scripts
  • The "at" sign, dollar sign ($), number sign, or underscore

  • ---------------------------------------
    MCP - Web Based Client Development .NET 2.0
    0
    ps2goat
    7/24/2007 2:34:46 PM

    Easier said then done. I have to export to a client an xml file. He is expecting the column names to have the hyphen (-).


    CardGunner
    0
    Card
    7/24/2007 3:06:23 PM

    I called the client and he will edit it in his side. So it's no longer an issue but i'm curoius on the solution if he couldn't or wouldn't edit my download to him.


    CardGunner
    0
    Card
    7/24/2007 5:39:09 PM
    Reply: