• sanjeev_krs2004 (9/2/2008)


    Thanks a lot 🙂

    I got it; could you please tell me how to use for loop if I need to pick up one of the different lookup (drop-down) values.

    for example, I want to update the flag to true in account table. but before updating the value I must compare one field (say id) with the one in another table but is in lookup format means you can select one value from the drop down.

    Thanks

    euhm ... there is no "dropdown" in sqlserver.

    The only thing you have is a set of rows (from a table, view, ..)

    just add an extra

    and exists (select * from your_lookup_table LT where LT.id = I.id)

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me