Hello :) ,

How can i filter something then turn it to filter again and one more time , like :

SELECT * FROM Tbl1 WHERE BLABLA1

From those results

WHERE BLABLA 2

And Finally , from all back results

WHERE BLABLA 3.

Real Example: Select all where : the year is between x and y, then the month is beetwen z and w, and finally, where the days is beetween v and t.

Dont Work:

SELECT * FROM table WHERE (FORMAT(datainicio, "dd") >= '01' AND FORMAT(datainicio, "dd") <= '19') 

    AND (FORMAT(datainicio, "mm") >= '01' AND FORMAT(datainicio, "mm") <= '04') 

        AND (FORMAT(datainicio, "yyyy") >= '2005' AND FORMAT(datainicio, "yyyy") <= '2009') ORDER BY

Ps. Can't use the Beetween because it's a char field

OPS: IN MS ACCCESS, MOVE THE POST IF NECESSARY

:cool: Regards, many regards.
Core

Wouldn't be much better and much more maintainable if you converted the values to a date datatype?
Nige

and ..

Your table name is 'table'?

-_-

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.