Forum Replies Created

Viewing 15 posts - 61 through 75 (of 114 total)

  • RE: Insert a Parent and Child record in one statement

    if the parent table uses an identity field for the primary key, you can assign a variable to the identity inserted with the scope_identity() function.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Heaps

    I'm cool with it. Oh wait. You were talking to SKYBVI.... 😀

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: add identity to existing primary key column

    Here are the steps:

    1) drop the foreign keys

    2) Add the identity column to the table

    3) Add a field to the related tables to hold the new identity column

    4) Update the...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Heaps

    I'm still confused about how the page is full. Since data pages are 8K and we are only using 4K, how is that full?

    Also, in my opinion, the question...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: FIX LENGTH

    --Removed--- 🙂

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: FIX LENGTH

    Instead of using LEFT(RTRIM(LTRIM(ARMNAME)),25)

    use

    LEFT(RTRIM(LTRIM(ARMNAME))+SPACE(25),25)

    You'll end up with 25 characters everytime.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: newbie - how to insert [FILE_RUN_DATE] [varchar](8) NULL into destination column [FileRunDate] [datetime] NULL

    SQL Server 2005 only has the datetime field type. A date type field was added in SQL 2008.

    Your conversion should give you a date with all zeros for the...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Simple Query

    I'm glad it helped!

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Slow Processing Stored Procedure

    yeah that looks like homework. If it is, ask your classmates or teacher.

    drop the cursors and rethink your approach.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Tuning a plain select statement

    I would ask why you need to use a temp table at all. The CTE option described would likely help (but again we need the details.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Finding duplicate values in very large table. Select Row_number() over too slow

    Let us know how it goes!

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Finding duplicate values in very large table. Select Row_number() over too slow

    Sounds like historical records without dates or status flags 🙂

    Anyway, I hope the new version works well for you. A non-clustered index on those two fields should dramatically speed...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Finding duplicate values in very large table. Select Row_number() over too slow

    I'm with you on that one. I didn't want to clutter up the quick answer, but that is a great question. I think i'm afraid to hear the...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Finding duplicate values in very large table. Select Row_number() over too slow

    Well let's hope it helps. Just based on the numbers you replied back with they should at least look at other "options".

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Simple Query

    This query should do what you are looking for (i think...i'm not entirely sure what you are looking for):

    (I also don't see why you need the RAWH table, but i...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

Viewing 15 posts - 61 through 75 (of 114 total)