sql server - SQL join Query in SQL management studio -
select dbo.items.maxstocklevel ,dbo.items.minstocklevel ,dbo.itemsdefination.name dbo.items inner join dbo.itemsdefination on dbo.items.businessunitid = dbo.itemsdefination.businessunitid , dbo.items.itemid = dbo.itemsdefination.itemid
i have single column in 1 of database tables - dbo.itemdefination, column name dbo.itemdefination.name. column contains 3 values need extract separately each other - product name, category, , subcategory.
001-00-0000 id represents category, 001-01-0000 id represents subcategory , 001-01-0001 id represents product name possible ?
it might you, if delimited comma.
declare @temp table(name varchar(100)) insert @temp select 'abc,ert,err' union select 'abc1,ert1,err1' union select 'abc2,ert2,err2' union select 'abc3,ert3,err3' union select 'abc4,ert4,err4' select parsename(replace(name,',','.'),1) produst, parsename(replace(name,',','.'),2) category , parsename(replace(name,',','.'),3) subcategory @temp
Comments
Post a Comment