Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
CREATE TABLE #temp ( [Inquiry Number] NVARCHAR(255), [CPO Number] VARCHAR(50), [SO Number] VARCHAR(50) ) CREATE nonclustered INDEX ix_InqNum ON #temp ([Inquiry Number]) include ([CPO Number]) INSERT INTO #temp ( [Inquiry Number],[CPO Number] ) SELECT distinct PRA.inq_num,[PO Number] FROM [LocalDB].dbo.ps_requests_asr PRA with(nolock)left join [RemoteDB].[DBName].dbo.CPOA with(nolock) ON cast(Inquiries as NVARCHAR(450)) = '[' + PRA.inq_num + ']' WHERE PRA.inq_num is not null UPDATE #temp SET [SO Number]= CUST.[SO] FROM #temp INNER JOIN [RemoteDB].[DBName].dbo.CPOA CPON WITH(NOLOCK) ON cast(CPON.Inquiries as NVARCHAR(450)) = '[' + #temp.[Inquiry Number] + ']' INNER JOIN [RemoteDB].[DBName].dbo.BI_CUSTMON CUST WITH(NOLOCK) ON CUST.[Customer PO] LIKE #temp.[CPO Number] + '%' select * from #temp
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|T-SQL: Only Wanting One Record||8||57|
|Complex SQL Server WHERE CLause||9||36|
|What is GIS method of Geometry data type?||6||29|
Join the community of 500,000 technology professionals and ask your questions.