views:

24

answers:

1

When i have a column say "GROUP"

TableName.GROUP

during select it show me error

Incorrect syntax near the keyword 'GROUP'

I tried

  select [TableName.GROUP] from TableName

it shows me invalid column name TableName.GROUP

i tried

select [dbo.TableName.GROUP] from TableName

i received the same error invalid column name dbo.TableName.GROUP

I need the column name "GROUP". How to fix it?

+5  A: 
 select [TableName].[GROUP] from TableName
 // or
 select [GROUP] from TableName
a1ex07
or TableName."GROUP", or alias."GROUP", or just "GROUP" if only one table is involved.
Fosco
yeah, just added it.
a1ex07
oops genious man
amit