Forum Replies Created

Viewing 4 posts - 13,456 through 13,460 (of 13,460 total)

  • RE: Index on every Foreign Key?

    Essentially, that is exactly what I was wondering;

    For fun, I wrote a script that would create an index for every foreign key that did not have an index yet; but...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: All or none Transaction

    I would suggest using XACT_ABORT; it will automatically rollback a transaction, and stop further statements from executing in the transaction when an error is encountered:

    SET XACT_ABORT ON

    BEGIN TRAN -- with...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Nested Cursors

    @@fetch_status is the problem here; it doesn't revert back to the outer loops 'previous' fetch status after it complete's the inner loop.

    wouldn't @@fetch_status only allow the inner loop to run,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Generate SQL Script...

    I just contributed a script that does this; everyone always points at tools to do it, but I felt it was a good challenge to try and write a SQL...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 4 posts - 13,456 through 13,460 (of 13,460 total)