Parameters or no parameters - CASE statements
From: Not Me (Not.Me_at_faker.fake.fa.kee)
Date: 05/06/04
- Next message: Rathtap: "How to use SQL Server to email information"
- Previous message: WangKhar: "Re: How to Compute Actual Space Used In Datafiles"
- Next in thread: Khan: "Re: Parameters or no parameters - CASE statements"
- Reply: Khan: "Re: Parameters or no parameters - CASE statements"
- Reply: Alan: "Re: Parameters or no parameters - CASE statements"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 May 2004 13:07:22 +0100
Hi,
I would like to build a query that would take a number of parameters which
will be used for search clauses. What I would like tho is that if the
parameters are not given then no effect is had on the results. For example
if given the parameter @name I would like 'where name = @name' and if @name
was blank then i'd like either nothing, or just name = '%'.
I've tried various ways of putting case statements in but keep getting
syntax errors.. where exactly are you allowed to use cases?
Cheers,
Chris
- Next message: Rathtap: "How to use SQL Server to email information"
- Previous message: WangKhar: "Re: How to Compute Actual Space Used In Datafiles"
- Next in thread: Khan: "Re: Parameters or no parameters - CASE statements"
- Reply: Khan: "Re: Parameters or no parameters - CASE statements"
- Reply: Alan: "Re: Parameters or no parameters - CASE statements"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading