[snip]
I'm new to mysql. I would like to issue a query from the command line
and pass the result to an update done on the command line within the
same script. See below.
My question is how can I run a select from the command line and pass the
values to an update

SELECT SYS_ID, SYS_LOCATION, SYS_IP FROM PROD_SERVER;

UPDATE TEST_SERVER
SET SYS_ID  = &value passed from above
      SYS_LOCATION = &value passed from above
       SYS_IPADDRESS = &value passed from above; 

[/snip]

Start here
http://dev.mysql.com/doc/refman/5.1/en/declare-local-variables.html
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to