Re: Anything like Constants in SQL Server?

From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 06/10/04


Date: Thu, 10 Jun 2004 12:04:44 -0400

You don't have to join in, if it's a constant, you can derive the value into
a local variable first.

-- 
http://www.aspfaq.com/
(Reverse address to reply.)
"David Browne" <davidbaxterbrowne no potted meat@hotmail.com> wrote in
message news:#0D1FRwTEHA.2704@TK2MSFTNGP10.phx.gbl...
>
> "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
> news:%238F65%23vTEHA.1508@TK2MSFTNGP11.phx.gbl...
> > I use a constants or properties table.  There is no such thing as a
> constant
> > or global in SQL Server...
> >
> > -- 
>
> Just beware that joining in a constants table complicates your query plans
> and interferes with index selectivity analysis.  For cheap queries, it's
no
> big deal, but in an expensive query it can be fatal.
>
> David
>
>