multiple part identifier couldn't be bound

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

Answers (1)

Devart
Devart

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

Related Questions