Viewing 6 posts - 1 through 6 (of 6 total)
You could try this:
SELECT 1 FROM dbo.tblRoadShowAllocation
WHERE
Coalesce(RoadShowID,-1) = Coalesce(@RoadShowID,-1) AND
Coalesce(RoadShowEventID,-1) = Coalesce(@EventID,-1) AND
Coalesce(SellerID,-1) = Coalesce(@SellerID,-1) AND
Coalesce(EmployerID,-1) = Coalesce(@EmployerID,-1)
November 15, 2007 at 6:33 am
Yes, Using a command object.
With objCommand
.Parameters.Item(1).Value = NewValue
.Parameters.Item(2).Value = NewValue
.Execute
End With
October 19, 2007 at 6:28 am
Select column1 = coalesce(col1,col2,col3,col4),
column2 = case when NonNulls = 1 then NULL
When NonNulls = 4 then col2
when NonNulls = 3 then Coalesce(Col3,Col4)
else Coalesce(col4, col3,col2) end ,
column3 = case...
June 22, 2007 at 12:05 pm
Range of Dates? If you want to only look at a range of dates in addition to the weekend flags you can append the critiria to the where clause.
March 13, 2004 at 6:30 am
SELECT count(*) --DATENAME (dw, colDATE)
FROM tblHolidays
WHERE
(CASE WHEN (DATENAME(dw, colDATE) = 'Friday' and @fri_flag = 'Y')
OR (DATENAME(dw, colDATE) = 'Saturday' and @sat_flag = 'Y')
OR (DATENAME(dw, colDATE) = 'Sunday' and @sun_flag...
March 12, 2004 at 2:02 pm
You can just run this using the update statement or automate it by adding it as a trigger, as entered below.
Update PriceName
set PriceName = Case
When cast(Price as int)...
March 12, 2004 at 7:10 am
Viewing 6 posts - 1 through 6 (of 6 total)