How to convert Date on MySQL (variable error) -


i have created table on mysql :

create table apolo( date date, name varchar(50) ); 

i have imported excel file :

load data local infile 'c:/users/file.csv' table apolo fields terminated ','  enclosed '"' lines terminated '\n' ignore 10 rows (@date, name); set date=str_to_date(@date,'%d/%m/%y'); 

and error :

error code: 1193. unknown system variable 'date'

if not put line :

set date=str_to_date(@date,'%d/%m/%y'); 

i not error if try use :

select count(*) apolo date='03/09/2015'; 

it not work. format not recognisable.

check date column values in database. default date format in mysql database y-m-d

do have values in format.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -