Is it possible to have a parameter that uses "LIKE" instead of other
operators? For example:
WHERE company LIKE @.company
instead of:
WHERE company = @.company
any ideas as to other strategies which would accomplish the same thing?
thanks!It should work just like you have listed... assuming the end user will put
the wildcards in the parameter... Otherwise you might do
where company like '%' + @.company + '%'
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"jmann" <jmann@.discussions.microsoft.com> wrote in message
news:10929361-B7D7-4976-BA09-7A1B107B9391@.microsoft.com...
> Is it possible to have a parameter that uses "LIKE" instead of other
> operators? For example:
> WHERE company LIKE @.company
> instead of:
> WHERE company = @.company
> any ideas as to other strategies which would accomplish the same thing?
> thanks!|||It worked! THANK YOU SO MUCH!!!
"Wayne Snyder" wrote:
> It should work just like you have listed... assuming the end user will put
> the wildcards in the parameter... Otherwise you might do
> where company like '%' + @.company + '%'
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "jmann" <jmann@.discussions.microsoft.com> wrote in message
> news:10929361-B7D7-4976-BA09-7A1B107B9391@.microsoft.com...
> > Is it possible to have a parameter that uses "LIKE" instead of other
> > operators? For example:
> >
> > WHERE company LIKE @.company
> >
> > instead of:
> >
> > WHERE company = @.company
> >
> > any ideas as to other strategies which would accomplish the same thing?
> >
> > thanks!
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment