This operator is used to determine whether a value of an expression falls within a specific range of values
This operator is used in the WHERE clause.
WHERE CategoryID BETWEEN 5 AND 10
The above works in Access and SQL Server because it is an numerical field
--This works in SQL Server (despite Extension being a text column) but not in Access
WHERE Extension BETWEEN 0 AND 2000
--This works in both SQL Server and Access
--The ROUND function converts the text field to a numerical value
WHERE ROUND(Extension,0) BETWEEN 0 AND 2000
This is equivalent to
WHERE (CategoryID >= 5) AND (CategoryID <= 10)
This returns all strings between "A" and "C" which includes any words starting with "A" or "B".
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext