Forum Replies Created

Viewing 15 posts - 36,316 through 36,330 (of 59,067 total)

  • RE: How to return last 10 rows of a table?

    mm.sailaja (10/18/2010)


    Hi guys!!

    I know that a table is an unordered. Order by clause gives us the result in a sorted manner. I don't want the result in a sorted order....

    --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: Convert Date (dd-MM-YYYY) to (dd/MM/YYYY)

    gunapriyan (10/17/2010)


    Dear Sir,

    Thanks for your reply.

    Actually I am developing a software with the help of VB 6.0 and SQL Server 2005.

    In Date Part, Initially i have put DateTime Picker...

    --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: Date Gap Problem

    Paul White NZ (10/18/2010)


    The original question doesn't give expected output or the number of rows to be processed, so this is a valid alternative:

    SELECT *

    FROM #membership...

    --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: Date Gap Problem

    Dave Ballantyne (10/18/2010)


    I would be interested in comparative performance over a larger dataset. 😉

    No problem. Here's some test data...

    --===== Expand the test data using "lasagne" copies of the original...

    --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: UDF Vs Subquery performance

    SQL* (10/17/2010)


    How to make use of UDF or subquery?

    Which is better one with performance considerations?

    thanks

    "It Depends". You have to test each way based on the situation you're trying...

    --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: Convert Date (dd-MM-YYYY) to (dd/MM/YYYY)

    My recommendation is to lookup the word REPLACE in Books Online. It'll show you how to easily do such a thing. I'd show you the actual code but...

    --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 There That Many GUIDs?

    Although having two systems come up with the same GUID is a bit like having two comets appear in the same mile across 14 quadrillion Milky Way galaxies, it can...

    --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 There That Many GUIDs?

    Eric Russell 13013 (10/12/2010)


    As for global uniqueness, I don't see why the column combination (center_id + cashregister_id + transaction_date) or database id + transaction identity id would not be as...

    --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 There That Many GUIDs?

    Grant Fritchey (10/12/2010)


    They should be used where appropriate...

    I apologize for puting you on the spot but what do you consider an appropriate use for them is especially since even MS...

    --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: When Times are Tough, Do You Rise to the Occasion?

    The answer is the same answer as to anything else... "It Depends".

    --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 to make tempdb use > 1 datafile

    Ah... sorry... didn't see the age of the thread or the recent jump in. Still, what I wrote is true. 😀

    --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 to make tempdb use > 1 datafile

    JC-3113 (6/29/2009)


    Hi Jerry

    I am looking at your code for tempdb files

    I am new to sqlserver 2005

    Not up to speed on TEMPDB files yet

    i understand the creation of the multiple tempdb#.mdf...

    --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 to return last 10 rows of a table?

    CELKO (10/17/2010)


    Please any book on RDBMS. Tables have no order. Your question makes no sense.

    Read Codd's Information Principle, so you will see what a stupid question this is. An...

    --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: Date Gap Problem

    WayneS (10/17/2010)


    Jeff Moden (10/17/2010)


    WayneS (10/17/2010)


    This works, but the performance is atrocious.

    Because of the very large datespan from any date in this century to 9999-12-31, I'm thinking that my ol' friend...

    --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: Date Gap Problem

    WayneS (10/17/2010)


    Jeff Moden (10/17/2010)


    Sorry... forgot to print out the results...

    MemberIDStartDateEndDateGap

    12006-10-01 00:00:00.0002007-12-31 00:00:00.0000

    12008-01-15 00:00:00.0002008-12-31 00:00:00.00015

    22007-02-03 00:00:00.0002007-12-31 00:00:00.0000

    22008-01-15 00:00:00.0002008-12-31 00:00:00.00015

    32006-10-01 00:00:00.0002007-09-30 00:00:00.0000

    32008-01-01 00:00:00.0002008-12-31 00:00:00.00093

    Jeff, are these gaps correct? By my calc, there...

    --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 - 36,316 through 36,330 (of 59,067 total)