Forum Replies Created

Viewing 11 posts - 16 through 26 (of 26 total)

  • RE: Calculate Holidays

    An alternative way of doing it

    but better was to create a calendar table with relevant columns, like the ones in the CTE's in the function, then its just a select...

  • RE: Change Stored Procedure Automaticly

    you can replace that CURSOR with

    --Add variable all text of Proc, no need for CURSORS

    DECLARE @QueryAll AS VARCHAR(MAX)

    SELECT @QueryAll = COALESCE(@QueryAll,' ') + ProcTxt

    FROM #TempProcScript

  • RE: Executing dynamic functions in table select

    i know that, was an try to explain of what i want

    The Dixie Flatline (8/25/2016)


    EXEC(FunctionColumn) AS FunctionResult

    Sorry, but functions can't call procedures. They can only call other functions....

  • RE: Executing dynamic functions in table select

    ok, now can we go back to the discussion?

  • RE: Executing dynamic functions in table select

    can you go back to the point of the discussion as i ask?

    this is not about hollidays, it was a example, the focus is what i post before

    paulo.margarido (8/25/2016)


    The discussion...

  • RE: Executing dynamic functions in table select

    I mark The Dixie Flatline answer as solution, because is a good idea

    to implement it i need to add a as many columns to my holidays table as distinct parameters...

  • RE: Executing dynamic functions in table select

    Thanks

    That was no quite the point, but it helped and give me a nice starting point to go

    As i say, i have no performance problems, its a small table, i...

  • RE: Executing dynamic functions in table select

    But this is the return data, returned by my SProc similar to the one of the example

    just the two columns, column with "code for the function" and columns with its...

  • RE: Executing dynamic functions in table select

    some sample return data:

    Funcao Resultdate

    ------------------------------------------------------------------------------------------------------------------------------------------

    DATEADD(d, 39, dbo.fncDiaPascoa(@Year)) 2016-05-05 00:00:00.000

    dbo.fncProcurarData(DATEADD(D, 0,DATEADD(M, 9, DATEADD(YY, @Year-YEAR(0), 0))), 1, 7, 2 ) 2016-10-03 00:00:00.000

    dbo.fncCalcularData(DATEADD(D, 0,DATEADD(M, 7, DATEADD(YY, @Year-YEAR(0), 0))), 2, 4) 2016-08-29 00:00:00.000

    fncDiaPascoa() gives easter day for given...

  • RE: Executing dynamic functions in table select

    i'm aware of what "inline table-valued functions" are, i have a few of my own in the DB

    what i ask is how can i do it that way

    if you can,...

  • RE: Executing dynamic functions in table select

    Thanks for the response

    There are not big performance issues, the table has only 400 rows

    but is for the sake of making it better, and learn something with it

    what do you...

Viewing 11 posts - 16 through 26 (of 26 total)