Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)

  • RE: Variable in Dynamic SQL

    If you require the number of rows at the output from the proc then try this:

    create Procedure dbo.RecCount (@Table as nvarchar(100)) As

    Begin

        DECLARE @cntTotal varchar(10)

        DECLARE @sql nvarchar(400)

       ...

  • RE: Triggers SQL Server (Please Help!)

    No problems, glad to help.

  • RE: Triggers SQL Server (Please Help!)

    Ok, well the alias "i" must be included as that is being referenced to get the maximum sequence number in this step:

    (IsNull((Select Max(SeqNbr) From TicketH h Where h.TicketID = i.TicketID),...

  • RE: Triggers SQL Server (Please Help!)

    You have missed the alias for the "inserted" table;

    FROM inserted i

    Does that cure it?

  • RE: Triggers SQL Server (Please Help!)

    So basically then TicketH is to be an audit trail of inserts and updates done to the Ticket table and both the Insert and Update triggers will add a new...

  • RE: DTS and Excel

    Check out this article, it may help: "Deleting an Excel WorkSheet from within a package" http://www.sqldts.com/default.aspx?245

    A method I use is to have Excel templates set up in a...

  • RE: Alter table name

    Could you not just use the system procedure to rename the current tables to the archive name:

    EXEC sp_rename 'customers', @filename

    and then just recreate the original tables using CREATE TABLE.  This...

  • RE: Reading image data

    Oops .  Cheers Pascal, I copied and pasted in a rush, doh!

  • RE: Reading image data

    I am making the assumption that each row that has the Version, Type, and an image.  Hence you are trying to get the latest version and then return the image for...

  • RE: reporting

    One way of doing what you want is using several dynamic SQL statements.  To reference temp tables from different procedures you need to reference them as global (## instead of...

  • RE: reporting

    Firstly pass your stored procedure the page number that you wish to view, and optionally the number of items per page.  With your summary table, insert the results into a...

  • RE: Problems with Global Variables

    Your code is sound but the issue is that the variable is declared as a type variant whereas the DTSGlobalVariables requires a string.  If you simply add some double quotes to...

Viewing 12 posts - 1 through 12 (of 12 total)