I have a selected stored procedure, and I'm trying to make the results that it knocks also update the column with the name Downloadedand mark these lines as downloads.
For example, I am pulling 10 lines out of these 10 lines. I also want to update the column Downloadedto true in the same stored procedure. Is it possible?
This is my sp so far, it is dumping data.
ALTER PROCEDURE [dbo].[GetLeads]
@DateTo datetime = null,
@DateFrom datetime = null
AS
SELECT name
, lastname
, title
, company
, address
, address2
, city
, [state]
, zip
, country
, stamptime
FROM
lead
where
((@DateTo is null AND @DateFrom IS null) or (stamptime BETWEEN @DateTo AND @DateFrom))
Thank!
user482375
source
share