Jsara
asked on
question about best practice of Update query on MS Access local table and SQL serever linked table..
We have update queries in the system designed using the query grid,
where the data from a local MS Access table is set to update it to the sqlserver linked table.
I am curious to know which would be the best method
a) whether to use join in the update query like below and not having the where clause since join is already set on the ids belonging to both tables
UPDATE [Children-local] INNER JOIN Children ON [Children-local].childid = Children.childid SET Children.firstname = [Children-local].firstname , Children.middlename = [children-local].middlenam e, Children.lastname = [children-local].lastname;
2) Or to use the update query without setting the joins but specify the where clause criteria
like below
UPDATE Children, [Children-local] SET Children.firstname = [Children-local].firstname , Children.middlename = [children-local].middlenam e, Children.lastname = [children-local].lastname
WHERE (((Children.childid)=[chil dren-local ].[childid ]));
Would the peformance matter if you are using join vs where clause and which is the best method.
where the data from a local MS Access table is set to update it to the sqlserver linked table.
I am curious to know which would be the best method
a) whether to use join in the update query like below and not having the where clause since join is already set on the ids belonging to both tables
UPDATE [Children-local] INNER JOIN Children ON [Children-local].childid = Children.childid SET Children.firstname = [Children-local].firstname
2) Or to use the update query without setting the joins but specify the where clause criteria
like below
UPDATE Children, [Children-local] SET Children.firstname = [Children-local].firstname
WHERE (((Children.childid)=[chil
Would the peformance matter if you are using join vs where clause and which is the best method.
ASKER
Is it true that using the joins the query needs to process more - to make sure and check the related
records from two sides hence it takes longer as supposed to just using a where clause.
records from two sides hence it takes longer as supposed to just using a where clause.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So it comes down to a matter of syntax preference. Many people have difficulties deciphering Join clauses (myself included), and prefer the Where approach ...