Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Core
Starting Member
15 Posts |
Posted - 2008-04-28 : 13:59:25
|
Hello,How can i filter something then turn it to filter again and one more time , like :SELECT * FROM Tbl1 WHERE BLABLA1From those resultsWHERE BLABLA 2And Finally , from all back resultsWHERE 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 BYPs. Can't use the Beetween because it's a char fieldRegards, many regards.Core |
|
|
|
|