Subject Re: Insert current time and date
Author Adam
Yes it probably should have taken a wild stab at what you are after,
but it doesn't.

As for your other question, the same query will do it. 'NOW' only
resolves to the current time when referencing a timestamp style field.

INSERT INTO MYTABLE VALUES ('MyString','NOW');




--- In firebird-support@yahoogroups.com, "ra8009" <ra8009@y...> wrote:
>
> Thank you! And I was so close, shouldn't it have just known what I
> meant? :)
>
> One question: what is I wanted to insert the word "now" into a
string
> field? I though that by using single quotes it would treat it as a
string.
>
>
> --- In firebird-support@yahoogroups.com, "Adam" <s3057043@y...>
wrote:
> >
> > You will kick yourself
> >
> > try this:
> >
> > INSERT INTO MYTABLE VALUES ('MyString','NOW');
> >
> >
> > --- In firebird-support@yahoogroups.com, "ra8009" <ra8009@y...>
wrote:
> > >
> > > I want to write an insert statement that inserts a string and
the
> > > current time into a table:
> > >
> > > INSERT INTO MYTABLE VALUES ('MyString',NOW);
> > >
> > > The SQL above doesn't work, it says that "NOW" isn't
recognized.
> > What
> > > is the right way to do this?