• What do you get for the following???

    SELECT *

    FROM citytime

    WHERE city_state='Mountain View, CA'

    ;

    If the answer is "more than 1 row", then you've probably identified the problem. Look at the data and see if your assumptios about what the citytime should be are actually correct.

    As a sidebar, the code you posted is VERY suseptible to SQL INJECTION and should be changed to parameterized embedded SQL instead.

    --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)