Viewing 2 posts - 1 through 2 (of 2 total)
see below
declare @seqNo int =1;
;with cte as
(
select 'abc' as tName,* from abc
union all
select 'def' as tName,* from def
),
cte2 as
select c.tName,isnull(t.SeqNo,0) SeqNo,isnull(t.Payment,0.00) Payment from cte c left join (select *...
December 30, 2014 at 4:14 pm
#1767109
I believe what you need is just dynamic pivot. see the below code.
CREATE TABLE TBL
batch_Id VARCHAR(36) NOT NULL
...
December 30, 2014 at 11:43 am
#1767053