Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bracket comparison

Status
Not open for further replies.

EagleTempest

Technical User
Jun 15, 2004
125
CA
SQL Server 2000 and .Net 2.0

Is there a difference between
Code:
WHERE (@RegionID IS NULL OR Region = @RegionID)
and
Code:
WHERE (@RegionID IS NULL) OR (Region = @RegionID)
The first gives me the results I want. The Query Builder in VB 2005 tries to be too smart and changes the first one to the second one automatically.

Thanks.
 
No.

[COLOR=black #e0e0e0]For SQL and technical ideas, visit my blog, Squared Thoughts.

The best part about anything that has cheese is the cheese.[/color]
 
There will be a difference if you start adding onto your where clause. Better to start weaning yourself off of any kind of GUI query building tools now, IMO.

[small]----signature below----[/small]
I can't compete with you physically, and you're no match for my brains.
You're that smart?
Let me put it this way. Have you ever heard of Plato, Aristotle, Socrates?
Yes.
Morons!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top