Hi All,
Is it possible to use where clause with insert statement. In my scenario im not getting how to use update query as the subquery returns more than one values. My query goes like this.
INSERT EntityAttributeValue
(
EntityID
)
SELECT ID
FROM (SELECT ID
FROM (SELECT ID,
ROW_NUMBER() over(ORDER BY ID) Row
FROM Item
)
x
WHERE Row BETWEEN 1 AND 400
)
x
WHERE Value='10KT Gold'
What i want here to do is, I have EntityID and Value column in EntityAttributeValue table and the Other table is Item table which contains ID's. So joining goes this way Item.ID = EntityAttributeValue.EntityID. Now, i want to Insert bulk ItemID values from Item table into EntityAttributeValue table where values = '10KT Gold' .
Please let me know.