• thejordans21 (7/28/2014)


    I don;t know how to set that up. Iout the plant and plant desc into another temp table and I am trying to use that to popllaute the orginal temp table

    the temp table was so that you could actualyl see a set based example.

    i kind of know your column names, assuming what you posted was correct.

    the example i posted would work whether there was a million rows or just one.

    for example, if you run this command, changing the YourTableName to your Real Table, and you look at the data, would that match the rows you want to affect?

    SELECT * FROM YourTableName WHERE VENDOR <> 'NOPE';

    a set base doperation would modify the same rows that command returns in a single command...

    that's the mental shift from programming a process (row-by-agaonizing row) to a set based operation: instead of updating a million things one at a time, you use a set based operation once to do a million updates.

    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!