boblarson
Smeghead
- Local time
- Today, 15:09
- Joined
- Jan 12, 2001
- Messages
- 32,059
I'm just getting into using SQL Server, so I'm a bit Transact-SQL challenged, shall we say. I am trying to move this query from Access into a stored procedure. I keep getting an error message that there is a syntax problem near the word INNER.
Any ideas on how I have to word this to get it to work?
Any ideas on how I have to word this to get it to work?
Code:
UPDATE [history - 6165 shipment] INNER JOIN [base - 6165 shipment] ON
[history - 6165 shipment].LAST_GID = [base - 6165 shipment].LAST_GID SET
[base - 6165 shipment].MATERIAL = [history - 6165 shipment].material,
[base - 6165 shipment].BAS_SHP_QTY = [history - 6165 shipment].BAS_SHP_QTY,
[base - 6165 shipment].BAS_CNFRMD_QTY = [history - 6165 shipment].BAS_CNFRMD_QTY,
[base - 6165 shipment].SIZE_CD = [history - 6165 shipment].SIZE_CD,
[base - 6165 shipment].PLANT = [history - 6165 shipment].PLANT,
[base - 6165 shipment].DIVISION = [history - 6165 shipment].DIVISION,
[base - 6165 shipment].SLS_ORG = [history - 6165 shipment].SLS_ORG,
[base - 6165 shipment].REGION = [history - 6165 shipment].REGION,
[base - 6165 shipment].ORDER_TYPE = [history - 6165 shipment].ORDER_TYPE,
[base - 6165 shipment].ITEM_CAT = [history - 6165 shipment].ITEM_CAT,
[base - 6165 shipment].extract_dt = [history - 6165 shipment].extract_dt;