Lengkap

edit this code sql server 2014

I have code sql server

I want to modify it to be simple and fast

It works continuously and does not stop

1-If the condition is not met Return to condition check again

2-If the check condition is correct - go to Next

3-When you finish code Return to first condition check again

delete from [SMS].[DBO].[M_Out]

MERGE [SMS].[DBO].[M_Link]

USING ( SELECT * FROM [SMS].[DBO].[M_Log]

RIGHT JOIN [SMS].[DBO].[M_Link] On [url removed, login to view] = M_Link.link_UserId

where Id >= 0 and log_Id IS NULL ) as sdjj

ON[SMS].[DBO].[M_Link].link_UserId = UserId

WHEN MATCHED THEN

UPDATE SET link_check = case

when [url removed, login to view] >=1 then '1'

else 0

end

,log_StatusCode = StatusCode

,log_Id = Id ;

WAITFOR DELAY '00:00:01'

MERGE [SMS].[DBO].[M_Link]

USING ( SELECT * FROM [SMS].[DBO].[M_In]

RIGHT JOIN [SMS].[DBO].[M_Link] On [url removed, login to view] = M_Link.link_UserId

where Id >= 0 and In_id IS NULL and link_Status IS NULL ) as fgfgf

ON[SMS].[DBO].[M_Link].link_UserId = UserId

WHEN MATCHED THEN

UPDATE SET link_Status = case

when MessageText like '%رصيد%' or MessageText like '%لديك%' then '1'

else 0

end ,

In_id = Id

,Reply_Message = MessageText

,Reply_SendTime = SendTime

,Reply_ReceiveTime = ReceiveTime

,Reply_UserId = UserId ;

WITH CTE AS(

SELECT [link_MessageTo], [link_Gateway], [link_UserId],

RN = ROW_NUMBER()OVER(PARTITION BY link_UserId ORDER BY link_UserId)

FROM [SMS].[DBO].[M_Link]

)

DELETE FROM CTE WHERE RN > 1

delete from [SMS].[DBO].[M_Out]

if not exists (

select top 1 1

from sms.dbo.m_link

where link_check = 0

)RETURN

WAITFOR DELAY '00:00:05'

INSERT INTO sms.dbo.M_Out (MessageTo ,MessageType ,Gateway ,UserId)

select top 1 1 link_MessageTo ,link_MessageType ,link_Gateway ,link_UserId

from sms.dbo.m_link

where link_check = 0

WAITFOR DELAY '00:00:10'

MERGE [SMS].[DBO].[M_Link]

USING ( SELECT * FROM [SMS].[DBO].[M_Log]

RIGHT JOIN [SMS].[DBO].[M_Link] On [url removed, login to view] = M_Link.link_UserId

where Id >= 0 and log_Id IS NULL ) as sdjj

ON[SMS].[DBO].[M_Link].link_UserId = UserId

WHEN MATCHED THEN

UPDATE SET link_check = case

when [url removed, login to view] >=1 then '1'

else 0

end

,log_StatusCode = StatusCode

,log_Id = Id ;

WAITFOR DELAY '00:00:15'

MERGE [SMS].[DBO].[M_Link]

USING ( SELECT * FROM [SMS].[DBO].[M_In]

RIGHT JOIN [SMS].[DBO].[M_Link] On [url removed, login to view] = M_Link.link_UserId

where Id >= 0 and In_id IS NULL and link_Status IS NULL ) as fgfgf

ON[SMS].[DBO].[M_Link].link_UserId = UserId

WHEN MATCHED THEN

UPDATE SET link_Status = case

when MessageText like '%رصيد%' or MessageText like '%لديك%' then '1'

else 0

end ,

In_id = Id

,Reply_Message = MessageText

,Reply_SendTime = SendTime

,Reply_ReceiveTime = ReceiveTime

,Reply_UserId = UserId ;

delete from [SMS].[DBO].[M_Out]

Kemahiran: SQL

Lihat lagi: sql server 2014, MICROSOFT SQL SERVER 2014 PROGRAMMING, IKM MICROSOFT SQL SERVER 2014 PROGRAMMING, microsoft sql server 2014, sql server 2014 price in uae, necesito programador android para una app ecuador, crear una aplicación para android, crear una aplicación para android con tracking gps, crear una aplicacin para android, crear una aplicacin para android con tracking gps, android project source code sql server, save edit documents sql server, inventory full source code sql server, convert code sql server 2008, hospital management system source code sql server, android aplicaci, convert access 2007 code sql server, rule engine source code sql server, como crear una tienda virtual con php5 pdf, como crear una pgina web tipo getafreelancer com

Tentang Majikan:
( 2 ulasan ) taiz, Yemen

ID Projek: #13598144

Dianugerahkan kepada:

jagdishbhatt38

I am having more than 8 years of experience in IT industry.I have worked on .net(c#.net,vb.net,asp,asp.net,mvc) with sql server 2005/2008/2012/2014/2016 and oracle(pl/sql). I can provide you better solution by utili Lagi

$50 USD dalam 2 hari
(25 Ulasan)
4.7