hi
below is my query ..it is running very slow ..can we optimize it.
thaxn
Update pruamc.Tbl_CAMS_UploadDetails
set Compare_Status='Success',additionalfield100=
(select file_name from Tbl_CMS_UploadMaster A,Tbl_CMS_UploadDetails B where A.cms_upload_master_id =B.cms_upload_master_id and B.CMS_Upload_Details_ID=@.CMS_Upload_Details_ID),
ManualMatchingStatus='1',ReconciliationDate=convert(datetime,cast(getdate()as varchar(11)),103)
where CAMS_Upload_Details_ID=@.CAMS_Upload_Details_ID
The following query may increase the performance,
Code Snippet
Declare @.FileName as varchar(100);
Select @.FileName = file_name from Tbl_CMS_UploadMaster A
Join Tbl_CMS_UploadDetails B On A.cms_upload_master_id =B.cms_upload_master_id
and B.CMS_Upload_Details_ID=@.CMS_Upload_Details_ID;
Update
pruamc.Tbl_CAMS_UploadDetails
Set
Compare_Status='Success'
,additionalfield100=@.FileName
,ManualMatchingStatus='1',ReconciliationDate=convert(datetime,cast(getdate()as varchar(11)),103)
Where
CAMS_Upload_Details_ID=@.CAMS_Upload_Details_ID
|||thanx mani
let me check..i will back.
No comments:
Post a Comment