stored procedures - Incorrect date value: '0000-00-00' for column 'req_dt' at row in mysql -


i working on mysql stored procedure executes call statement following parametrs

call getabsentreportdata('2011-11-01','2011-11-30',3); 

it shows error statement

call getabsentreportdata('2013-04-01','2013-05-01',1) ; 

error is

error code: 1292. incorrect date value: '0000-00-00' column 'req_dt' @ row 1     0.374 sec 

please me how resolve it. in advance

  1. you server use no_zero_date mode.

  2. table emp_leaves has req_dt field. records of table has 0000-00-00 in field. query tells me about

    create temporary table templvdata select * emp_leaves leave_txn_code = 'abs' , from_dt >= fromdate , to_dt <= todate order to_dt desc

so can disable mode. read documentation mysql modes. or change select query.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -