Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rookie_sql
Constraint Violating Yak Guru
443 Posts |
Posted - 2006-05-26 : 07:44:41
|
Hi i want to update the table [query_export] where the [Order Reason] = the [ORDER REASON CODES] in the [Reason_Codes] table. I want to do this in a SQL Task but the table is a access table. I tried the query below but it does not work any ideas ? UPDATE query_export INNER JOIN Reason_Codes ON query_export_.[Order Reason] = Reason_Codes.[ORDER REASON CODES] SET query_export.Reason_code_description = Reason_code.description; |
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-05-26 : 09:18:27
|
U have lot of typo errors :UPDATE query_export INNER JOIN Reason_Codes ON query_export_.[Order Reason] = Reason_Codes.[ORDER REASON CODES] SET query_export.Reason_code_description = Reason_code.description;Also is this running in MS SQL Server or in Access ?Srinika |
 |
|
rookie_sql
Constraint Violating Yak Guru
443 Posts |
Posted - 2006-05-26 : 10:20:00
|
Sorry here is the query. i got it to work its Friday what can i say !!!!!Am running this from a SQL TASK on SQL Server but its connection is to a Access database.So the update is being done on a Access TableUPDATE query_export INNER JOIN Reason_Codes ON query_export.Order_Reason = Reason_Codes.ORDER_REASON_CODES SET query_export.Reason_code_description = [Reason_codes].[DESCRIPTION] |
 |
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-05-26 : 11:15:59
|
tryUPDATE query_export SET Reason_code_description = r.[DESCRIPTION]From query_export qINNER JOIN Reason_Codes r ON q.Order_Reason = r.ORDER_REASON_CODES Srinika |
 |
|
|
|
|