July 26, 2006 at 3:28 pm
Is there something better I can do to make it more streamlined?
BEGIN
UPDATE tbl_leads_queue
SET lead_status_id = 7
WHERE
parent_lead_id = @LeadID
AND partner_id = 19
AND lead_status_id = 3
AND
(
day(date_sent) = day(getdate())
AND
month(date_sent) = month(getdate())
AND
year(date_sent) = year(getdate())
 
END
July 26, 2006 at 3:45 pm
UPDATE tbl_leads_queue
SET lead_status_id = 7
WHERE parent_lead_id = @LeadID
AND partner_id = 19
AND lead_status_id = 3
AND convert(varchar,date_sent,101) = convert(varchar, getdate(),101)
July 26, 2006 at 5:59 pm
UPDATE tbl_leads_queue
SET lead_status_id = 7
WHERE
parent_lead_id = @LeadID
AND partner_id = 19
AND lead_status_id = 3
AND date_sent between convert(datetime, convert(int, getdate()-0.5)) and convert(datetime, convert(int, getdate()+0.5)) - convert(datetime, '00:00:00.003')
_____________
Code for TallyGenerator
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply