Link to home
Start Free TrialLog in
Avatar of sam2929
sam2929

asked on

getting not match date range result

hI,
i have two tables.

table a

sobid        begda_a                endda_a      owner

1063     1999-06-19         2010-11-30  No substan

table b

pernr          begda_b                     endda_b            plans  
1063      1976-06-18            1999-06-18      999999999    
1063      1999-06-19            2008-11-10     20078
1063      2008-11-11            2010-11-30     20078
1063      2010-12-01           999-12-31       999999999

i want ouput as below

999999999  1063 No substan  2010-12-01           999-12-31

i am trying to do

from  table a
right outer join table b
on a.sobid =b.perner
and endda_a not between begda_b  and endda_b
and b.endda='999-12-31'


not getting desire result
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are your date fields truly date datatypes?