Results 21 to 30 of 197

Thread: IT Professionals

Threaded View

  1. #11
    Senior Member Diamond Hubber PARAMASHIVAN's Avatar
    Join Date
    May 2009
    Location
    Kailash
    Posts
    5,541
    Post Thanks / Like
    Is any one familiar with the hardest thing in SQL code, known as Cursor?

    I will explain what I need to do..

    I have table A , and Table B

    Table A Table B
    --------- ------------

    First_name First_name
    Last_name Last_name
    Address1 Address1
    Adreess2 Address2


    What I want to do, see if the firstname and last_name in Table B exist in Table A, if so then I want to update Address1 and address2 in table A with a value. This is easy to do for couple of rows.

    using

    Update Table A
    set address1='test',
    address2='test2'
    where first_name in (select first_name from table B
    where first_name like 'Super')


    but the problem is in Table B , i have 10,000 first_name with values in the address1.. I need update table A9Address1) with a value based on table B's contact name, hence you end up with 10,,000 different names, with 10,000 different address, if it was just one addreess it would have been very easy, I can use the above script.

    any ideas any one ?
    Om Namaste astu Bhagavan Vishveshvaraya Mahadevaya Triambakaya Tripurantakaya Trikalagni kalaya kalagnirudraya Neelakanthaya Mrutyunjayaya Sarveshvaraya Sadashivaya Shriman Mahadevaya Namah Om Namah Shivaye Om Om Namah Shivaye Om Om Namah Shivaye

  2. # ADS
    Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many
     

Similar Threads

  1. IT Professionals
    By Raghu in forum Miscellaneous Topics
    Replies: 206
    Last Post: 19th July 2007, 09:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •