3
create table ApplicationTracker_dup1
select transactionid,
       count(case when attribute = 'Secci_Page_Arrival_Time' and value is not null then transactionid end)as secci_visits,
       count(case when attribute = 'esign_arrival_time' and value is not null then transactionid end)as esig_visits 
from ApplicationTracker_dup 
where create_dtm < '2013-08-13' 
group by 1;

このコードを実行すると、遭遇します

エラー 1292 (22007): 誤った INTEGER 値が切り捨てられました: 'E031CF1DE8F7'"

テーブルは作成されていません。誰かがここで私を助けることができますか?

4

2 に答える 2

1

char やその他の型ではなく、int または NULL をcount func で使用する必要があります。したがって、このコードは警告なしで機能するはずです。

create table ApplicationTracker_dup1
select transactionid,
       count(if(attribute = 'Secci_Page_Arrival_Time' and value is not null,1,NULL)) as secci_visits,
       count(if(attribute = 'esign_arrival_time' and value is not null,1,NULL)) as esig_visits 
from ApplicationTracker_dup 
where create_dtm < '2013-08-13' 
group by 1;
于 2014-10-09T16:17:09.423 に答える