473,563 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Group by Queries in DataGrid

Hi

I want to know that can we show the result of group by query in the
following way in datagrid

Data is like that

id val
1 4
1 5
1 6
3 6
5 7
2 6
5 2

O/p I want to be in grid to be like that

id val
1 4
5
6
Total 15

2 6
Total 6

3
and like that

Is it possible to do that in datagrid then how tell me I m using
sqlserver2000 as database
Regards
Sandeep
Nov 18 '05 #1
2 3445
select * from table group by name
fill this data into dataset and bind the grid
Or use dataview
Nitin

"Sandeep" <ss***@uptecnet .com> wrote in message
news:eT******** *****@TK2MSFTNG P11.phx.gbl...
Hi

I want to know that can we show the result of group by query in the
following way in datagrid

Data is like that

id val
1 4
1 5
1 6
3 6
5 7
2 6
5 2

O/p I want to be in grid to be like that

id val
1 4
5
6
Total 15

2 6
Total 6

3
and like that

Is it possible to do that in datagrid then how tell me I m using
sqlserver2000 as database
Regards
Sandeep

Nov 18 '05 #2
http://www.dotnetjunkies.com/Tutoria...63C4C9BBC.dcik

"Sandeep" <ss***@uptecnet .com> wrote in message
news:eT******** *****@TK2MSFTNG P11.phx.gbl...
Hi

I want to know that can we show the result of group by query in the
following way in datagrid

Data is like that

id val
1 4
1 5
1 6
3 6
5 7
2 6
5 2

O/p I want to be in grid to be like that

id val
1 4
5
6
Total 15

2 6
Total 6

3
and like that

Is it possible to do that in datagrid then how tell me I m using
sqlserver2000 as database
Regards
Sandeep

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
17356
by: Robby McGehee | last post by:
I need this to work: SELECT FROM WITH (NOLOCK) where ='a' GROUP BY , HAVING COUNT () > 1 The problem is that I get an error that needs to be in the GROUP BY clause or aggregate function. if I put it in there, I will get no duplicates (because it is the identity field). The whole point of this is to find dups. Thanks for any help.
1
1175
by: AshleyT | last post by:
I have a table that contains customers, and another table that has customers and items they are authorized for. I would like to show a datagrid (1) with customers that are authorized for a select item the user choose, and datagrid (2) that shows which customers are not in that table for that item. The datagrid2 is the one that I am...
3
8031
by: Louis | last post by:
Is there a switch or a setting in Access so that a group by query doesn't return a field name SumOf(original field name)? Especially when you chain multiple queries together you'd get SumOfSumOfSumOf.... Anyone know? TIA.
6
17905
by: Tony Miller | last post by:
All I have an aggregate query using the function Month & Year on a datereceived field ie: TheYear: Year() TheMonth: Month() These are the group by fields to give me a Count on another field by year & month When I try to place a date filter 'Between x And y ' on an expression field
1
1842
by: Angelo | last post by:
I have a user (john.doe) as a member of a group (MyGroup). I have assigned group permission to view and run the queries of that db but then when I log in with that user, I still can't access the queries. However, when I change that individual user's permissions to allow access to the queries it goes through fine and he can access it. Don't...
1
1751
by: Brent Mondoux | last post by:
Hey everyone, I'm trying to find the best non-spaghetti code way to do the equivalent of a ColdFusion CFQUERY GROUP command so that I can display a FAQ with categories as follows: -- Example: Begin -- General
4
3742
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure and username, password etc will be exactly the same for each server, the only thing that will change is the server name. Idealy I would like to get...
5
1445
by: antonyliu2002 | last post by:
I want to put results from more than 1 sql queries into a signle datagrid, For example, in my web application, I submit this following query to my oracle database: Select NetID, Firstname, Lastname from Student; Then I put the result into my DataGrid. This is successful.
0
1329
bleurose
by: bleurose | last post by:
We have a modestly large MySQL application (about 10,000,000 rows spread over 40+ tables). Most of our queries are very small and fast (single table or two-table joins with good keys and indexes). However, we have a few queries that would be described as "long-running", and in particular, they use GROUP BY to aggregate some information. It...
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
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...
0
7885
Oralloy
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. ...
0
8106
jinu1996
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...
1
7638
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...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
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...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
923
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.