CREATE TABLE #InventoryCustomer(InvtID Varchar(20),Bookcode Varchar(20),BarCode Varchar(50))
INSERT INTO #InventoryCustomer
Values
('CB0212','CB0212','ean'),
('DD2921','DD2921','9789830093819');
select
ISNULL(InvtID,'') AS InvtID
,ISNULL(Bookcode,'Bookcode not found') AS Bookcode
FROM split_fun('1,ean,9789830093819',',') AS Stv LEFT JOIN #InventoryCustomer cte
ON( Stv.value=Cte.Barcode)
OUTPUT:
InvtID | Bookcode
Bookcode not found
CB0212 CB0212
DD2921 DD2921