Subject | Re: Conditional conundrum |
---|---|
Author | Ali Gökçen |
Post date | 2005-10-20T20:46:03Z |
Rick,
why don't you use like this:
...
if(param='U') then
begin
Select *
From atable
some_big_join
Where unit_use='U'
...
end
else
begin
Select *
From atable
some_big_join
Where unit_use <>'U'
...
end
...
OR
Select *
From atable
some_big_join
Where
(unit_use=:param and unit_use='U') or
(unit_use<>'U' and :param<>'U')
one more question..
what are you doing with a 'select *' in a stored procedure???
Regards.
Ali
why don't you use like this:
...
if(param='U') then
begin
Select *
From atable
some_big_join
Where unit_use='U'
...
end
else
begin
Select *
From atable
some_big_join
Where unit_use <>'U'
...
end
...
OR
Select *
From atable
some_big_join
Where
(unit_use=:param and unit_use='U') or
(unit_use<>'U' and :param<>'U')
one more question..
what are you doing with a 'select *' in a stored procedure???
Regards.
Ali