April 19, 2005 at 1:36 pm
Create proc MyProc @Operator as varchar(2), @EquipmentCount as INT,
AS
Set nocount on
select count (*) as carrier_count from dbo.v_MTSTM_EquipmentCountByCarrier where 0 <
case when @Operator = '<' and equipment_count ' and equipment_count > @EquipmentCount then 1
when @Operator = '=' and equipment_count = @EquipmentCount then 1
...
else 0 end
set nocount off
April 19, 2005 at 11:15 pm
SET @sSQL = @Statement + @Operator + CONVERT(nvarchar,@EquipmentCount)
Andy
April 20, 2005 at 6:36 am
You don't need dynamic sql to do this task, please stay away from it.
April 20, 2005 at 6:44 am
Thanks for the suggestions. Dynamic SQL is new to me. I still have been unsuccessfull. I need to read about the code both of you have supplied so I may understand exactly what is happening. I'll post what I end up with. And feel free to post any other suggestions! Thanks again for your time!!!!!!!!
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply