Monday, March 19, 2012

Goofy problem

Hi All,
When I use the "between" statement
in the query analyzer in MRS, it will not poplulate the data fields.
when I remove the between statement, it runs fine. The parameters in
the
between statement are correct, and I tried different paramenters such
as
a date between 2002 and 2007, which I know is in the db same problem.
I have service packed SQL and VizStudio no help.
Thanks,
>Scott
here's a snippette:
No results using this.
Where Year >= 2006
And Month BETWEEN @.BEGINDATE AND @.ENDDATE
Group by etc......you need to convert your begin and enddate parameters to Months for this to
work, you can use MONTH(@.BeginDate) to do this.
"scott" <dunnscott@.gmail.com> wrote in message
news:1185297699.337926.89340@.57g2000hsv.googlegroups.com...
> Hi All,
> When I use the "between" statement
> in the query analyzer in MRS, it will not poplulate the data fields.
> when I remove the between statement, it runs fine. The parameters in
> the
> between statement are correct, and I tried different paramenters such
> as
> a date between 2002 and 2007, which I know is in the db same problem.
> I have service packed SQL and VizStudio no help.
> Thanks,
>>Scott
> here's a snippette:
> No results using this.
> Where Year >= 2006
> And Month BETWEEN @.BEGINDATE AND @.ENDDATE
> Group by etc......
>

No comments:

Post a Comment