Hi all.
I need some help again, please.
I need to find out if at least one 1 row exists (I'm using select top 1) in tableA where eval_id = 'whatever' and lineup_seq_nbr = 1. If no rows exist I need to do some process.
If a row does exist I need to detemine if the row is active or deactivated by interrogating the value of end_date (null = active, not null = deactivated).
-----------------
So far I have this:
select top 1 eval_id, end_date
from tableA
where eval_id = 'unitA'
and lineup_seq_nbr = 1
I can use not exists to determine whether or not there is a row. But if there is a row returned, how can I then interrogate the end_date value to determine if the row is active or deactivated?
Thanks as always for any help!!
I need some help again, please.
I need to find out if at least one 1 row exists (I'm using select top 1) in tableA where eval_id = 'whatever' and lineup_seq_nbr = 1. If no rows exist I need to do some process.
If a row does exist I need to detemine if the row is active or deactivated by interrogating the value of end_date (null = active, not null = deactivated).
-----------------
So far I have this:
select top 1 eval_id, end_date
from tableA
where eval_id = 'unitA'
and lineup_seq_nbr = 1
I can use not exists to determine whether or not there is a row. But if there is a row returned, how can I then interrogate the end_date value to determine if the row is active or deactivated?
Thanks as always for any help!!