Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL string

Posted on 1998-11-18
7
Medium Priority
?
176 Views
Last Modified: 2010-04-04
In a Query component I have a SQL string :
select sum(price) from customer
What do I write to add one field more?
I have tried many ways like:
select date sum(price) from Customer
and
select date and sum(price) from Customer
0
Comment
Question by:rainbowsoftware
7 Comments
 

Expert Comment

by:hpw
ID: 1347190
Hello,

I think you should try this:

Select Date, Sum(price) from Customer

Hubert

0
 

Author Comment

by:rainbowsoftware
ID: 1347191
select date, sum(price) from customer does not work.

I want to sum the field Price and it's OK with
select sum(price) from Customer
But when writing
select Date, sum(price) from customer group by date
the SumOfPrice shows the value of the current record and not the sum of all.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1347192
hi rainbowsoftware,

you cannot have fields and the sum of all in a normal sql-statement but in a nested subquery should it go :

select date, sumoverall from customer, (select sum(price) as sumoverall from customer)

but each line holds now the total sum

meikl
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Expert Comment

by:dwwang
ID: 1347193
Tell me what do you want to have as the result dataset, and I can tell you how to do that.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1347194
Hello?
0
 

Author Comment

by:rainbowsoftware
ID: 1347195
The answer from hpw is not useable.
The answer from Kretzchmar has helped me to do the job.
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 150 total points
ID: 1347196
hi rainbowsoftware,

well then give me the points

what is going on with your q:
http://www.experts-exchange.com/Q.10097306

meikl
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question