Re: insert into tablea if the same two fields exists in tableb
Thank you for the reply...
Sorry could you dumb that down more for me.
I am at best a novice at writing mysql queries. What does @username mean or @?
Here is my insert for Host table
doquery2() {
mysql -e "$query2" -h $DBHOST --password=******* userdb
}
...
query2="INSERT hosts SET hostname=\"$HostName\",
username=\"$UserName\",
password=\"$Password\",
UID=\"$zUID\",
GID=\"$zGID\",
Full_Name=\"${FullName:=empty}\",
Homedir=\"${HomeDir:=empty}\",
Default_shell=\"${DefaultShell:=empty}\""
doquery2
So how would I add the select part to that query2 section...
Subject
Written By
Posted
Re: insert into tablea if the same two fields exists in tableb
April 30, 2013 05:42PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.