sql - Why is this mysql table producing a NULL in the datetime field? -


I have found this table The table contains a bunch of four fields, but in the query field (end) the test_tmp table But there is a character, and there is a date time on the test table. (Table names have been changed to protect customers.)

In the test_tmp table, the field contains a month-date pair, such as '10th August 'or '20 Feb'. I am using to include that data:

  select INSERT IGNORE test (RECNUM, ORDERNUM, CREATEEDATE, EXPIRDATE, FNAME, LNAME), RECNUM, ORDERNUM, CREATEEDATE, CAST ( When the case is in Str_to_date (concat ('expiredate', '', year (now () (), '% b% d% Y') & lt; = cURDATE () then str_to_date (concat (expatate, '', 1 + year (Now ()), '% B% d% Y' ELSE str_to_date (concat (expiredate, '', year (now ()), '% b% d% Y' END AS DATETIME) Extion, FNAME, test_tmp By name  

is really upset that if I run the 'SELECT' section of the query then everything looks fine but if I run the whole thing (First to leave the test table), then every line has expired.

Unfortunately I This is the reason why I can not set the comments so far. I have to write it here.

At the end of the SQL statement do you have ')' too much Can you cut more when copied / pasted this code Are you?


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -