I get invalid object name

  • USE [Forum_Invest]

    GO

    /****** Object: UserDefinedFunction [dbo].[getCashFlowInvItemP] Script Date: 11/23/2011 15:25:57 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    --select * from dbo.GetCashFlow('Aug 1, 2010', 'aug 31,2010' )

    ALTER function [dbo].[getCashFlowInvItemP](@idEntity int, @StartDate DateTime, @EndDate DateTime, @IdTransactionType int)

    Returns @TempGetCashFlowPmtAmount table

    (

    SalePercentage Decimal(18,2),

    IdInventory int,

    idProduct int,

    Tax1Percent Decimal (18,2),

    Tax1 Decimal(18,2),

    Tax2Percent Decimal (18,2),

    Tax2 Decimal (18,2),

    Tax3Percent Decimal (18,2),

    Tax3 Decimal (18,2)

    )

    as

    begin

    insert into @TempGetCashFlowPmtAmount (SalePercentage, IdInventory, idProduct, Tax1Percent, Tax1, Tax2Percent, Tax2, Tax3Percent, Tax3)

    SELECT Tbl_TransactionDetails.totalBeforeTax / Tbl_Transaction.totalItems AS SalePerc, Tbl_Transaction.idTransaction AS IDInv, Tbl_TransactionDetails.idProduct,

    Tbl_TransactionDetails.Tax1_percent, Tbl_TransactionDetails.Tax1, Tbl_TransactionDetails.Tax2_Percent, Tbl_TransactionDetails.Tax2,

    Tbl_TransactionDetails.Tax3_percent, Tbl_TransactionDetails.Tax3

    FROM Tbl_Transaction INNER JOIN

    Tbl_TransactionDetails ON Tbl_Transaction.idTransaction = Tbl_TransactionDetails.idTransaction

    Where Tbl_TransactionDetails.totalBeforeTax / Tbl_Transaction.totalItems > 0

    return

    End

  • You might have received Object name as well. Can you share that, it would be helpful to check the object and its use.

    -Johnson

  • Hi XBoxOwn,

    Would you please provide information about the problem you are facing ?? All I can see is the script for a function.

    Regards,

    Sujeet


    Sujeet Singh

  • Hi

    Is your function running same log in and Or have permission on object.

    Ali
    MCTS SQL Server2k8

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply