Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Can Someone Explain this query ?

$
0
0

We have a linked server and its fetching employee records to our database

There is a stored procedure and this is the select statement inside that stored procedure

SQL
select@x='select * from openquery(UPS ,''select * from openquery([MCSDB10\MGMTDB10],''''select [EMPID] ,[NameAr] ,[NameEn] ,[Gender] ,[CivilID] ,[Mobile] ,[Email] from [UPS].dbo.[View_EMPID_AB1700] WHERE LastDateUpdate = '''''''''+@TaskLastRun+''''''''' '''')'')'SETNOCOUNTon;exec(@x);
I didnt get this part
SQL
select@x='select * from openquery(UPS ,''select * from openquery([MCSDB10\MGMTDB10],''''select[EMPID]
and
SQL
WHERELastDateUpdate=''''''''' + @TaskLastRun + ''''''''''''')'')'




Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>