Reputation: 679
i am trying to make a query that finds the item number and change the shelf number based on the id in another table but i getting a
multiple part identifier couldn't be bound
on SET
and WHERE
how do i fix that or are there another way around this
use [ISTABLocalDB]
SELECT
ps.[ShelfNumber], P.[ItemNumber]
FROM
[file].[Item] P
inner join [file].[ItemPart] PS on P.[ID] = PS.[ID]
UPDATE [file].[ItemPart]
SET ps.[ShelfNumber]='Test'
WHERE P.[ItemNumber] LIKE 'N84754'
Upvotes: 1
Views: 205
Reputation: 122032
UPDATE PS
SET [ShelfNumber] = 'Test'
FROM [file].[ItemPart] PS
JOIN [file].[Item] P ON P.[id] = PS.[id]
WHERE P.[ItemNumber] = 'N84754'
Upvotes: 2