Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: How to return user-defined row when a record doesn't exists

    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 *...

  • RE: need help to pivot

    I believe what you need is just dynamic pivot. see the below code.

    CREATE TABLE TBL

    (

    batch_Id VARCHAR(36) NOT NULL

    ...

Viewing 2 posts - 1 through 2 (of 2 total)