Hi, This query is give an error like below; There is a column that name and description are date in Table that also include database.in the table,there are some date like that:2003-12-01,2003-11-16,2003-12-01,2003-12-03,2003-11-19. when i run this query,if i query between 2003-12-01 and 2003-12-05,result is right, but if i query 1 mount ago (i mean between 2003-11-15 and 2003-12-05), the data is between 2003-12-01 and 2003-12-05 date. data that in 11. mount didn't listed. how can solve this problem... This Sql query: Sqlquery = "SELECT * FROM table1 WHERE Gruop like '" & txtGruop.Text & "' And date_first between '" & txtdate1.Text & "' and '" & txtdate2.Text & "' Order by date_first ASC ; " Adodc1.RecordSource = Sqlquery Adodc1.Refresh This my table constructions;
Table name:Table1 Name |Surname|Group |Date_First ----------------------------------- Hasan |DEMIR |Chief |2003-11-05 Abidin |BESON |Chief |2003-11-16 Tosun |KALAS |Chief |2003-11-18 Kazım |RUSTU |Manager|2003-12-03 Ali |HASIM |Worker |2003-11-20 Kaan |ATES |Worker |2003-12-04 Kadir |KEK |Worker |2003-12-01 Aslan |SUCU |Worker |2003-11-22 Kadriye|OZEN |Worker |2003-12-15 Halis |ERKILET|Worker |2003-11-21 Kazım |HAS |Worker |2003-12-07 Sqlquery = "SELECT * FROM table1 WHERE Gruop like 'Chief' And date_first between '2003-12-05' and '2003-12-15' Order by date_first ASC ; " Query result: 2003-12-05,06,07,08,09,10,11,12,13,14,15 but; >> Sqlquery = "SELECT * FROM table1 WHERE Gruop like 'Chief' And date_first between '2003-11-16' and '2003-12-04' Order by date_first ASC ; " Query result: 2003-12-01,02,03,04 What is problem? Best regards |