By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,609 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

Sql View

P: n/a
I am doing a monthly report to export to an excel Doc from SQL 2000
using views.
With my design it works great until it is the first of the month. As the
report always
checks from yesterday to the first of the current month. One view is below.
The date statement checks between the first of month and current date -1

Can anyone help with with this?
Mike

CREATE VIEW dbo.GUTUR
AS
SELECT COUNT(*) AS GUTUR
FROM dbo.Chev
WHERE ([Deal Date] BETWEEN DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0)
AND GETDATE() - 1) AND ([N/U] = 'U') AND (([Sales Type] = 'R') or ([Sales
Type] = '3'))


Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Mon, 3 Jan 2005 13:22:59 -0800, Mike Lander wrote:

(snip)

Hi Mike,

You already asked this question in microsoft.public.sqlserver.server and
you already got some answers there. Please keep the discussion in one
place, okay?

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.