Forum Replies Created

Viewing 10 posts - 1 through 11 (of 11 total)

  • RE: writing function

    i have written t-sql

    but how can check entry date is this month or previous month

  • RE: writing function

    create FUNCTION [dbo].[svf_checkdate]

    (@pDate datetime

    --parameters

    --None

    )

    RETURNS datetime

    AS

    BEGIN

    -- Return variable

    DECLARE @_Asofdate as datetime

    --Main Query

    select @_Asofdate = c.currentdate from vew_Calendar c where c.CurrentDate= @pDate

    ...

  • RE: writing function

    suppose i have enter asofdate= 1/16/2009

    it should be same asofdate =1/16/2009

    because this month isn't end

    but if i have enter asofdate = 1/16/2008

    it should be asofdate=1/31/2008

  • RE: writing function fordate

    Timclosestatus is column name come from table

  • RE: writing function fordate

    can you please give example?

  • RE: multiple-part identifier could not be bound

    i need to write function

    first check asofdate is current month or prior month

    If as of date is prior month and timclose status = c then month end date

    else...

  • RE: multiple-part identifier could not be bound

    i need change as of date to default prior month end date

  • RE: multiple-part identifier could not be bound

    can i set

    set @_AsOfDate = @pAsOfDate

    set @_AsOfDate = dbo.svf_GetPriorMonthEndDate_asofdate()

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    go

    -- =============================================

    -- Description:APL Audit report dataset

    -- =============================================

    ALTER PROCEDURE [dbo].[rpt_APL_Audit_monthenddate]

    -- Parameters

    @pAsOfDate datetime,

    @pPortAccID int = null

    AS

    BEGIN

    ...

  • RE: multiple-part identifier could not be bound

    i have done

    set @_AsOfDate = dbo.svf_GetPriorMonthEndDate_asofdate()

    it not giving me error

    but i am not getting any data

    i am calling function dbo.svf_GetPriorMonthEndDate_asofdate()

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    go

    -- =============================================

    -- Description:Get Prior Month...

  • RE: multiple-part identifier could not be bound

    i have done that still giving same error

Viewing 10 posts - 1 through 11 (of 11 total)