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

More dates issues

 
   Database Help (Home) -> Datamining RSS
Next:  singleton query agains OLAP based model?  
Author Message
Ana

External


Since: Jan 23, 2008
Posts: 1



(Msg. 1) Posted: Wed Jan 23, 2008 10:05 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: 103



(Msg. 2) Posted: Tue Feb 05, 2008 6:07 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" <ananospam DeleteThis @yahoo.es> wrote in message
news:elGCx8ZXIHA.2268@TK2MSFTNGP02.phx.gbl...
> 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:
Performance issues SQL Server 2005 Data Mining - Hello I am trying to run a clustering model (building mode) against a 15.000.000 records table consisting in 45 fields (categorical and numeric). I have to kill the process after 5 hours because never ends. I have no problem with other..

Collation Problem any help - Hello all : My problem is like the following I have an online databse with a latin collation, this database is using ntext and nvarchar values that was with our previous admin ok the problem is in the data is stored should use another collation (the...

Reprocessing a mining model - I'm currently developing a user registration prototype. The aim is to classify certain types of users. However, after the registration I query a decision tree model in Analysis Services with DMX and I want to send the user data into the warehouse to....

Trying to cut down query times - I have a query that is based on two other queries that are based on tables in a database. All of the queries that are used for this final query use grouping and totals. In the application I am making, I need to choose a date range to select the subset....

Update serial number in database - Hi, I want to update specific fields in a existing table in SQL database as below example: L240100001-LG L240100002-LG *serial number is difficult to update one by one L240100003-LG L240100004-LG L240100005-LG change to L240100001-L L240100002-L..
   Database Help (Home) -> Datamining All times are: Pacific Time (US & Canada) (change)
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 ]