Hi all,
I have a table which list all the different product# and
quantity of the product in each row. But for some reason,
some of the product splites into 2 rows. For example;
Product A has a quantity of 30, then it will shows like this:
Product A 15
Product A 15
i want to combine them into: Product A 30
Every fields are the same except it splites the quantity into 2 rows.
So is there a way to combine all those splited rows and add up the quantity.
I'm don't want to do it manual because there at least thousand rows there.
I really need help on this, thanks
Kelvin
1 2621 ADezii 8,834
Recognized Expert Expert
Hi all,
I have a table which list all the different product# and
quantity of the product in each row. But for some reason,
some of the product splites into 2 rows. For example;
Product A has a quantity of 30, then it will shows like this:
Product A 15
Product A 15
i want to combine them into: Product A 30
Every fields are the same except it splites the quantity into 2 rows.
So is there a way to combine all those splited rows and add up the quantity.
I'm don't want to do it manual because there at least thousand rows there.
I really need help on this, thanks
Kelvin
- SELECT tblProducts.Product, Sum(tblProducts.Quantity) AS Total_Quantity
-
FROM tblProducts
-
GROUP BY tblProducts.Product
-
HAVING tblProducts.Product Is Not Null;
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Colin Steadman |
last post by:
Part No Description Quantity
45643 Random part 10
45678 Another Random part 7
98944 And another 1
<submit button>
The above is an example of some data I am displaying in a
form on an ASP page. I need to allow the users to edit
any of the rows displayed and...
|
by: Spanky |
last post by:
Thanks for any help in advance!
I have this order form where you add rows as you need them. The
routine to add fields is working fine. I am trying to add the ability
to delete rows if you check the checkbox in the cooresponding field
and click remove item.
I would appreciate any insite. BTW Am using IE browsers only.
Thanks!
|
by: Lyle Fairfield |
last post by:
Suppose there are four identical rows in a table, save for some unique id
which identifies each row.
For example, John Doe and his three clones live in the same home, share the
same dob, name, address, sex, car, telephone, spouse, health insurance etc.
Would you create four rows, or one row with a quantity field, holding four?
Why?
Would you...
|
by: serge |
last post by:
How can I run a single SP by asking multiple sales question either
by using the logical operator AND for all the questions; or using
the logical operator OR for all the questions. So it's always
either AND or OR but never mixed together.
We can use Northwind database for my question, it is very similar
to the structure of the problem on the...
|
by: imani_technology_spam |
last post by:
I have the following table;
CREATE TABLE (
IDENTITY (1, 1) NOT NULL ,
(7200) COLLATE SQL_Latin1_General_Pref_CP1_CI_AS NOT
NULL ,
CONSTRAINT PRIMARY KEY CLUSTERED
(
,
| |
by: Bruno Alexandre |
last post by:
Hi Guys,
I manage to do what I want with the GridView, using DataTable to
popultate the GridView with just the products from the Office Stock
I just show the products that the Office have in Stock and the
quantities, and I'm using a check box at the end of each row so the user can
selected (so that item with the quantity will be deleted...
|
by: cycleops |
last post by:
Can anyone please help?
I'm trying to combine 2 or more similar rows into one row, accumulating a field for quantity. E.g.:
index, field1, field2, quantity
1, ccc, bbb, 5
2, aaa, bbb, 15
3, aaa, bbb, 3
Because the contents of fields 1 & 2 are the same in rows 2 and 3, I want to end up with...
|
by: denny1824 |
last post by:
Hi everyone,
Here is my problem. I have a Table Variable (I could easily turn it into a Temp Table instead) that will sometimes have rows that are identical except for one specific column. The column is of nvarchar. When the rest of the columns for those rows are identical, I want to combine all of the values of that column into a single...
|
by: backups2007 |
last post by:
I'm using php/mysql to develop a program. What I need to do is create an insert query that would be able to insert at least 9 rows of data from input text boxes. But of course, before inserting the data checking which rows are empty.
I did something like this:
<?
$item_code1 = $_POST;
$description1 = $_POST;
$quantity1 = $_POST;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |