Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.44 KB | None | 0 0
  1. /****** Object:  View [dbo].[V_SDD_DocumentosComReferencias]    Script Date: 24-02-2020 12:07:27 ******/
  2. SET ANSI_NULLS ON
  3. GO
  4.  
  5. SET QUOTED_IDENTIFIER ON
  6. GO
  7.  
  8. ALTER VIEW [dbo].[V_SDD_DocumentosComReferencias] AS
  9. Select  c.id,
  10.         CASE WHEN (select count(*) from dbo.TDU_ReferenciasGeradasMB as trgm with (nolock) where trgm.CDU_IDDoc=c.Id) > 0
  11.         THEN
  12.         1
  13.         ELSE
  14.         0
  15.         END as 'ComReferenciasMB'
  16.         from
  17.             CabecDoc c with (nolock)
  18. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement