Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. select --checks for duplication
  2. SourceItemID,
  3. RowID,
  4. --red flags
  5. NHSOrg_CCGKey,
  6. pr.NHSOrganisationCode ProviderCode,
  7. pr.NHSOrganisationName ProviderName,
  8. Patient_DerivedKey,
  9. f.POD_DerivedKey,
  10. pod.PODCode,
  11. pod.PODDescription,
  12. pod.PODGroup1,
  13. FinancialYearKey,
  14. FinancialMonth_Derived,
  15. DataSetKey,
  16. YTDActualActivity,
  17. YTDActualCost,
  18. --p1s AE
  19. AEInitialAssessmentTimeDateKey,
  20. HRGKey,
  21. NHSOrgSiteKey,
  22. MainSpecialtyKey,
  23. --p1s IP
  24. SpellStartDateKey,
  25. PrimaryICD10DiagnosisKey,
  26. PrimaryOPCS4ProcedureKey,
  27. PbRLos,
  28. --p1s OP
  29. ActivityDateKey,
  30. --p2s AE
  31. ConsultantKey,
  32. --AAndEDiagnosisKey,
  33. AEInvestigationFirstKey,
  34. AETreatmentFirstKey,
  35. DischargeMethodKey,
  36. --p2s IP
  37. Consultant_ReferrerKey
  38. from FactSLAM_PLD f
  39. inner join DimNHSOrganisation pr
  40. ON f.NHSOrg_ProviderKey = pr.NHSOrganisationKey
  41. inner join DimPointOfDeliveryDerived pod
  42. on f.POD_DerivedKey = pod.PointOfDeliveryKey
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement