Re: a simple query with date
From: Gerald Stanley (gcstanley_at_d-s-l.pipex.comREMOVE-)
Date: 09/24/04
- Next message: MGFoster: "Re: Option Group Checkboxes - Inbedded"
- Previous message: MGFoster: "Re: access queries"
- In reply to: Gonsior Andreas: "a simple query with date"
- Next in thread: Gonsior Andreas: "Re: a simple query with date"
- Reply: Gonsior Andreas: "Re: a simple query with date"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 24 Sep 2004 11:57:43 -0700
date is a reserved word in Access and should be avoided as
a column name (as is time). If you do use it, it should be
enclosed in [] to differentiate from the function date(). Try
select * from results where [date] > #09/14/2004# order by
[date]
Hope This Helps
Gerald Stanley MCSD
>-----Original Message-----
>Hi Newsgroup!
>
>I've got a litte problem with an sql statement, I'm
sending to an access mdb
>by an C++-Application, to get "a newer value than the last
one".
>The columns of the table "Results" looks like this:
>id, date, time, value1, value2, value3, ... valueN
>
>I made an SQL Statement:
>select * from results where date > datevalue('14.09.2004
15:00:00') order by
>date
>But when I get this recordset, I have as the first value
again that one with
>date = '14.09.2004 15:00:00' in it. Is it to near at the
weekend, am I blind
>or what is going on here? :-(
>I tried it also with "select * from results where date >
'14.09.2004
>15:00:00'" but it didn't worked, too. And a look into the
MSDN didn't helped
>either.
>
>Thanks in advance!
>
>Andreas
>
>P.S.: It's very urgent, I need a solution for that problem
on Monday and I
>spend the whole day here at work to solve it. And NO, it's
not a homework
>for school or something else ;-)
>
>
>.
>
- Next message: MGFoster: "Re: Option Group Checkboxes - Inbedded"
- Previous message: MGFoster: "Re: access queries"
- In reply to: Gonsior Andreas: "a simple query with date"
- Next in thread: Gonsior Andreas: "Re: a simple query with date"
- Reply: Gonsior Andreas: "Re: a simple query with date"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|