sql server - MS Access SQL error with Update Query -


working on linking data between sql server database , ms access. right manually calculating data sql database report , entering access run other reports within access.

i have created pass through query pull relevant information access table sql database( working nicely )

now need update existing access tables data retrieved sql pass through. have tried number of different queries fussing @ me various reasons. here example of latest query me need. works if setup sandbox in sql server , run mssql management studio, not work in access

update jt  set    jt.contractamt = sbd.totalsum    jobtable_test jt inner join (              select sum( main.amt ) totalsum, main.job                main               group main.job            ) sbd  on sbd.job = jt.jobnumber  

in access above generates following error "syntax error( missing operator) in query expression.


updating following attempt @ using sql passthrough run update query.

i updated query directly passthrough sql statement suggested , following error.

odbc--call failed.

[microsoft][sql server native client 11.0][sql server]invalid object name 'tablename'.(#208)

here pass through query used looked like.

update accesstable set accesstable.amt = sqlresult.total tablename accesstable     inner join ( select sum( sqltablea.amt) total, sqltablea.job                  sqltablea                   left outer join sqltableb on (sqltablea.company = sqltableb.company)                                              , (sqltablea.job = sqltableb.job)                   group sqltablea.job                 ) sqlresult on sqlresult.job = accesstable.jobnum 

hopefully better describes tables located , how update needs happen, , maybe can point out how wrong or if work way.


any suggestions appreciated

it appears subquery, aliased sbd, missing job_no column. therefore aren't going able join on it.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -