Forum Replies Created

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

  • RE: Converting particular set of Rows as Columns

    Hi All,

    Thanks for the help.

    Got it 🙂

    Below is the query:

    select * from

    (select customer

    ,sum(qty) qty1

    ,(select cast(product as varchar(max)) from datatable where customer = a1.customer for XML path(''))product

    from datatable a1

    group by...

  • RE: latest row

    Ya, thanks for the info. I did not check by creating the indexes.

    I just took the code snippet from sstacy7, and just tried my query on that.

  • RE: latest row

    select m2.Acct1,m2.Amt

    from

    (select n1.Acct,n1.max_insert_no

    from

    (select Acct,MAX(last_insert)max_insert_no

    from

    (select Acct,ROW_NUMBER() over (partition by Acct order by Acct)last_insert from Table_1)n

    group by Acct)n1

    )n2

    join

    (select Acct Acct1,Amt,ROW_NUMBER() over (partition by Acct order by...

  • RE: DEFAULT ((0)) vs DEFAULT (0)

    How to update if i need to make it unique(structure wise) in both the servers?

    Dropping and re-creating the constraint did not work out.Is there any other way?

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