Chris Michalczuk
asked on
Sql 2000 syntax issue with updates and joins
trying to update a field as shown below but got all my joins wrong in this syntax!!!
also how would I add a variable into the set statement which picks up today's date in uk format
eg set field = '13/10/2011 - test' i want the 13/10/2011 to change based on today's date
UPDATE tbl_Inventory
SET tbl_Inventory.Inventory_Ma nufacturer SN = '13/10/2011 - test'
FROM triscan_licencing.dbo.Odys seyPartsMa sterView xx
INNER JOIN
tbl_Jobs ON tbl_Inventory.Inventory_ID = tbl_Jobs.Jobs_ParentInvent oryID INNER JOIN
triscan_orders.dbo.tbl_Ord erLines yy ON yy.OrderLines_ID = tbl_Inventory.Inventory_Or derLineId
WHERE xx.PN = tbl_Inventory.Inventory_Pa rtNumber AND (xx.version IS NOT NULL) AND inventory_ID = 118386 AND yy.Orderlines_Paid = 0
also how would I add a variable into the set statement which picks up today's date in uk format
eg set field = '13/10/2011 - test' i want the 13/10/2011 to change based on today's date
UPDATE tbl_Inventory
SET tbl_Inventory.Inventory_Ma
FROM triscan_licencing.dbo.Odys
INNER JOIN
tbl_Jobs ON tbl_Inventory.Inventory_ID
triscan_orders.dbo.tbl_Ord
WHERE xx.PN = tbl_Inventory.Inventory_Pa
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
bhess1,
I found that actually, the table you update does not need to be in the from list ...
I found that actually, the table you update does not need to be in the from list ...
https://www.experts-exchange.com/A_1517.html