Retreive Only the Y results in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My results without the Y look like this..Notice there is no N in that column
and it is either Y or nothing in the BYPASS Column it only has the Y. In the
criteria below BYPASS i put ="Y" and I receive no records. This is so simple
what am I missing.

BYPASS..Process Date Price..Shares
Y 12 .........3478.059
Y 12.014046 .........3304.024
Y 12.150648 .........3304.024
Y 12.373246.. ..3304.024
Y 12.394361 ..3304.024
Y 12.473124..3304.024
1 .5.374
1 .8.09
1 11.081
1 12.886
 
My results without the Y look like this..Notice there is no N in that column
and it is either Y or nothing in the BYPASS Column it only has the Y. In the
criteria below BYPASS i put ="Y" and I receive no records. This is so simple
what am I missing.

It sounds like you're either continuing a discussion in a new thread,
or assuming we know more about your application than is visible.

Please post the SQL view of the query. What's the datatype of the
field - text, or Yes/No? If the latter, use a criterion of True or -1
rather than the text string "Y".

John W. Vinson[MVP]
 
No this is not a continued discussion it is a new question. Here is the SQL..

SELECT CMPSOWNER_UNITS_BUY_SELL.BYPASS_TRANS_FLAG,
CMPSOWNER_UNIT_VALUE.UVAL_AMT AS [Process Date Price],
CMPSOWNER_UNITS_BUY_SELL.BUY_SELL_UNIT_CT AS Shares,
CMPSOWNER_TRANSACT_DETAIL.EFF_DT AS [Effective Date],
CMPSOWNER_UNITS_BUY_SELL.BYPASS_TRANS_FLAG
FROM ((CMPSOWNER_UNIT_VALUE INNER JOIN CMPSOWNER_FUNDDESC ON
CMPSOWNER_UNIT_VALUE.FD_DESC_CD = CMPSOWNER_FUNDDESC.FD_DESC_CD) INNER JOIN
CMPSOWNER_TRANSACT_DETAIL ON CMPSOWNER_UNIT_VALUE.EFF_DT =
CMPSOWNER_TRANSACT_DETAIL.CYC_DT) INNER JOIN CMPSOWNER_UNITS_BUY_SELL ON
CMPSOWNER_TRANSACT_DETAIL.TR_REF_NO = CMPSOWNER_UNITS_BUY_SELL.TR_REF_NO
GROUP BY CMPSOWNER_UNITS_BUY_SELL.BYPASS_TRANS_FLAG,
CMPSOWNER_UNIT_VALUE.UVAL_AMT, CMPSOWNER_UNITS_BUY_SELL.BUY_SELL_UNIT_CT,
CMPSOWNER_TRANSACT_DETAIL.EFF_DT, CMPSOWNER_UNITS_BUY_SELL.BYPASS_TRANS_FLAG
HAVING (((CMPSOWNER_UNITS_BUY_SELL.BYPASS_TRANS_FLAG)="y"));
 
HAVING (((CMPSOWNER_UNITS_BUY_SELL.BYPASS_TRANS_FLAG)="y"));

For one thing, change the HAVING to WHERE - this will filter the
records *before* totalling them instead of after.

Asking again: what is the datatype of BYPASS_TRANS_FLAG? is it Text as
this query indicates, or is it perhaps a Yes/No field?


John W. Vinson[MVP]
 
Back
Top