Posted on: 2/11/2015 8:56:52 PM | Views : 560

Dear Guys,
 
I have tried for aging report query , but still my expected results is not come. Please go through below the table and script data for your reference. Please wirte a query for aging report. 
 
USE [SAMPLES]
GO
 
/****** Object:  Table [dbo].[NEW_DCB_REPORT]    Script Date: 02/12/2015 01:19:06 ******/
SET ANSI_NULLS ON
GO
 
SET QUOTED_IDENTIFIER ON
GO
 
SET ANSI_PADDING OFF
GO
 
CREATE TABLE [dbo].[NEW_DCB_REPORT](
      [MFDB_LedgerNumber] [int] IDENTITY(1,1) NOT NULL,
      [MFDB_TxnDate] [datetime] NOT NULL,
      [MFDB_StateId] [int] NOT NULL,
      [MFDB_RegionId] [int] NOT NULL,
      [MFDB_BranchId] [int] NOT NUL ...

Go to the complete details ...