Click to See Complete Forum and Search --> : select from table qustion


pelegk1
08-11-2003, 02:25 AM
i want to make a select question
that will return me a RS with the data,which will be ordered by the date where the most new date is first is first and son on,and the answer will be onluy from the last month (like only from aughost and so on....)
(assuming i have a table iwth a col called "myDate")
10X:)
peleg

karlmcauley
08-11-2003, 03:53 AM
<%
TheQueryString =
"select field1, field2, myDate
from tablename
where mydate >='01-AUG-2003'
order by myDate desc"


TheConnectionObject.Execute(TheQueryString)

%>

The format of the date will depend on what kind of database you are using to query from. The above works fine with an Oracle database. With access the date format should be #01/08/2003#.

Hope it helps

pelegk1
08-11-2003, 04:10 AM
1) how do i make the syntax : '01-AUG-2003'
dynamic - which means in every month i need the date of that month
2) how can i get only the last most correct answer for me (and no for example all the 100 for the last month!)
thanks
peleg