Hello,
Could someone please help me with this problem. Any help would be appreciate.
I have a table like below:
pid date start_dt end_dt
1 20050401 20030825 20050417
1 20050401 20050418 Null
2 20050411 20050106 Null
3 20050402 20050106 20050401
All NULL end_dt mean indefinite into the future.
I want all the row with DATE that fall within the start and end date as:
pid date start_dt end_dt
1 20050401 20030825 20050417
2 20050411 20050106 Null
I have try the following, but it return the top 3 rows:
Select *
From mytable
Where
Date BETWEEN start_dt AND end_dt
OR end_dt is null
Again, thank you for your help.
Could someone please help me with this problem. Any help would be appreciate.
I have a table like below:
pid date start_dt end_dt
1 20050401 20030825 20050417
1 20050401 20050418 Null
2 20050411 20050106 Null
3 20050402 20050106 20050401
All NULL end_dt mean indefinite into the future.
I want all the row with DATE that fall within the start and end date as:
pid date start_dt end_dt
1 20050401 20030825 20050417
2 20050411 20050106 Null
I have try the following, but it return the top 3 rows:
Select *
From mytable
Where
Date BETWEEN start_dt AND end_dt
OR end_dt is null
Again, thank you for your help.