On Thu, 2 Jul 2009 12:18:14 -0700, Wayne wrote:
Quote:
I have a SRS report that I am trying to run. The problem is that since it is
so large when I run the report in it's entirety, I can't export it out as a
PDF. I was wanting to see if I could use the like statement along with the
Betwen statement to allow the user to enter a range of last names ie. Between
Like @Beginning +'%' AND @End +'%' where the user could enter an "A" for
Beginning and "M" for end to get all lastnames beginning with A through M to
run the report in batches.
Thanks |
Hi Wayne,
To get all names that start with the letter A through M, use
WHERE Name >= 'A'
AND Name < 'N';
(or you can use BETWEEN 'A' AND 'MZZZZZZ', but that depends a bit on
collation settings and actual values in the column so it's slightly less
safe).
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis