November 15, 2006 at 10:58 am
How do i write the sp to compare 3 parameters?
November 15, 2006 at 11:22 am
November 15, 2006 at 11:48 am
We have about 15 parameters of which 3 are Floor, Suite and Room. The requirement is like this-
If the region is east, we have to combine the three parameters Floor,Suite and Room and compare it with Floor.
If the region is west, we have to compare Floor with Floor, Suite with Suite and Room with Room.
November 15, 2006 at 12:53 pm
"combine the three parameters Floor,Suite and Room and compare it with Floor" how do you combine the 3 params ? You need to post more details go get a solution imo
Vasc
November 16, 2006 at 3:41 pm
Maybe something like this:
select *
from tblname
where
floor =
case
when region='east' then ('floor'+'suite'+'room')
when region = 'west' then 'floor'
end
and suite =
case when region = 'west' then 'suite'
when region = 'east' then ''
end
and room =
case when region = 'west' then 'room'
when region = 'east' then ''
end
November 17, 2006 at 10:07 am
Thanks
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply