From: Sam on
Thank you all

Cheers

Sam


From: Michael C on
"Tom Cooper" <tomcooper(a)comcast.net> wrote in message
news:uRj37%23EsKHA.2016(a)TK2MSFTNGP05.phx.gbl...
> GROUP is a reserved word. You can, but should not name a column GROUP.
> If you do, you have to enclose it in brackets every time you reference it.
> For example,
>
> create table #t ([GROUP] int);
> select [GROUP] from #t;
>
> It's legal, but don't do it.

Is this the only problem with it? If it is I don't really see the issue.
I've worked on some projects where people have done some really stupid
things with column names and while it seemed silly at first I soon realised
it was a non issue. Opinions anyone?

Michael


From: Jay on
I know my feeling on the matter is shared by a fair number:

What we're dealing with is complicated and any standard we can use to keep
things clearer and simpler can only work in our favor.

"Yeah, but your scientists were so preoccupied with whether or not they
could, they didn't stop to think if they should."

Ian Malcom, Jurassic Park

"Michael C" <mike(a)nospam.com> wrote in message
news:%23u3cGS2sKHA.4816(a)TK2MSFTNGP02.phx.gbl...
> "Tom Cooper" <tomcooper(a)comcast.net> wrote in message
> news:uRj37%23EsKHA.2016(a)TK2MSFTNGP05.phx.gbl...
>> GROUP is a reserved word. You can, but should not name a column GROUP.
>> If you do, you have to enclose it in brackets every time you reference
>> it.
>> For example,
>>
>> create table #t ([GROUP] int);
>> select [GROUP] from #t;
>>
>> It's legal, but don't do it.
>
> Is this the only problem with it? If it is I don't really see the issue.
> I've worked on some projects where people have done some really stupid
> things with column names and while it seemed silly at first I soon
> realised it was a non issue. Opinions anyone?
>
> Michael
>


From: Tibor Karaszi on
I definitely shy away from delimited identifiers. The problem with them are
the ... delimiters. For some historically stupid reason, the SQL Server
world has decided to go for square brackets instead of double quotes (which
is ANSI SQL). This is in script generation, examples in BOL, courses etc.
Now, having double-quotes doesn't really solves the real problem, but I just
wanted to let some steam off regarding the choice of identifiers. The real
problem to me is ... readability. My brain if far far slower parsing SQL
which is delimited compared to non-delimited SQL.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi



"Michael C" <mike(a)nospam.com> wrote in message
news:#u3cGS2sKHA.4816(a)TK2MSFTNGP02.phx.gbl...
> "Tom Cooper" <tomcooper(a)comcast.net> wrote in message
> news:uRj37%23EsKHA.2016(a)TK2MSFTNGP05.phx.gbl...
>> GROUP is a reserved word. You can, but should not name a column GROUP.
>> If you do, you have to enclose it in brackets every time you reference
>> it.
>> For example,
>>
>> create table #t ([GROUP] int);
>> select [GROUP] from #t;
>>
>> It's legal, but don't do it.
>
> Is this the only problem with it? If it is I don't really see the issue.
> I've worked on some projects where people have done some really stupid
> things with column names and while it seemed silly at first I soon
> realised it was a non issue. Opinions anyone?
>
> Michael
>
From: Michael C on
"Tibor Karaszi" <tibor_please.no.email_karaszi(a)hotmail.nomail.com> wrote in
message news:%23EPSId4sKHA.6004(a)TK2MSFTNGP04.phx.gbl...
>I definitely shy away from delimited identifiers. The problem with them are
>the ... delimiters. For some historically stupid reason, the SQL Server
>world has decided to go for square brackets instead of double quotes (which
>is ANSI SQL). This is in script generation, examples in BOL, courses etc.
>Now, having double-quotes doesn't really solves the real problem, but I
>just wanted to let some steam off regarding the choice of identifiers. The
>real problem to me is ... readability. My brain if far far slower parsing
>SQL which is delimited compared to non-delimited SQL.

So really the only problem is delimiters which isn't really that big a
problem. So surely using reserved words is pretty much a non isue.

Although what I would consider more of an issue is readability, if you call
a column Date then code just becomes a little less readable and could be
potentially confusing is some situations.

Michael