Good day to you all.
I have an nvarchar value stored in a table, example such as '(15645),(15646)' and '(15680),(15679),(15678),(15677)' under field name SALES_ORDER_ITEM_ID
Example Query;
I want to join other tables where the PK is IN(15645,15646) or IN(15680,15679,15678,15677)
As the database is expecting an array of INT, can anybody help with the correct syntax/conversion for doing this please?
Much appreciated
Keith
Example Table Data:
I have an nvarchar value stored in a table, example such as '(15645),(15646)' and '(15680),(15679),(15678),(15677)' under field name SALES_ORDER_ITEM_ID
Example Query;
SQL:
select Pallet.*, Purchase_Order_Item.SALES_ORDER_ITEM_ID
from [Quotes].[dbo].[pallet]
left outer join quotes.dbo.purchase_order_item on purchase_order_item.item_id = pallet.po_item_id
where pallet.active = 1
I want to join other tables where the PK is IN(15645,15646) or IN(15680,15679,15678,15677)
As the database is expecting an array of INT, can anybody help with the correct syntax/conversion for doing this please?
Much appreciated
Keith
Example Table Data: