ch chandrakala

ch chandrakala

  • NA
  • 138
  • 6.8k

I am getting error "b" does not match table

Mar 26 2020 5:42 AM
;With test as (select row_number() over (order by hreid) as slno,hreid,b.value as checks from datatbl A)cross apply fn_split(a.Checks,',') as b),b as(select row_number() over (order by hreid) as slno,hreid,b.value as cost from datatbl A)cross apply fn_split(a.cost,',') as b)Select c.checks,b.cost From test c PIVOTE (min(b.cost) for c.checks in(employeement,education,..)Pvt Inner join b on c.hreid=b.hreid and c.slno=b.slno

Answers (1)