SHARE
TWEET

Untitled

a guest Jun 16th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ALTER VIEW [dbo].[vwDealHistoryPITA]
  2. AS
  3. SELECT ROW_NUMBER() OVER (PARTITION BY cm.CodeMasterID ORDER BY cm.CodeMasterID, cm.LastUpdateDate) AS Deal_HistoryID,
  4.        cm.CodeMasterID,
  5.        cm.ProjectName,
  6.        cm.[Status],
  7.        d.CompanyID,
  8.        d.DealTypeMasterID,
  9.        cm.[Description],
  10.        d.PassiveInd,
  11.        d.ApproxTPGOwnership,
  12.        d.NumberBoardSeats,
  13.        d.FollowonInvestmentInd,
  14.        d.SocialImpactInd,
  15.        d.EquityInd,
  16.        d.DebtInd,
  17.        d.RealEstateInd,
  18.        d.TargetPctgReturn,
  19.        d.ApproxTotalDealSize,
  20.        cm.CurrencyCode,
  21.        d.ConflictCheck,
  22.        cm.CreatedDate,
  23.        cm.CreatedBy,
  24.        cm.LastUpdateDate,
  25.        cm.LastUpdateBy,
  26.        d.ExpensesExceedThresholdDate,
  27.        d.CurrentTPGCheckSize,
  28.        d.PreferredEquityInd,
  29.        d.ConvertibleDebtInd,
  30.        d.OtherRealAssetsInd,
  31.        d.InitialTPGCheckSize,
  32.        d.DirectLendingInd,
  33.        cm.NameApproved,
  34.        cm.FolderID,
  35.        cm.CodaProcessedDateTime,
  36.        cm.DeadDate,
  37.        d.SectorMasterID,
  38.        d.DTODataCompleteDate,
  39.        cm.ValidFrom AS CodeMasterValidFrom,
  40.        cm.ValidTo   AS CodeMasterValidTo,
  41.        d.validFrom  AS DealValidFrom,
  42.        d.validTo    AS DealValidTo
  43. FROM dbo.CodeMaster FOR SYSTEM_TIME ALL cm
  44. INNER JOIN dbo.Deal FOR SYSTEM_TIME ALL d ON cm.CodeMasterID = d.CodeMasterID;
  45. GO
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top