List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 5 1999 5:25pm
Subject:Re: CURDATE() in input file?
View as plain text  
At 11:50 AM -0500 9/5/99, John N. Alegre wrote:
>I am trying to use CURRENT_DATE() from an input date file.  In that file I
>have
>tried:
>
>string1 CURRENT_DATE()
>
>or
>
>string1 'CURRENT_DATE()'
>
>or
>
>string1 CURDATE()
>
>All put 0000-00-00 in the field.
>
>This works fine with
>
>insert into sometable values('string1', CURRENT_DATE());
>
>but not when the input comes in from a external file.
>
>What am I missing?


File input must contain literal values, not arbitary expressions,
unless perhaps you're constructing statements in some program and
sending them to the server.  From your message it's impossible
to know what you're doing, but I'm guessing you're using something
like LOAD DATA, in which case literal values are necessary.

If you're trying to set a TIMESTAMP field, just insert a NULL
instead.  (\N in a LOAD DATA input file).

--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/
Thread
CURDATE() in input file?John N. Alegre5 Sep
  • Re: CURDATE() in input file?Paul DuBois5 Sep
    • Re: CURDATE() in input file? -- GOT IT.John N. Alegre6 Sep