1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
|
CREAR el usp_UpdateData del PROCEDIMIENTO
COMO
COMENZAR
-- Primeros expedientes anteriores claros
TABLA TRUNCADA YourTempTable
-- Insertar los datos en la tabla temporal
INSERTAR EN YourTempTable
SELECCIONAR *
DE (SELECCIONAR CRMPROD_01.dbo.P_Deals.dealId,
CRMPROD_01.dbo.P_Events_Table_Types.eventType,
CRMPROD_01.dbo.P_Events_Table.eventData
De CRUZ de CRMPROD_01.dbo.P_Deals ENSAMBLAR
CRMPROD_01.dbo.P_Events_Table_Types DEJADOS ENSAMBLAN
CRMPROD_01.dbo.P_Events_Table EN CRMPROD_01.dbo.P_Events_Table.dealId = CRMPROD_01.dbo.P_Deals.dealId Y
PIVOTE de CRMPROD_01.dbo.P_Events_Table.eventTypeID = de CRMPROD_01.dbo.P_Events_Table_Types.eventTypeID) picovoltio (max (eventData) PARA
[eventType] ADENTRO
([AppReceived], [AppToClosingAgent], [DisclSent], [DisclSigned], [DisclToClosingAgent], [DisclToCF], [PATargetDate], [PASent],
[PASigned], [PAComplete], [PAtoCF], [ToCounsel], [PetitionFiled], [HearingDate], [PendingCO], [PendingCOExpl], [CourtOrder], [CourtOrderRcd],
[InsuranceApproved], [InsuranceDenied], [InsPolicyIssued], [asimiento], [caído], [Redocumented], [AutoProjFunding], [ManProjFunding],
[FundsRequested], [AmtRequested], [PreFunded], [FundsRcd], [financiado], [cerrado], [InvBookCreated], [InvBookSent], [AP_BL_Requested], [AP_BL_In],
[SetAgrIn], [DriverLicIn], [SocSecIn], [MarCertIn], [DivDecreeIn], [DCIn], [OtherDocDesc1], [OtherDocDate1], [OtherDocDesc2], [OtherDocDate2],
[OtherDocDesc3], [OtherDocDate3], [NASPSearch], [NASPClearance], [NASPDealEntered], [NASPNotes])) COMO pev
EXTREMO
|