You are here: Re: Left Join variable not valid « MsSQL Server « IT news, forums, messages
Re: Left Join variable not valid

Posted by Hugo Kornelis on 06/18/06 22:13

On Sat, 17 Jun 2006 20:47:20 -0500, Sfj wrote:

(snip)
>Also, how bad is my syntax? If you could give advice on removing extraneous
>brackets

Hi Sfj,

Removing brackets is a great idea - IMO, they only make the query
unreadable. You only really need to enclose a table name, column name,
or other identifier with either brackets (the MS standard that works
across SQL Server and Access, but not outisde the MS world) or double
quotes (the ANSI SQL standard) if it doesn't follow the rules for
identifiers as laid down in Books Online. Most common reasons for
needing brackets or double quotes are: identifiers with embedded spaces,
using reserved words as identifier, using special characters in
identifier or starting identifier with numeric.

If you stick to the rules for identifier names, you'll never need to
delimit them at all.

> and I would like to not have to use the "as" clause. I really just
>want to keep it simple. Whatever works though.

Though the AS is optional, I recommend always sticking it in. It's just
three extra keystrokes, and it makes your query lots easier to read.

--
Hugo Kornelis, SQL Server MVP

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация