Query in Access with a While cycle

2

Good morning. I have a problem, I would like to select data from my database in Access with a range of dates and a specific name. How can I do it? My thought is with While but it does not work for me.

select * from Registro
While Fecha_uso between #12/19/2016# and #12/23/2016# 
where name = 'Juan'
    
asked by use2105 23.12.2016 в 17:00
source

2 answers

4

While it is not an SQL command.

Your thinking is perfect, but what you wrote in the while should go in the where.

select * from Registro
Where Fecha_uso between #12/19/2016# and #12/23/2016# 
and name = 'Juan'
    
answered by 23.12.2016 в 17:16
0

mysql basic commands are:

  

select: select the values of the fields you want to obtain

     

from:   mention the tables of the attributes

     

where: details the conditions   for your consultation to be effective

In your case the while is wrong, but it is where, your code would be like this:

Where Fecha_uso between #12/19/2016# and #12/23/2016# 
    
answered by 23.12.2016 в 20:12