Microsoft
Software
Hardware
Network
Question : Correct syntax for SQL between-like query
I am trying to structure a query in a stored proc to handle an incoming zip code as follows: zip comes in and I need to search rule table to see if the zip value is between a value in BeginRange column and EndRange column. So if 77400 comes in and a record exists where BeginRange column is 77890 and EndRange column is 77405, the record is found. I can't quite see how the BETWEEN clause would work? Can someone get me unstuck with the correct query syntax?
Answer : Correct syntax for SQL between-like query
this will do:
WHERE EndRange >= 77440
AND BeginRange <= 77440
OR
WHERE 77440 BETWEEN BeginRange AND EndRange
Random Solutions
How to move XML namespaces to SOAP header in Webservice proxy (From WSDL file)
WinPE, SysPrep, Unattened - Remote Deployments
IE 7 broswer slow to locate site after "Automatically Detect Settings" turned on
Excel auto fill in
Create Webservice to receive XML using HttpWebRequest
Navision with SQL Server 2005 Professional or Enterprise?
Why am I getting this compile error?
Possible to /span (remote dual screen) desktops within Remote Web Workplace?
FormsAuthentication.Redire<wbr />ctFromLogi<wbr />nPage question
How to get data from table into treeview