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 |
|
SomaNZ
Starting Member
1 Post |
Posted - 2011-03-20 : 23:21:47
|
| Hi, I'm trying to do a query and one of our fields is named As (after Arsenic). I've tried select [As] "As" and 'As' with no luck, any ideas how I need to format this?Thanks |
|
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2011-03-20 : 23:47:41
|
Does this not work for you?declare @t table ([as] int)insert into @t values(1)select [as] from @t |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-03-21 : 09:03:38
|
| << I've tried select [As] "As" and 'As' with no luck>>You need to post the actual error meeaged you gotMadhivananFailing to plan is Planning to fail |
 |
|
|
jcelko
Esteemed SQL Purist
547 Posts |
Posted - 2011-03-21 : 21:17:14
|
| The double quotes should work. The idea that arsenic is an attribute scares me; is this a cookbook database?--CELKO--Books in Celko Series for Morgan-Kaufmann PublishingAnalytics and OLAP in SQLData and Databases: Concepts in Practice Data, Measurements and Standards in SQLSQL for SmartiesSQL Programming Style SQL Puzzles and Answers Thinking in SetsTrees and Hierarchies in SQL |
 |
|
|
|
|
|