在拆分列中的值时需要帮助。这是我到目前为止得到的
select
recordid, productname,
case when future06 like '%418%' then (Books
case when future06 like '%421%' then (Video) else null
end
from schema.dbo.table1
Books并且Video是列下的两个主要产品future06。而不是future06作为第三列,我想同时拥有Booksand和.Videorecordidproductname
生活会让输出看起来像:
RecordID ProductName Books Video