>>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.
>
>You can try
>
> ISNULL( mytable.option, CAST('' as CHAR(8))) as "OPTION" or try [] if the first option would not work.
I tried both approaches and neither one work. Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham