If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > update table recursively

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-19-10, 07:32
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile 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
Reply With Quote
  #2 (permalink)  
Old 01-19-10, 07:38
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
insufficient information

please do a SHOW CREATE TABLE for the table

how are you reading the excel sheet?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 01-22-10, 03:42
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
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 03:49.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On