Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Posts
    197

    Smile Unanswered: update table recursively

    Hi ,
    I want to update table such that

    data in excel sheet

    A1=first row of A colum
    B1=second row of B colum

    update T1 set col1=B1 where col2=A1
    update T1 set col1=B2 where col2=A2

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    insufficient information

    please do a SHOW CREATE TABLE for the table

    how are you reading the excel sheet?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2007
    Posts
    197

    Smile

    Quote Originally Posted by r937 View Post
    insufficient information

    please do a SHOW CREATE TABLE for the table

    how are you reading the excel sheet?
    SHOW CREATE TABLE T1 (
    a bigint not null primary key auto_increment,
    b varchar (64) not null ,
    )



    I want update A1 column to B1 column of excell
    A2 to B2 and so on

    where A1 refers to a column of table T1
    and B2 refers to b column of table T1
    Last edited by ankur02018; 01-22-10 at 04:49.

Posting Permissions

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