Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Problem In Query

[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

  • Termc1224Termc1224 Member Posts: 84
    : [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...........
    :
    :
    :
    Use this
    Select Count(Sales) from AOD where Sale_dt Between #" & sale_dt & "#" & " And #" sale_dt1 "#"

Sign In or Register to comment.