Hey I wrote this query:
And I get this error:
My table structure:
My table content:
I red that this error means that I try to compare some data type with another data type
but I dont understand where I do it
Code:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;">[COLOR=#101094]SELECT[/COLOR][COLOR=#303336] dayar
[/COLOR][COLOR=#101094]FROM[/COLOR][COLOR=#303336] dayarim
[/COLOR][COLOR=#101094]WHERE[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336] Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]enter_month[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]Now[/COLOR][COLOR=#303336]())[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]OR[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336] Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]enter_month[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]<[/COLOR][COLOR=#303336] Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]Now[/COLOR][COLOR=#303336]())[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]AND[/COLOR][COLOR=#303336] Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]left_month[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]>=[/COLOR][COLOR=#303336] Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]Now[/COLOR][COLOR=#303336]())[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]AND[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336] Datediff[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]'m'[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] Iif[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]enter_month[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]Now[/COLOR][COLOR=#303336]()),[/COLOR][COLOR=#303336] enter_month[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#7D2727]'1/1/'[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]+[/COLOR][COLOR=#303336] Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]Now[/COLOR][COLOR=#303336]())),[/COLOR][COLOR=#303336] Now[/COLOR][COLOR=#303336]())[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]*[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]50[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]<[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]
Datediff[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]'m'[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]'1/1/'[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]+[/COLOR][COLOR=#303336] Year[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]Now[/COLOR][COLOR=#303336]()),[/COLOR][COLOR=#303336] Now[/COLOR][COLOR=#303336]())[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]*[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]50[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336] [/COLOR]</code>
And I get this error:
Datatype mismatch in criteria expression
My table structure:
My table content:
I red that this error means that I try to compare some data type with another data type
but I dont understand where I do it