Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
saurabh122
Starting Member
16 Posts |
Posted - 2008-12-12 : 08:08:57
|
| hey guys,Need some help here. I have a column name with a 'Dot' ....how can i run the select query on the same.....is there an escape character that i can use.. |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2008-12-12 : 08:30:06
|
| Put the column name in []select [my.column] from myTableJim |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-12 : 08:50:34
|
| as a matter of fact, its better to use _ rather than .,space,.. as word seperator in column names |
 |
|
|
tosscrosby
Aged Yak Warrior
676 Posts |
Posted - 2008-12-12 : 10:13:19
|
quote: Originally posted by visakh16 as a matter of fact, its better to use _ rather than .,space,.. as word seperator in column names
Absolutely true. BUT with legacy systems, you often don't have a choice without some major work rewriting code that currently works. At my current place of employment, when I came on board, I inherited a SQL database that used to be in Access. The application is still Access (soon to be re-written). Anyway, table names and field names, for the most part, have spaces. A real pain having to use [] for nearly every table and column in the database but it's what I was dealt. Obviously, the new design will bring many "best practices" into the process. Just my 2 cents......Terry |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-12 : 10:22:47
|
quote: Originally posted by tosscrosby
quote: Originally posted by visakh16 as a matter of fact, its better to use _ rather than .,space,.. as word seperator in column names
Absolutely true. BUT with legacy systems, you often don't have a choice without some major work rewriting code that currently works. At my current place of employment, when I came on board, I inherited a SQL database that used to be in Access. The application is still Access (soon to be re-written). Anyway, table names and field names, for the most part, have spaces. A real pain having to use [] for nearly every table and column in the database but it's what I was dealt. Obviously, the new design will bring many "best practices" into the process. Just my 2 cents......Terry
yeah...dont worry...i also had faced similar problems |
 |
|
|
|
|
|
|
|