tsql help

  • My table has one row each of id = '1111'and '222'but is there a way i could display 3 rows as output

    using script

    select *

    From lookup_vw(nolock)

    where cod = 'oac'

    and acc_id in ('1111', '222', '222')

    tia

  • From your post I guess you are trying to duplicate ID = '222', but not '1111', right?

    How about:

    select *

    From lookup_vw(nolock)

    where cod = 'oac'

    and acc_id in ('1111', '222')

    UNION ALL

    select *

    From lookup_vw(nolock)

    where cod = 'oac'

    and acc_id in ('222')

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

You must be logged in to reply to this topic. Login to reply