• your example's messing you up... a row of data is just that: each element is related to the others. grabbing a value from another row? why?

    if you substitute names for your numbers, you'll see why it doesn't seem right:

    col1 col2 col3

    George Washington Virginia --5 3 8

    Abraham Lincoln Illinois --6 2 9

    Bill Clinton Arkansas -- 7 1 10

    would you really want:

    col1 col2 col3

    George Clinton Virginia --5 1 8

    Abraham Lincoln Illinois --6 2 9

    Bill Washington Arkansas --7 3 10

    show us the REAL code(not the pseudo code you tried to show as an example) so we can really help you.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!