Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm writing two My SQL queries whose query and association are same except that i'm using a different timestamp condition like "> '2020-04-21 00:00:00' " in where condition .
The first one executes without any error.
The second query gives me " Error : The value '4000007276' could not be converted to type integer(4-bytes)."
I'm not sure what is happening, as the queries and association are exactly same, just the timestamp in where condition is different.
Query 1 :
[Bin_Inventory_Transactions]:
Load *;
SQL
select *
from bin_inventory_transactions as bits
WHERE bits.`created_at` between '2020-04-14 00:00:00' and '2020-04-17 00:00:00';
Query 2 :
[Bin_Inventory_Transactions_2]:
SQL
select *
from bin_inventory_transactions as bits
WHERE bits.`created_at` between '2020-04-17 00:00:01' and '2020-04-21 00:00:00'
Tried Using
1. WHERE date(created_at) = '2020-04-21'
2. CONVERT(DATETIME, '2020-04-21', 102)
3. Let Last_Update_time = Date(Peek('MaxDateTime',0,'Last_Update_time'), 'DD:MM:YYYY') and '$(Last_Update_time)';
4. CAST('2020-04-21' AS DATETIME)
5. timestamp(current_date)
Everything, but no help. Please guide me through and what is happening.
@hic If you can help.
Hi, I'm not sure if the problem is with between dates, can you try retrieving only created_at field instead of *.
If it works it means that the issue is any of the fields retrieved from the table, not in dates filtered.
Hi, I'm not sure if the problem is with between dates, can you try retrieving only created_at field instead of *.
If it works it means that the issue is any of the fields retrieved from the table, not in dates filtered.
Bang on.
Thanks a lot rubenmarin,
Yes, there was a int column which was causing the issue.
any workaround to still bring it in? As it is an important data point.
Hi, maybe with
CAST(CONV('FieldName',16,10) AS UNSIGNED INTEGER)