What are the challenges you face when working across database platforms? Take the survey
Options

Please Fix

MikeOMikeO Posts: 2 New member
This is just one example.. the intellisense does not work with the SC variable inside a Sub-Query

SELECT SC.SnomedID ,
       SC.SnomedCode AS [Code] ,
       6 AS [CodeSystem_ID] ,
       SC.SnomedDescription AS [DisplayName]
FROM   DataCenter.ref.SnomedCode AS SC
WHERE  EXISTS ( SELECT *
                FROM   DataCenter.der.fn_LoadPatientsByRequestID(3, 25) AS P
                       
                WHERE  EXISTS ( SELECT *
                                FROM   DataCenter.dbo.TobaccoUseStatus AS TUS
                                WHERE  TUS.DataCenterID = P.DataCenterID
AND TUS.CurrentStatus_ID = SC.Sn));
Tagged:

Answers

Sign In or Register to comment.