• Last day of Previous Financial / Fiscal Year

    Date: 2012.01.16 | Category: SQL | Response: 0

    Hi,

    Here is a sql code that will create function. This function can be used in your SQL queries to identify the last day of the last financial year.

    Financial Year = 1st July to 30th June. So, in this case when below Select query is run you will get YYYY-06-30.

    SELECT DBName.dbo.ufn_End_Prev_FY(GETDATE()) AS'End_Prev_FY';

    Create below functions as “Scalar Valued Functions”

    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO

    CREATE FUNCTION [dbo].[End_Prev_FY]
    (
         
    )
    RETURNS SmallDatetime
    AS
    BEGIN
          -- Declare the return variable here
          DECLARE @End_Prev_FY SmallDatetime
         
          DECLARE @CurrentFinancialYear as  SmallDatetime
          Declare @CurrentYear as int
          Declare @CurrentDate as SmallDatetime
     
          SET @CurrentDate =  GETDATE()
          SET @CurrentYear = YEAR( @CurrentDate)
          --SELECT @CurrentYear
     
          IF  DAY(@CurrentDate) >= 1 and MONTH(@CurrentDate) >= 7
                SET  @CurrentFinancialYear = cast ( @CurrentYear as varchar) + '-06-30'
               
          IF DAY(@CurrentDate) <= 31 and MONTH(@CurrentDate) <= 6
                SET @CurrentFinancialYear = cast ( (@CurrentYear -1) as varchar) +'-06-30'
               
         
         
          -- Add the T-SQL statements to compute the return value here
          SELECT @End_Prev_FY = @CurrentFinancialYear
     
          -- Return the result of the function
          RETURN @End_Prev_FY
     
    END
  • SSRS — Graph / Chart

    Date: 2011.12.16 | Category: SSRS, Videos | Response: 0

    Hi all,

    This video contains step by step process to create a column graph / chart in SSRS.

    SSRS 2008 Graph / Chart
    Read the rest of this entry »

  • SSRS — Date Parameter

    Date: 2011.12.16 | Category: SSRS, Videos | Response: 1

    Hi all,

    This video contains step by step process to create a report with Date Parameter in SSRS Report .

    SSRS 2008 Report with a Date Parameter
    Read the rest of this entry »

  • SSRS 2008 R2 — Multivalued parameter

    Date: 2011.12.10 | Category: SSRS, Videos | Response: 0

    Hi all,

    This video contains step by step process to create a SSRS Report with drillthrough or linked report functionality.

    SSRS 2008 Report with Drilldown functionality
    Read the rest of this entry »

  • SSRS 2008 R2 — Drillthrough or Linked Reports

    Date: 2011.12.10 | Category: SSRS, Videos | Response: 0

    Hi all,

    This video contains step by step process to create a SSRS Report with drillthrough or linked report functionality.

    SSRS 2008 Report with Drilldown functionality
    Read the rest of this entry »

Page 1 of 512345