Forum Replies Created

Viewing 15 posts - 16,246 through 16,260 (of 59,101 total)

  • RE: What is Normal?

    David.Poole (11/28/2016)


    Jeff Moden (11/26/2016)


    David.Poole (11/26/2016)


    Storing guids in things like RedShift or Vertica is fun. Not only do you have to store them as CHAR(36) but by definition they are...

    --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: Float vs Decimal?

    Same here, Magoo. Absolutely agree. The problem is that most people won't be aware and will write the code in the "extraordinary proof" manner.

    I'll also state that they...

    --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: OpenRowset for CSV File

    joshua 15769 (11/27/2016)


    If I could only know how to check the number of rows in this kind of CSV, that would be great!

    It's easy. Don't set FIRSTROW and...

    --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: What is Normal?

    dalland (11/27/2016)


    Phil Factor (11/22/2016)


    There's nothing that says a table can't have more than one unique index on it.

    it certainly can. It is no crime but it is 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: Float vs Decimal?

    Jeff Moden (6/26/2008)


    JohnG (6/26/2008)


    For financial systems, accuracy is paramount.

    So I'd use DECIMAL

    And, that is precisely why I'd use float instead... but, whatever... it's really hard to convince people even with...

    --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: one of my stored proc is getting stuck in activity monitor for 2 hours.

    rajemessage 14195 (11/27/2016)


    but strange thing is after killing the spid , when i run the same stored proc it runs nicelly , only thing i could see is, that it...

    --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: should i use temp table all the time while making loops

    rajemessage 14195 (11/27/2016)


    hi,

    i use loops sparigly , but when ever i use them , i see following pionts like

    1) i am reading same table mulitpule times...

    --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: OpenRowset for CSV File

    p.s.

    The code I posted won't work without error when you do upgrade to 2012 or greater because Bulk Insert will count the row terminators instead of the field delimiters 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: OpenRowset for CSV File

    joshua 15769 (11/25/2016)


    Hi Sir Jeff!

    Thank you for your time!

    Sir, I have uploaded the data files which you wanted. Thanks again!

    Going back to the last thread that we have discussed sir,...

    --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: What is Normal?

    Sergiy (11/25/2016)


    RonKyle (11/23/2016)


    What is you natural key for "person" records?

    In most cases there isn't one. I would certainly never use an SSN for this. But that doesn't mean...

    --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: What is Normal?

    David.Poole (11/26/2016)


    Storing guids in things like RedShift or Vertica is fun. Not only do you have to store them as CHAR(36) but by definition they are unique and don't...

    --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: SQL gourping by multiple columns help

    tonytohme (11/25/2016)


    Hi Jeff

    Firstly no I never even heard of ACN.

    Second you are right I might be trying to get data from across multiple years in that case I would...

    --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: SQL gourping by multiple columns help

    tonytohme (11/25/2016)


    Hello,

    I have the following table:

    ID bigint,

    Name varchar(50),

    Address varchar(250),

    RecDate smalldatetime,

    PurPrice decimal(7,2),

    PaidBy varchar(50)

    I am trying to come up with a select statement that will group the results by ID and sums...

    --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: OpenRowset for CSV File

    joshua 15769 (11/24/2016)


    Yes Sir, I created a XML file, here is the screenshot.

    Do take note i change my terminator from '","' to ','

    and here sir is the textfile

    I would like...

    --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: OpenRowset for CSV File

    joshua 15769 (11/23/2016)


    I tried using your code sir, first, i uploaded the data as temp table in my database (into #TestCSVImport). I also renamed the column names of the CSV...

    --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 - 16,246 through 16,260 (of 59,101 total)