Forum Replies Created

Viewing 13 posts - 166 through 178 (of 178 total)

  • RE: Duplicate Employee Rows

    Non _ cursor method....(If I made the wrong assumption on which is the duplicate employee_id (highest or lowest), change max to min and > to <)

    select min(e1.employee_id) 'employee_id', e1.employee_fname ...

  • RE: Beginning Database Design - Spot the Flaws

    Lots of great reading here.... another suggestion (way back to the table design)... At least for me if I can remember the author's last name that's doing...

  • RE: Show Table, Index and Image/Text size.

    Hi.. this is how I got a proc to run on all dbs

    you need to create the proc from the statement(s) on each database (using your standard distribution...

  • RE: Show Table, Index and Image/Text size.

    Getting Sizes for Each Index...

    I borrowed the concept to create a script to get size of each index instead of size of all indexes for the table.

    /* Get...

  • RE: SCOPE_IDENTITY Puzzle

    Thanks for the explanation Doug.

    It sure sounded like a concurrency problem. As you say the lock needs to be at the transaction level since both the insert...

  • RE: SCOPE_IDENTITY Puzzle

    Ok... not knowing how SQL Server handles concurrent users this is a big guess.

    SP InsertNewOrder:

    Begin

    Insert into order_table(..) values (...)

    SELECT SCOPE_IDENTITY();

    End

    Is it possible that between the time one user completes their...

  • RE: delete duplicate value

    Oh... and if you want to keep the same identity numbers SET IDENTITY_INSERT tablename ON before doing the copy out and recopy then SET IDENTITY_INSERT ... OFF when all...

  • RE: delete duplicate value

    When I tried an approach (just messing around) similar to the

    col1=val1 and col2=val2....

    when one of the cols had nulls then it doesn't equate to another null so the...

  • RE: Slow Queries

    This may or may not be relevant depending on who/how the query is run but would getting the first group of rows using a FAST n Query Hint on the...

  • RE: Having problem deleting through a cursor - newbie

    I agree that cursors are overkill. I was looking for a way to use cursors as part of learning about them is all Anyway, thanks for the response and...

  • RE: Having problem deleting through a cursor - newbie

    ok.... it turns out that you have to have a UNIQUE index on the table in order for the cursor to be UPDATE. I have other problems...

  • RE: SQL query need help!!! urget

    If there is a way to best do this without giving away solutions to the person who doesn't want to do homework(who would be in bad shape if they just...

  • RE: SQL query need help!!! urget

    Hi. I am new to this forum and also a student of SQL (but not with this homework) preparing for certification testing. These looked like very good exercises...

Viewing 13 posts - 166 through 178 (of 178 total)