Showing posts with label clients. Show all posts
Showing posts with label clients. Show all posts

Friday, March 30, 2012

Need help bracketing counts

I need to create a view that shows the number of times that clients made payments, how many clients, and how much they paid over a period of time. I'm not sure if I can use a case for this. How can I put something like this together?

I have a tblClients with a clientid field

I have a tblPayments with the clientid, pmtdate, and pmtamount

For example:

1 Payment -- 23 Clients -- $16000

2 Payments -- 12 Clients -- $32000

3 Payments -- 4 Clients -- $13000

etc...

If you the the "how many clients" value you must also have such a field in the tblPayments table, or is it one purchased client per payment? If so, then

SELECT c.clientid, count(p.clientid) as clientCount,sum(p.pmtamount) as pmtSum
FROM tblClients c
LEFT JOIN tblPayments p ON c.clientid=p.clientid
WHERE p.pmtdate BETWEEN @.startdate AND @.enddate
GROUP BY c.clientid

|||

SELECTCOUNT(t.clientid)as clients,t.tblPaymentsCount,SUM(t.pmtamount)as pmtamountFROM(SELECT clientidas clientid,COUNT(tblPaymentsID)as tblPaymentsCount,SUM(pmtamount)as pmtamountFROM tblPaymentsGROUP BY clientid) tGROUP BY tblPaymentsCountORDER BY tblPaymentsCount
|||

Now that I saw BradFMJ's suggestion I realize that I quite possibly misunderstood the task

Maybe this is what you're after:

SELECTcount(*)as paymentCount,count(DISTINCT clientid)as clientCount,SUM(pmtamount)as pmtSumWHERE pmtdateBETWEEN @.startDateAND @.endDate

Need HELP ASAP for Q823492

Does this hotfix go on the SQL Server system or on the
clients that are trying to connect to the SQL Server?
Thanks a lot,
JoePer the article, install it on the server. Make sure to
follow the steps in the To Activate the Update section.
-Sue
On Tue, 2 Sep 2003 07:29:48 -0700, "Joe" <jkdriscoll@.qg.com>
wrote:
>Does this hotfix go on the SQL Server system or on the
>clients that are trying to connect to the SQL Server?
>Thanks a lot,
>Joe

Monday, March 26, 2012

Need for SQL

I'm in the process of ordering a new 2003 server from
Dell. It will be used in a Doctor's office with <5
clients. In your opinion is SQL software an essential
ingredient for overall performance, or does the 2003
server already incorporate many of the features of SQL ?
In simple terms what does SQL provide that 2003 srever
doesn't? As you can see I'm confused, I want to save cost
and not be redundant but in know way do I want to limit
the capabilities of the office.Hi
You may want to look at Small Business Server 2003. This includes amongst
others!
Windows 2003
Exchange 2003
The premium edition includes SQLServer 2000.
Although it may be alot of software to run on a single system the pricing of
this product may make it a viable option if you are looking to deploy all
three applications.
http://www.microsoft.com/windowsserver2003/sbs/evaluation/overview/default.mspx#XSLTsection122121120120
John
"Marty" <anonymous@.discussions.microsoft.com> wrote in message
news:02e101c3981e$3e81f150$a601280a@.phx.gbl...
> I'm in the process of ordering a new 2003 server from
> Dell. It will be used in a Doctor's office with <5
> clients. In your opinion is SQL software an essential
> ingredient for overall performance, or does the 2003
> server already incorporate many of the features of SQL ?
> In simple terms what does SQL provide that 2003 srever
> doesn't? As you can see I'm confused, I want to save cost
> and not be redundant but in know way do I want to limit
> the capabilities of the office.

Need for SQL

I'm in the process of ordering a new 2003 server from
Dell. It will be used in a Doctor's office with <5
clients. In your opinion is SQL software an essential
ingredient for overall performance, or does the 2003
server already incorporate many of the features of SQL ?
In simple terms what does SQL provide that 2003 srever
doesn't? As you can see I'm confused, I want to save cost
and not be redundant but in know way do I want to limit
the capabilities of the office.There is no relational database functionality built into Windows 2000
Server. SQL Server is needed only if you have (or are planning to
develop/purchase) database applications which require SQL Server.
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"Marty" <anonymous@.discussions.microsoft.com> wrote in message
news:04d601c3981e$3ec19260$a301280a@.phx.gbl...
> I'm in the process of ordering a new 2003 server from
> Dell. It will be used in a Doctor's office with <5
> clients. In your opinion is SQL software an essential
> ingredient for overall performance, or does the 2003
> server already incorporate many of the features of SQL ?
> In simple terms what does SQL provide that 2003 srever
> doesn't? As you can see I'm confused, I want to save cost
> and not be redundant but in know way do I want to limit
> the capabilities of the office.

Saturday, February 25, 2012

necessaru help-databse mirroring

Hi everyone,
I have a server and several clients.
I plan to make a mirror from server's database.
Can you all please help me how to do it step by step?
Thanks,
Nassa
Nassa - please take a look here:
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1199004,00.html
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .