NewbieScoobie
Technical User
Hi, i'm quite new to T-Sql and was wondering if i could do the following:
select
k.name,
(select Hours from otherTable where selected = 'Y') as importedfield,
(case when k.name = 'timmy' then importedfield else 'no' end)
from
origtable k
order by k.name
essentially i want to use the value of 'imported field' for the value only if the current row in k.name = 'timmy'
is there any way i can do this?
thanks
select
k.name,
(select Hours from otherTable where selected = 'Y') as importedfield,
(case when k.name = 'timmy' then importedfield else 'no' end)
from
origtable k
order by k.name
essentially i want to use the value of 'imported field' for the value only if the current row in k.name = 'timmy'
is there any way i can do this?
thanks