Forum Replies Created

Viewing 11 posts - 241 through 251 (of 251 total)

  • RE: DUPLICATE RECORDS

    If you can't touch the table structure, a loop using SET ROWCOUNT will limit the number of records deleted. Perhaps a cursor with using a select something like

    SELECT...

  • RE: Can I declare global variables?

    How about using a function?

  • RE: Identity skipping numbers when foreign key violate

    The identity increment can't be easily undone because another connection doing inserts into the same table might be affected.

    A COMMIT or ROLLBACK will not affect the next identity value to...

  • RE: T-SQL "shortcut"?

    The time to do most math calculations is small compared to network IO. I'd be very surprised if you could see much difference. An index on a wide...

  • RE: Dealing with ' and " in strings

    If you are only calling the insert from an application, perhaps a stored procedure with parameters collection can be used. A parameter defined as a string should not need...

  • RE: 2 Questions About Triggers

    I coded a few triggers. Here's my 2 bits.

    In the trigger you have access to the "inserted" and "deleted" tables. They will let you do set...

  • RE: Print statement in Stored Proc

    This has happened to me also. Would a statement like

    RAISERROR('FYI: This message should be sent without delay', 10, 1) WITH NOWAIT

    work for you? The severity is...

  • RE: HELP !!! sp_send_cdontsmail dont work for me...

    The script library for this site has the code for a CDO proc called "sp_SQLSMTPMail". It might be worth checking out.

  • RE: Output from dynamic sql

    You might try bol (bools online) for the topics "sp_executesql" and "Using sp_executesql". The object (e.g., table) names need to be fully qualified in order for SQL Server to...

  • RE: Creating a count field in DTS/T-SQL.

    Make sure the table is ordered by the column in question unless you want the count to reset. The UPDATE statement does not permit the order by clause. ...

  • RE: EMAIL in TRIGGER

    Do not trust xp_sendmail in a trigger. We (County of Marin) have use Exchange with an Outlook client and have had trouble from time to time with email. ...

Viewing 11 posts - 241 through 251 (of 251 total)