Forum Replies Created

Viewing 15 posts - 35,551 through 35,565 (of 59,099 total)

  • RE: need help in t-sql scripting

    maheshcrazy.it (12/28/2010)


    I am using SS2K8 SSMS,

    Fld1Fld2Fld3

    A1/15/201015

    A2/16/2010

    A4/17/201035

    A5/15/201065

    A6/16/201010

    A8/17/2010

    A10/15/201068

    A12/16/201045

    B3/16/201052

    B9/16/201063

    B11/16/201045

    ...

    --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: How can i display the name of the folder from a field in a table.

    toddasd (12/28/2010)


    You could also use the split function and get a list of all the folders:

    SELECT * FROM dbo.fn_Split('/folder/folder1/folder2/12345-ABCD.txt','/')

    WHERE IDX = 3

    I notice you're using "fn_Split"... is that the splitter...

    --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: How can i display the name of the folder from a field in a table.

    Sahasam (12/28/2010)


    you rock Jim.

    I just found other way.

    Select

    reverse(substring(reverse(PATH),charindex('/',reverse(PATH)), charindex('/',reverse(PATH),charindex('/',reverse(PATH))+1) - charindex('/',reverse(PATH))+1)) as foldername

    FROM table

    That's going to be a performance problem. REVERSE is one of the more "expensive" functions...

    --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: Performance challenge

    hreisterp (12/28/2010)


    Jeff Moden (12/28/2010)


    hreisterp (12/28/2010)


    OK. Another try... 😉

    Used then outstanding LINQPad [/url]tool to do the same.

    int[] data=data=Enumerable.Range(2,65536).ToArray(); // learned this today 🙂

    var q = from s in data where !(from...

    --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: Need a suggestion for using Nolock and Readpast

    tfifield (12/28/2010)


    Nadrek,

    I disagree that OLAP can allow for a small percentage of bad data. If I were to show the owners of companies that I consult for 2 different...

    --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: Partitioned Indexes

    TheSQLGuru (12/28/2010)


    There is one VERY important point you are missing about table partitioning: it is NOT primarily about performance, but rather for MAINTENANCE/MANAGEMENT. If it also happens to...

    --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: Copy records of all Tables from one Database to another Database

    Agreed... especially when you consider dependency order created by DRI.

    --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: Are the posted questions getting worse?

    The Dixie Flatline (12/28/2010)


    Jack Corbett (12/28/2010)


    Now listening to Jeff's Tally Table session on the PASS Summit DVD. Now I have a voice to put with his posts.

    Jeff has a...

    --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: Are the posted questions getting worse?

    Jack Corbett (12/28/2010)


    Now listening to Jeff's Tally Table session on the PASS Summit DVD. Now I have a voice to put with his posts.

    With what you know, that one...

    --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: Convince me to upgrade to 2008

    Indianrock (12/28/2010)


    Thanks Jeff. I'm taking serious note of all being said here, and passing it to our Corporate DBA for review also. I'm not in a position...

    --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: Partitioned Indexes

    I was hoping that someone more skilled at reading XML execution plans than I would stop by to answer your question.

    I see that the partitions are coming into play...

    --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: Performance challenge

    hreisterp (12/28/2010)


    OK. Another try... 😉

    Used then outstanding LINQPad [/url]tool to do the same.

    int[] data=data=Enumerable.Range(2,65536).ToArray(); // learned this today 🙂

    var q = from s in data where !(from o in data...

    --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: Performance challenge

    hreisterp (12/28/2010)


    Thanks for your post. But that was not the challenge. Actually loading all prime number from a pre-computed list is MUCH faster (if it is not huge number you...

    --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: Performance challenge

    hreisterp (12/28/2010)


    The performance challenge is not to insert the data but to select the prime number. 🙂

    Heh... I know... but if it takes you 6 seconds to create only 60,000...

    --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: bcp or sp_send_dbmail

    asdfgh-617842 (12/27/2010)


    fixed the 'sp_send_dbmail .csv attachment Xcel not opening properly - putting all data in one column' issue with a small hack:

    in sp_send_dbmail, do:

    @query_attachment_filename = 'blah.csv'

    ,@query_result_separator = ' ...

    --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 - 35,551 through 35,565 (of 59,099 total)