Dates problems
- From: "Ana" <nospam@xxxxxxxxx>
- Date: Tue, 13 Sep 2005 18:43:01 +0200
Hi,
I've a dialog form which interacts with a stored procedure to select a range
of dates. A command moves the data to a report, in theory, but it's not
working.
SELECT dbo.CLAIMS.CLAIM_ID, dbo.CLAIMS.NAME,
dbo.CLAIMS.DATE_IN,
dbo.CLAIMS.SALESMAN_ID
FROM dbo.CLAIMS
WHERE (dbo.CLAIMS.CLAIM_ID = @Salesman) AND
(CAST(dbo.CLAIMS,DATE_IN AS datetime) BETWEEN @D_Start AND @D_End)
The dates are stored in yyyymmdd format for which -> CAST.
The report is blank (no info and no errors), however, when using the Query
Analyzer, the script works fine. Of course, replacing the variables (@) with
fixed data.
What am I doing wrong?
TIA
Ana
.
- Prev by Date: SELECT lowest 6 of 12 number
- Next by Date: Re: SELECT lowest 6 of 12 number
- Previous by thread: SELECT lowest 6 of 12 number
- Next by thread: Newbie question on EQUAL_AREAS and cases
- Index(es):
Relevant Pages
|
Loading