Home > database >  Mysql Truncated incorrect DOUBLE value: "'
Mysql Truncated incorrect DOUBLE value: "'

Time:09-25

 insert into temp (ids, user_ids, user_id, phone, type) select '1 sd212, u.i ds, u.u ser_ids, u.t elephone, from 1 (coupon_dtl CD left join coupon c on CD. Coupon_id=Arthur c. oupon_id) left the join mst_users u on u.i ds=CD. User_ids where u.d elete_flag=0 and Arthur c. oupon_type=1 and CD. Active_state=1 and datediff (Arthur c. oupon_active_date, now ()) & gt;=3; 

The SQL prompt warning, also can be inserted into the data, is has been submitted to the warning, solving

CodePudding user response:

Check to see if you TEMP table each field type assignment match back with you,

CodePudding user response:

Match, the one with a decimal, I remove the other fields, leaving only a phone inserted or at the wrong, also don't know how to return a responsibility

CodePudding user response:

Post show create table... For analysis,

CodePudding user response:

Show create table

The CREATE TABLE ` temp ` (
` ids ` varchar (50) NOT NULL,
` user_ids ` varchar (32) NOT NULL,
` user_id ` varchar (32) NOT NULL COMMENT 'user id',
` type ` decimal (10, 0) NOT NULL DEFAULT '0' COMMENT 'the result type,
` phone ` varchar (32) NOT NULL COMMENT 'phone number',
` create_time ` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'add time,
PRIMARY KEY (` ids `)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='add timing task table scan results, as a result, for timing when scanning needs in this table'

CodePudding user response:

You also need to stick down

Sd212 select '1', u.i ds, u.u ser_ids, u.t elephone, from 1 (coupon_dtl CD left join coupon c on CD. Coupon_id=Arthur c. oupon_id) left the join mst_users u on u.i ds=CD. User_ids where u.d elete_flag=0 and Arthur c. oupon_type=1 and CD. Active_state=1 and datediff (Arthur c. oupon_active_date, now ()) & gt;=3;

Involves several table table structure,
May be the select '1 sd212, u.i ds, u.u ser_ids, u.t elephone, 1 from... Among the several fields more than the value of the length of the length of the field you temp tables, so an error,

CodePudding user response:

reference 5 floor McHdba reply:
you will also need to stick down

Sd212 select '1', u.i ds, u.u ser_ids, u.t elephone, from 1 (coupon_dtl CD left join coupon c on CD. Coupon_id=Arthur c. oupon_id) left the join mst_users u on u.i ds=CD. User_ids where u.d elete_flag=0 and Arthur c. oupon_type=1 and CD. Active_state=1 and datediff (Arthur c. oupon_active_date, now ()) & gt;=3;

Involves several table table structure,
May be the select '1 sd212, u.i ds, u.u ser_ids, u.t elephone, 1 from... Among the several fields more than the value of the length of the length of the field you temp tables, so an error,



This optional field is the user list, the structure is as follows:

The CREATE TABLE ` mst_users ` (
` ids ` varchar (32) NOT NULL,
` user_ids ` varchar (20) NOT NULL COMMENT,
` user_nm ` varchar (20) DEFAULT NULL,
` telephone ` varchar (11) the DEFAULT NULL COMMENT,
` user_type ` char (1) the DEFAULT NULL COMMENT,
DEFAULT NULL ` invite_code ` varchar (50),
Didn't see the length of the problem

CodePudding user response:

There is no back, haven't solve the problems

CodePudding user response:

Change the where condition to:
Where u.d elete_flag='0' and Arthur c. oupon_type='1' and CD. Active_state='1' and datediff (Arthur c. oupon_active_date, now ()) & gt;='3; '
The field is the where clause for character, all should with quotes,

CodePudding user response:

refer to the eighth floor s200530980113 response:
to the where condition to:
Where u.d elete_flag='0' and Arthur c. oupon_type='1' and CD. Active_state='1' and datediff (Arthur c. oupon_active_date, now ()) & gt;='3; '
The field is the where clause for character, all with quotes,


Positive solutions, thank you very much ~
  • Related