Qlik Community

Ask a Question

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
sujanbwkf
Contributor
Contributor

Error : The value '4000007276' could not be converted to type integer(4-bytes)

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.


@Henric_Cronström If you can help. 

1 Solution

Accepted Solutions
rubenmarin

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.

View solution in original post

3 Replies
rubenmarin

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.

View solution in original post

sujanbwkf
Contributor
Contributor
Author

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.

rubenmarin

Hi, maybe with

CAST(CONV('FieldName',16,10) AS UNSIGNED INTEGER)