Viewing 15 posts - 16 through 30 (of 138 total)
write , my question is with top n would it work?
here i want the activity name and code of first activiytid? ( activitid is pk)
declare @v varchar(max)='',@v1 varchar(max)=''
select top 1 @v=activityname ,@v1= code...
April 11, 2023 at 11:01 am
insted of first query i wanted to known about second query. so i am rephrasing the question.
here i want the activity name and code of first activiytid?
they did not write...
April 11, 2023 at 10:39 am
please tell me is there anything wrong in first query or should I go for second one or use some with cte etc. etc.
Yours sincerely
April 11, 2023 at 7:35 am
I agree with your point, but it is needed sometimes, so please tell me is there anything wrong in first query or should I go for second one or use...
April 11, 2023 at 7:34 am
this this the orignal query
INSERT INTO [ReportSyncQueue]
([ProjectId]
,[LineloopId]
,[SubSystemId]
,[ActivityHeaderId]
,[ActivityId]
,[TableName]
,[ClassAuditId]
,[Remarks]
,[Status]
,[CreatedDt]
,[UpdatedDt]
,[CDataSource]
,[UDataSource]
,IsSyncMtr
,IsSyncDR
,IsSyncPB
,ReportDt
)
SELECT l.ProjectId, l.LineloopId,AH.SubSystemId,ah.ActivityHeaderId,a.ActivityId,'PipeJoinMethod' AS TabelName
,PJLCA.PipeJoinMethodId1 AS ClassauditId
,null,1,getdate(),getdate(),'HOSO','HOSO'
,0 AS IsSyncMtr
,0 AS IsSyncDr
,1 AS ISSyncPB
,NULL AS ReportDt
FROM
ActivityHeader ah
JOIN WeldingAudit sa ON ah.ActivityHeaderId=sa.ActivityHeaderId AND sa.Status=1
join Activity a...
February 28, 2023 at 11:38 am
I have removed the trigger and indexed views also, but it comes after sometimes.
I have taken permission , i will soon send the code
February 28, 2023 at 10:51 am
yes,
kkrMain has one trigger which also inserts in KKR table ( but that one only works in update mode, and I got the error in inserts also)
and one indexed view...
February 27, 2023 at 6:46 am
due to company policy i can not send the stored procudure.
but this is the line which is creating problem. and same line is written many times in the SP with...
February 25, 2023 at 7:03 am
This is the code which is creating the problem (bridgid is bigint ,remaks is varchar(250) status smallint) in both the tables mentioned below.
INSERT INTO KKR (BridgID,Remarks,Status)
SELECT DISTINCT BridgID,Remarks,1
FROM
kkrMain where kkrmainid=23
February 21, 2023 at 6:02 am
1)it is my stored procedure.
2) I debuged my sp and it stated running properly. and after that it was also running properly with same params.
but after sometimes it showed me...
February 20, 2023 at 9:39 am
February 20, 2023 at 6:34 am
informaton schema was taking 0 cpu and 0 time.
February 10, 2023 at 11:23 am
February 9, 2023 at 6:56 am
February 9, 2023 at 6:54 am
i think information schema is better because col_length is a function call and finally it would go to sys.objects or all_objects or information schema it self.
February 9, 2023 at 4:47 am
Viewing 15 posts - 16 through 30 (of 138 total)