Forum Replies Created

Viewing 14 posts - 1,231 through 1,244 (of 1,244 total)

  • RE: If Celko was a rock star, which one would he be?

    Can't picture Celko as a rock star... I'm going off book and saying a cross between Anton LeVey and Ming the Merciless...

  • RE: How to copy a nested sub-tree from one node to another

    The following should do the trick. I left the "Reference_Desc" blank (marked as "new data") because it's redundant and can be calculated from the Reference_Code column easy enough.

    Also, left various...

  • RE: How to copy a nested sub-tree from one node to another

    Gottcha... Can the new ReferenceIDs be any INT as long as they don't already exist in in the table?

  • RE: How to copy a nested sub-tree from one node to another

    SQL doesn't really have a concept of copy/paste vs cut/paste, so that doesn't really add a lot of clarity.

    Are trying to move 4451 under 2, all alone and have 91...

  • RE: Grab OrderID

    Is this what you're looking for?

    IF OBJECT_ID('tempdb..#temp') IS NOT NULL

    DROP TABLE #temp

    GO

    CREATE TABLE #temp (

    BigNastyString VARCHAR(255)

    )

    INSERT #temp (BigNastyString) VALUES

    ('some other characters)ADR*XYZ*2015123456BH0001~(and some other characters'),

    ('some other characters)ADR*XYZ*2015113955AB0002~(and some other characters'),

    ('O****MI*16659434~TRN*2*A257330~STC*~ADR*XYZ*2015123456BH0001~REF*BLT*831~DTP*472*RD8*20141216-20141216~HL*8*3*PT~NM1*QC*1*CRUZ*ILDEMARO****MI*ADR32624R01~TRN*2*A23~ADR*XYZ*2015113955AB0002~*A2:20*20150506*WQ* ')

    SELECT

    SUBSTRING(t.BigNastyString,...

  • RE: How to copy a nested sub-tree from one node to another

    Either it's not clear what you're trying to do or you're over think it... You're working with a simple adjacency list, which means that you can easily move any node...

  • RE: Percolating Data

    Here's another option...

    CREATE TABLE #address (

    address_id INT,

    addr1 CHAR(30),

    addr2 CHAR(30),

    addr3 CHAR(30),

    addr4 CHAR(30),

    addr5 CHAR(30),

    addr6 CHAR(30)

    )

    insert into #address values (1, '', '111 Main Street', '', 'Main...

  • RE: Update takes too long

    Jeff Moden (5/12/2015)


    I love it. A newbie to the forum with just 7 points and already posting million row test tables.

    Welcome aboard, Jason!

    Thank you sir! I've been a long...

  • RE: Update takes too long

    I'm with Lynn... We need a test...

    Let's start with 1M rows of data...

    /* ========================================================

    Throw 1M rows of data into a table (no index to start with)

    ======================================================== */

    IF OBJECT_ID('dbo.Numbers') IS NOT...

  • RE: Add business days to a date using a Calendar table

    You can try something like this... (Note... I built this using our Calendar table which uses isWeekdat & isHoliday to determine working days).

    IF OBJECT_ID('tempdb..#temp') IS NOT NULL

    DROP TABLE #temp

    GO

    CREATE...

  • RE: Import reports

    Shouldn't be a problem. Just keep in mind that your project will go through a conversion process. Be sure to make a copy of your project and it's associated RDLs...

  • RE: Reducing Index Fragmentaion during Inserts

    The partitioning idea makes sense... But I don't see how adding an identity column and making it the clustered index buys you anything if none of you queries are going...

  • RE: Reducing Index Fragmentaion during Inserts

    Lowering the fill factor on your index(es) may help as well. Lowering the fill factor will create more pages but it can certainly help reduce (or prevent) fragmentation when you...

  • RE: Stuck with LIKE criteria

    Removed... Faster solution has already been posed,

    Jason

Viewing 14 posts - 1,231 through 1,244 (of 1,244 total)