Forum Replies Created

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

  • RE: Parameter in DTS

    "Pay attention Pike!"

    Lets try a better looking EXEC shall we...

    EXECUTE ( 'SELECT * FROM '+@table+' WHERE ErrorOccurred BETWEEN '''+convert (varchar(30), @date_from, 103 )+''' AND '''+convert(varchar(30), @date_to, 103 ) +...

  • RE: Parameter in DTS

    Using your statement 2 as an example:

    Replace the SELECT with an EXECUTE, thus

    EXECUTE sp_SelectMyTable ( @table=?, @date_from=?, @date_to=?)

    Create the sp_SelectMyTable stored procedure:

    CREATE PROCEDURE sp_SelectTable

     @table varchar(50)

     , @date_from datetime

     , @date_to datetime

    AS

    EXECUTE ('SELECT...

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