I always go for either:

WHERE x = 1
AND y = 2

or:

WHERE x = 1 AND y = 2

Usually the first but never either of the options you gave (that's just me).

Dom


On 06/10/2007, Zaphod Beeblebrox <[EMAIL PROTECTED]> wrote:
>
> yep, I pretty much do the same thing, also my selects look like this:
>
> SELECT   col1
>                  ,col2
>                  ,col3
> FROM      table1
>      INNER JOIN table2 ON table1.col1 = table2.col2
> WHERE  x = 1
>     AND   Deleted = 0
>
> In essence, I capitalize my sql keywords, I place the commas in from
> of field names (for the same reason as the AND placement), alias any
> table over 4 characters, and I keep all my indentation equal.  I
> despise the MS Enterprise Manager because invariably some coworker
> will submit a query to me that's a clump of unformatted text.
>
> On 10/6/07, ColdFusion <[EMAIL PROTECTED]> wrote:
> > How many use the query coding (where clause) as:
> >
> > where
> >             x = 1 and
> >             Deleted = 0
> >
> >
> > OR
> >
> >
> > where
> >         x = 1
> >         and Deleted = 0
> >
> >
> >
> > I prefer the second one as if I need to remove or simply comment the
> line
> > out for testing, I only do the one line rather than having the comment
> tags
> > skew over multiple lines?
> >
> > Thanks for your input.
> >
> >
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290447
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to