Forum Replies Created

Viewing 15 posts - 18,631 through 18,645 (of 59,072 total)

  • RE: Reorg index, rebuild index and reorg table

    ScottPletcher (1/12/2016)


    never use a default clustered index on a table

    I've got to say that I totally disagree with that. The clustered index is frequently used for row control...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Header and Detail Data

    Orlando Colamatteo (1/12/2016)


    Anyway, here is a resultset with the data in a fixed-width format and you can tweak it from here. If the header and detail lines need to have...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: the use of CTEs

    mister.magoo (1/11/2016)


    Jeff Moden (1/8/2016)


    Hugo Kornelis (1/8/2016)


    Jeff Moden (1/7/2016)


    Alan.B (1/6/2016)


    You can't write a recursive CTE with using pre-CTE features.

    Technically correct because only an rCTE can be an rCTE but the...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: the use of CTEs

    Alan.B (1/11/2016)


    Jeff Moden (1/7/2016)


    Alan.B (1/6/2016)


    You can't write a recursive CTE with using pre-CTE features.

    Technically correct because only an rCTE can be an rCTE but the rather well advertised rave...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Splitting out a row into multiple rows.

    Thanks folks. I apparently missed Paul's good article on Temp Tables. I found where (I think) I first posted the notion (which, ironically, had a post after mine...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Header and Detail Data

    bpowers (1/11/2016)


    Well after submitting the SSIS file for testing I was notified that the Header and Detail must be grouped together. Ughhh... If you still have a bcp option you'd...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Rulebreaking Developers

    Ed Wagner (1/11/2016)


    Eric M Russell (1/8/2016)


    Matt Miller (#4) (1/8/2016)


    Eric M Russell (1/7/2016)


    ... I saw was of a press conference where the upper management of VW seems to indicate that the...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Tree stucture

    Ah yes. Thanks for the catch on my miss. And, I agree. We're assuming the proper FK's are in place.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Tree stucture

    karunakar2351 (1/11/2016)


    Hi,

    declare @test-2 table (ParentId varchar(10), ChildId varchar(10))

    declare @test1 table (ParentId varchar(10), ChildId varchar(10))

    insert into @test-2 (ParentId, ChildId)

    select 'a', null

    union all

    select 'a', null

    union all

    select 'b', null

    union all

    select 'c', null

    union all

    select...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Splitting out a row into multiple rows.

    Eirikur Eiriksson (1/10/2016)


    Jeff Moden (1/10/2016)


    ...Last but not least, you've made the code work and that's great. Next, the above code will help make it fast. Now you need...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: cant find download link for SQL server 2005 (64 bit)

    Eirikur Eiriksson (1/10/2016)


    adas-768309 (7/18/2011)


    Hi all

    I have been using SQL server 2005 Standard (32-bit).

    I am planning to upgrade to 64 bit. But unfortunately I cant find a download link for SQl...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Moving data older than 30 days

    regrahc (1/10/2016)


    Hello,

    SQL Newbie here - need to move data to another table after it's 30 days old - not getting an error message, but it isn't moving data that I...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: filter monthly activity file from yearly file

    Rankerg (1/10/2016)


    Thanks Hugo, Not sure if this is TSQL or ETL question so posted on both, please advise ?

    Doesn't matter. Most of us monitor all the forums and so...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: get all dates between 2 dates 7 days apart

    Eirikur Eiriksson (1/9/2016)


    Jeff Moden (1/9/2016)


    Eirikur Eiriksson (1/9/2016)


    If the logic can be encapsulated in the actual date table and it is used more than once then a physical date table is...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Splitting out a row into multiple rows.

    Cheryl McLaughlin-385812 (1/6/2016)


    That worked, thanks! I am showing what I did in case there is someone else that is in a similar situation:

    CREATE PROCEDURE [dbo].[sfc_SPName]

    @SCHEDULEDATE DATETIME

    AS

    SET NOCOUNT ON;

    CREATE TABLE...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 18,631 through 18,645 (of 59,072 total)