Friday, January 6, 2012

My First Cursor Programming



Declare @pptid int,
@credate  date

declare ppt cursor for
select PD.PropertyID ,PD.CREATIONDATE   from PropertyDetails PD with(nolock)
inner join OfficeInformation OI with(nolock)
 on PD.ListingOfficeID = OI.OfficeID
inner join AgencyInformation AI with(nolock)
 on OI.AgencyID = AI.AGENCYID where AI.GroupID=116

open ppt

fetch ppt into @pptid, @credate

while @@FETCH_STATUS =0
begin
exec ProxioCentralLog.PC.RecChangePropertyDetails @pptid,@credate
end
close ppt

deallocate ppt

No comments:

Post a Comment

Qualcomm Short Term

  113 is the SL. 1st Target by mid July.

Total Pageviews