I have three separate tables. 1 that is Jun10 and houses the subID, policy, policyname and their indicator choice. Then I have table 2 that is Jul10RAWCES and it houses subID, policy, policyname and their indicator choice. Then my final is decreaseJul10 and it has policy and policyname.
I have the tables joined and from Jun10 want the policy, policyname and indicator choice of only yy, xy or ny and then pull only the indicator choice from Jul10RAWCES that is not yy, xy or ny. The primarykey between the date tables is the subID and I have that set to is not null and then the key between jun10 and decreaseJul10 is the policy because I only want to pull certain policies.
No matter what I try I can't get the right data back for the Jul10RAWCES table. My goal is to show only those records that were a yy, xy or ny in jun10 and what they are in the jul10rawces that does not = yy xy or ny. So if the subID was a yy in jun10 in order for my other data to be correct they need to be a nn in jul or xx or something that doesn't end in a y.
here is an example of the code i have tried:
select jun10.pol, jun10.polname, jun10.ind, jul10rawces.ind from (jun10 inner join jul10rawces on jun10.empid=julrawces.subid) inner join decreasejul10 on jun10.pol=decreasejul10.policy where (((jun10,ind="yy") or (((jun10.ind="xy")) or (((jun10.ind="ny")) and ((jul10rawces.subid)is not null) and ((jul10rawces.ind) not in ("yy","xy","ny")));
Now I am typing this manually looking at my work computer and typing in this forum so I might have missed a (). The code doesn't error. It runs the problem is it doesn't return what I ask for.