[b]Hi Folks[/b] ,
I fail to write a query :
I intend to take count of a record between 2 dates from a sybase database on daily basis.
[red]
viz. total on 2005-04-11 : total1
total on 2005-04-12 : total1
total on 2005-04-13 : total1
[red]
and so on .............
And I fail to do so...........
The Query I have written is
[blue]" Select Count(Sales) from AOD where Sale_dt Between '" & sale_dt & "'" & " And '" sale_dt1 "'"[/blue]
Could anyone help debug my problem...........
Comments
:
: I fail to write a query :
: I intend to take count of a record between 2 dates from a sybase database on daily basis.
: [red]
: viz. total on 2005-04-11 : total1
: total on 2005-04-12 : total1
: total on 2005-04-13 : total1
: [red]
: and so on .............
:
: And I fail to do so...........
:
: The Query I have written is
: [blue]" Select Count(Sales) from AOD where Sale_dt Between '" & sale_dt & "'" & " And '" sale_dt1 "'"[/blue]
:
: Could anyone help debug my problem...........
:
:
:
Use this
Select Count(Sales) from AOD where Sale_dt Between #" & sale_dt & "#" & " And #" sale_dt1 "#"