If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"Data type mismatch in expression"
Hi expert
I got this ""Data type mismatch in expression" error message while running my queries. SELECT qrymaxallca1.NE, qrymaxallca1.Date, Sum([qrymaxallca1]! [TCAT_CALL_AMOUNT]) AS BHCA FROM qrymaxallca1 WHERE (((([qrymaxallca1]![TCATID]))=34 Or (([qrymaxallca1]![TCATID]))=32 Or ( ([qrymaxallca1]![TCATID]))=45 Or (([qrymaxallca1]![TCATID]))=16 Or (( [qrymaxallca1]![TCATID]))=15 Or (([qrymaxallca1]![TCATID]))=13)) GROUP BY qrymaxallca1.NE, qrymaxallca1.Date; Basically what i try to do is, to sum the value in call amount field base on ID 34,32,45,16,15,13 Can you help me to recognised the error please. - thank you -- Cheers Mohsin Message posted via http://www.accessmonster.com |
#2
|
|||
|
|||
"Data type mismatch in expression"
What is the TCATID field type?
If its a text field you need to add double quote before and after the value. Also, you can make this SQL shrter using In SELECT qrymaxallca1.NE, qrymaxallca1.Date, Sum([qrymaxallca1]! [TCAT_CALL_AMOUNT]) AS BHCA FROM qrymaxallca1 WHERE [qrymaxallca1]![TCATID] In (34,32,45,16,15,13) GROUP BY qrymaxallca1.NE, qrymaxallca1.Date And if it a text field SELECT qrymaxallca1.NE, qrymaxallca1.Date, Sum([qrymaxallca1]! [TCAT_CALL_AMOUNT]) AS BHCA FROM qrymaxallca1 WHERE [qrymaxallca1]![TCATID] In ("34","32","45","16","15","13") GROUP BY qrymaxallca1.NE, qrymaxallca1.Date -- Good Luck BS"D "mohsin via AccessMonster.com" wrote: Hi expert I got this ""Data type mismatch in expression" error message while running my queries. SELECT qrymaxallca1.NE, qrymaxallca1.Date, Sum([qrymaxallca1]! [TCAT_CALL_AMOUNT]) AS BHCA FROM qrymaxallca1 WHERE (((([qrymaxallca1]![TCATID]))=34 Or (([qrymaxallca1]![TCATID]))=32 Or ( ([qrymaxallca1]![TCATID]))=45 Or (([qrymaxallca1]![TCATID]))=16 Or (( [qrymaxallca1]![TCATID]))=15 Or (([qrymaxallca1]![TCATID]))=13)) GROUP BY qrymaxallca1.NE, qrymaxallca1.Date; Basically what i try to do is, to sum the value in call amount field base on ID 34,32,45,16,15,13 Can you help me to recognised the error please. - thank you -- Cheers Mohsin Message posted via http://www.accessmonster.com |
#3
|
|||
|
|||
"Data type mismatch in expression"
Thanks cohen
After recheck in the table properties, the TCATID is text, what is need is "number" type. -thank you Ofer Cohen wrote: What is the TCATID field type? If its a text field you need to add double quote before and after the value. Also, you can make this SQL shrter using In SELECT qrymaxallca1.NE, qrymaxallca1.Date, Sum([qrymaxallca1]! [TCAT_CALL_AMOUNT]) AS BHCA FROM qrymaxallca1 WHERE [qrymaxallca1]![TCATID] In (34,32,45,16,15,13) GROUP BY qrymaxallca1.NE, qrymaxallca1.Date And if it a text field SELECT qrymaxallca1.NE, qrymaxallca1.Date, Sum([qrymaxallca1]! [TCAT_CALL_AMOUNT]) AS BHCA FROM qrymaxallca1 WHERE [qrymaxallca1]![TCATID] In ("34","32","45","16","15","13") GROUP BY qrymaxallca1.NE, qrymaxallca1.Date Hi expert [quoted text clipped - 15 lines] - thank you -- Cheers Mohsin Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200707/1 |
Thread Tools | |
Display Modes | |
|
|