List:General Discussion« Previous MessageNext Message »
From:Charles Brown Date:January 23 2008 5:08pm
Subject:executing query from the command line -- need help
View as plain text  
Hello All. 

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; 

Thanks




********************************************
This message is intended only for the use of the Addressee and
may contain information that is PRIVILEGED and CONFIDENTIAL.

If you are not the intended recipient, you are hereby notified
that any dissemination of this communication is strictly prohibited.

If you have received this communication in error, please erase
all copies of the message and its attachments and notify us
immediately.

Thank you.
********************************************
Thread
Did NOT condition on VARCHAR change with 5.0.45?Mont McAdam15 Jan
  • Re: Did NOT condition on VARCHAR change with 5.0.45?Martijn Tonies15 Jan
    • Re: Did NOT condition on VARCHAR change with 5.0.45?Moon's Father16 Jan
Re: Did NOT condition on VARCHAR change with 5.0.45?Mont McAdam23 Jan
  • RE: Did NOT condition on VARCHAR change with 5.0.45?Jerry Schwartz23 Jan
  • Re: Did NOT condition on VARCHAR change with 5.0.45?Perrin Harkins23 Jan
    • executing query from the command line -- need help Charles Brown23 Jan
      • RE: executing query from the command line -- need help Jay Blanchard23 Jan
      • RE: executing query from the command line -- need help Jay Blanchard23 Jan
RE: executing query from the command line -- need help Jay Blanchard23 Jan
  • Re: executing query from the command line -- need helpobed24 Jan
    • RE: executing query from the command line -- need helpCharles Brown24 Jan