Click here to Skip to main content
15,888,401 members
Home / Discussions / Database
   

Database

 
AnswerRe: edit view by adding squence number Pin
Blue_Boy14-Sep-08 2:49
Blue_Boy14-Sep-08 2:49 
GeneralRe: edit view by adding squence number Pin
nelsonpaixao14-Sep-08 13:14
nelsonpaixao14-Sep-08 13:14 
AnswerRe: edit view by adding squence number Pin
Rocky#14-Sep-08 17:58
Rocky#14-Sep-08 17:58 
GeneralRe: edit view by adding squence number Pin
Mycroft Holmes14-Sep-08 19:29
professionalMycroft Holmes14-Sep-08 19:29 
GeneralRe: edit view by adding squence number Pin
Rocky#14-Sep-08 19:33
Rocky#14-Sep-08 19:33 
AnswerRe: edit view by adding squence number Pin
RyanEK14-Sep-08 20:35
RyanEK14-Sep-08 20:35 
AnswerRe: edit view by adding squence number Pin
nelsonpaixao15-Sep-08 13:45
nelsonpaixao15-Sep-08 13:45 
QuestionAggregating function on strings in a group by [modified] Pin
swjam14-Sep-08 0:15
swjam14-Sep-08 0:15 
If I have a table:

TAB1

PKey   Col1StrName   Col2IntDebt   Col3StrItem
1      Michael       2.00          Toothpaste
2      Josh          3.00          Shampoo
3      Karen         1.00          Softdrink
4      Josh          2.50          Soap
5      Michael       5.75          Lollies
6      Michael       0.25          Pen
7      Karen         3.25          Milk


If I do a group by

I can aggregate the debts to:

Name       Debt   

Michael    8.00
Josh       5.50
Karen      4.25


With the following code:

select
  Col1StrName as Name, SUM(Col2IntDebt) as Debt
from
  TAB1 
group by
  Col1StrName




I would like to include a column such that:

Name       Debt     Items

Michael    8.00     Toothpaste, Lollies, Pen
Josh       5.50     Shampoo, Soap
Karen      4.25     Softdrink, Milk


What is the aggregate function to use for the string?

TIA!

----------------------------------------------------------
"unzip; strip; touch; finger; mount; fsck; more; yes; unmount; sleep" - my daily unix command list

modified on Sunday, September 14, 2008 8:56 PM

AnswerRe: Aggregating function on strings in a group by Pin
Mycroft Holmes14-Sep-08 19:31
professionalMycroft Holmes14-Sep-08 19:31 
QuestionHow to connect Mysql database wamp from C#? Pin
cutedrew13-Sep-08 21:04
cutedrew13-Sep-08 21:04 
AnswerRe: How to connect Mysql database wamp from C#? Pin
Mycroft Holmes14-Sep-08 19:33
professionalMycroft Holmes14-Sep-08 19:33 
Questiona basic question Pin
followait12-Sep-08 19:46
followait12-Sep-08 19:46 
AnswerRe: a basic question Pin
Mycroft Holmes12-Sep-08 23:58
professionalMycroft Holmes12-Sep-08 23:58 
Questionhow to insert data from one table to other two diferent tables using SQL query Pin
khalidd12-Sep-08 18:21
khalidd12-Sep-08 18:21 
AnswerRe: how to insert data from one table to other two diferent tables using SQL query Pin
Blue_Boy12-Sep-08 20:48
Blue_Boy12-Sep-08 20:48 
GeneralRe: how to insert data from one table to other two diferent tables using SQL query Pin
khalidd12-Sep-08 23:58
khalidd12-Sep-08 23:58 
GeneralRe: how to insert data from one table to other two diferent tables using SQL query Pin
Mycroft Holmes13-Sep-08 0:00
professionalMycroft Holmes13-Sep-08 0:00 
GeneralRe: how to insert data from one table to other two diferent tables using SQL query Pin
Blue_Boy13-Sep-08 3:27
Blue_Boy13-Sep-08 3:27 
AnswerRe: how to insert data from one table to other two diferent tables using SQL query Pin
nelsonpaixao14-Sep-08 13:31
nelsonpaixao14-Sep-08 13:31 
GeneralRe: how to insert data from one table to other two diferent tables using SQL query Pin
khalidd14-Sep-08 21:46
khalidd14-Sep-08 21:46 
QuestionSELECT COUNT returns 2 answers. Pin
Sunset Towers12-Sep-08 12:36
Sunset Towers12-Sep-08 12:36 
AnswerRe: SELECT COUNT returns 2 answers. Pin
Eslam Afifi12-Sep-08 12:58
Eslam Afifi12-Sep-08 12:58 
QuestionDupicate [modified] Pin
Bassam Saoud12-Sep-08 5:52
Bassam Saoud12-Sep-08 5:52 
GeneralRe: Dupicate Pin
Eslam Afifi13-Sep-08 4:47
Eslam Afifi13-Sep-08 4:47 
GeneralRe: Dupicate Pin
Bassam Saoud13-Sep-08 11:51
Bassam Saoud13-Sep-08 11:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.