Forum Replies Created

Viewing 15 posts - 2,836 through 2,850 (of 3,232 total)

  • RE: Need help optimizing this Join Fest :)

    Sorry for the late post.  I wrote this yesterday afternoon, but I was unable to post it due to a server outage.

    Again, without knowing your table/index schema information, all...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Requesting help creating ''''by month'''' summary query

    This should get you started.  You will have to add in all of the months and you will need to tweak it to handle the year.

    create table monthgroup (RowID int...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Need help optimizing this Join Fest :)

    This query will not work as is.  You have syntax errors in your joins, and SQL Server will not let you join the same table multiple times without defining table...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: How can I do this?

    This should return all rows from BL_IE and only rows from BL_D where the max_rev_flag = 'Y'. 

    SELECT BL_IE.key_no,  

        BL_IE.proc_date_time,  

        BL_IE.error_count,

        BL_IE.origin_code, 

        BL_IE.excep_message

    FROM BL_IE

        LEFT...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Deadlock Issues

    How many rows does your SELECT and DELETE statement process?  You need to check your execution plans for these 2 statements.  My guess is that the execution plan will not...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: How can I do this?

    "then I ONLY want those records returned from BL_D that have a max rev_no or max_rev_flag = 'Y'."

    Should this read, max_rev_no or max_rev_flag = 'Y'?  Are you looking for BL_D...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Virtual Server

    Here's another recent post with similar info:

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=282436

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Conversion/migration Query

    It sounds to me like you are wanting a way to populate NEW_TABLE and POSITIONS_TABLE from what you have in OLD_TABLE.  If this is true, and from what you've shown...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Cross Database Permissions

    User1 needs to exist as a valid user in your second database.  Moreover, User1 must have select permissions on whichever tables view1 touches. 

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Conversion/migration Query

    Where will you get the data for the Position_ID column?  Will Position_ID in your New_Table be an IDENTITY column?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Cross Database Permissions

    Are you able to select from view1 as user1?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Delete without locking?

    "I tried using ROWLOCK on the DELETE, but I believe the DELETE's are too large. "

    SQL Server may decide to escalate the lock method even when you use a...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Error when running DTS via a job

    Yes, it could be a privelege/rights issue.  If you are able to execute the package from the DTS designer, but cannot as a job, check the job owner.  Make sure...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Calling a stored procedure from another

    I would recommend adding some error handling to the nested stored procedure call.

    DECLARE @ReturnValue int

    EXEC @ReturnValue = proc_Call_Some_StoredProcedure

    SET @intSQLErrorNumber = COALESCE(NULLIF(@ReturnValue,0),@@ERROR,1001)

    IF @intSQLErrorNumber <> 0 GOTO ErrorHandler

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Delete without locking?

    All DELETES require locks, but keep in mind that deleting a large group of rows does not always mean that your whole table will be locked.  SQL Server will determine...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 15 posts - 2,836 through 2,850 (of 3,232 total)