Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

More dates issues

 
   Database Forums (Home) -> Datamining RSS
Next:  A potential bug (infinite loop) in Oracle: queryi..  
Author Message
Ana

External


Since: May 04, 2007
Posts: 5



(Msg. 1) Posted: Wed Jan 23, 2008 5:08 am
Post subject: More dates issues
Archived from groups: microsoft>public>sqlserver>datamining (more info?)

Hello all,

I'm stumble on a project so I would appreciate someone's help.

I've a company which sells several service contracts everyday with duration
from one to 36 months. The tbl parameters are as follows:

ID, cost, activation_date, start_date, end_date .. among many other fields.

The idea is to create a query/report outputting daily and monthly cost
information considering the leap year.

Example, today's daily report if starting today: sum(cost) / contract
period in days where start_date = getdate()

Example, tomorrows' daily report if starting today: (today's results -1) +
(sum(cost) / contract period in days where start_date = getdate())

Hope I've being clear. TIA

Ana

 >> Stay informed about: More dates issues 
Back to top
Login to vote
Dejan Sarka

External


Since: Mar 18, 2004
Posts: 317



(Msg. 2) Posted: Tue Feb 05, 2008 3:01 pm
Post subject: Re: More dates issues [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Do please check a wonderful article on auxiliary calendar table at
http://sqlserver2000.databases.aspfaq.com/why-should-i-consider-using-...auxilia I
guess you will get an idea how to solve your problem.

--
Dejan Sarka
http://blogs.solidq.com/EN/dsarka/default.aspx

"Ana" wrote in message

> Hello all,
>
> I'm stumble on a project so I would appreciate someone's help.
>
> I've a company which sells several service contracts everyday with
> duration from one to 36 months. The tbl parameters are as follows:
>
> ID, cost, activation_date, start_date, end_date .. among many other
> fields.
>
> The idea is to create a query/report outputting daily and monthly cost
> information considering the leap year.
>
> Example, today's daily report if starting today: sum(cost) / contract
> period in days where start_date = getdate()
>
> Example, tomorrows' daily report if starting today: (today's results -1)
> + (sum(cost) / contract period in days where start_date = getdate())
>
> Hope I've being clear. TIA
>
> Ana
>

 >> Stay informed about: More dates issues 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Selecting every Sunday between two dates - Can anyone tell me the SQL statement that selects every Sunday (or other specified day) date between two dates? Thanks in advance

My available memory is down to very little, yet my PF Usag.. - My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how..

SBA Invoice email - Although the standard invoice within sba is lame, it is much easier to use than exporting to Word, etc. Is there a way to email this form? If printed to a file, it uses a format that no one else can read. There should be an easy way to email this..

Shrink .LDF File - Dear All, The SQL Server 2000 in my network is hosting many database for many business units within the organization. The server is heavily used for data collection and web hosting. One of the .LDF file has grown very fast and I am very sure that it....

SELECT in sections - I want to know how to retrieve records from a SELECT command in sections. I mean, if total records of a SELECT command is 100,000, I want to use SELECT that retrieves me them in 20 "sections" of 5000 : first 5000, second 5000, sixth 5000 or ...
   Database Forums (Home) -> Datamining All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]