Link to home
Start Free TrialLog in
Avatar of bfuchs
bfuchsFlag for United States of America

asked on

Weird query results

Hi Experts,
I am trying to figure out a strange Access/SQL behavior as follows.
I have a query that when displaying only 1 column it gives me one quantity of records and when displaying 2 columns it gives me a different qty.
Query1
SELECT DISTINCT TmpPatBillingCodes.PatientsID, #12/31/2013# AS Expr1
FROM TmpPatBillingCodes
WHERE (((#12/31/2013#) Between [effectivefrom] And [end]));

Open in new window

Query2
SELECT DISTINCT TmpPatBillingCodes.PatientsID, #12/31/2013# AS Expr1, TmpPatBillingCodes.EffectiveFrom
FROM TmpPatBillingCodes
WHERE (((#12/31/2013#) Between [effectivefrom] And [end]));

Open in new window

Can someone help me figure out?
ASKER CERTIFIED SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

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
Avatar of bfuchs

ASKER

Ooops, I didn't realized that as this was copied from another query...
Thank you!