Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Access query in MySQL

Status
Not open for further replies.

yigalm

Technical User
Aug 16, 2001
42
US
I am trying to run an UPDATE query in MySQL.
This query was made and tested in Access, and it worked.
Now I am trying to run it in MySQL and it gives errors.
How is MySQL syntax different from Access SQL?

Here are two versions of the same query which work in Access, but neither one works in MySQL. Can anyone help me 'translate' either version to MySQL?

Thanx,
IM

UPDATE pr2_users_values, workstat
SET
pr2_users_values.f_comp_name = workstat.compname,
pr2_users_values.f_node_addr = workstat.node_addr,
pr2_users_values.f_tcp_ip = workstat.tcpip,
pr2_users_values.f_cpu = workstat.cpu,
pr2_users_values.f_cpu_speed = workstat.cpu_speed,
pr2_users_values.f_ram = workstat.ext_mem,
pr2_users_values.f_drive_c = workstat.drive_c,
pr2_users_values.f_c_free = workstat.free_c,
pr2_users_values.f_drive_d = workstat.drive_d,
pr2_users_values.f_d_free = workstat.free_d
WHERE
f_login=workstat.login;

------------

UPDATE pr2_users_values
INNER JOIN workstat
ON pr2_users_values.f_login=workstat.login
SET
pr2_users_values.f_comp_name = workstat.compname,
pr2_users_values.f_node_addr = workstat.node_addr,
pr2_users_values.f_tcp_ip = workstat.tcpip,
pr2_users_values.f_cpu = workstat.cpu,
pr2_users_values.f_cpu_speed = workstat.cpu_speed,
pr2_users_values.f_ram = workstat.ext_mem,
pr2_users_values.f_drive_c = workstat.drive_c,
pr2_users_values.f_c_free = workstat.free_c,
pr2_users_values.f_drive_d = workstat.drive_d,
pr2_users_values.f_d_free = workstat.free_d;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top