Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to deal with OPTION column
Message
From
01/09/2008 10:52:45
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01343791
Message ID:
01343800
Views:
14
>Hello,
>
>I have a column/field named "OPTION". I have noticed that in SQL Server this name is enclosed in square brackets "[]". Therefore I presume that this name is reserved. Therefore the column named "OPTION" is ok.
>
>But the problem I have is when I created a SQL Command and pass it to the SQL Server via SPT, I get error "near keyword [option]".
>
>How can I include name OPTION in the SQL Select so that SQL Server will allow it? Here is a segment of the SQL Select I have:
>
>
>... ISNULL( mytable.option, CAST('' as CHAR(8))) as OPTION
>
>
>Thank you in advance for any help.
ISNULL( mytable.[option], CAST('' as CHAR(8))) as [OPTION]
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform