Click here to Skip to main content
15,891,431 members
Home / Discussions / Database
   

Database

 
AnswerRe: HOW TO MERGE IN ONE! [modified] Pin
Blue_Boy24-Apr-08 9:52
Blue_Boy24-Apr-08 9:52 
QuestionSQL 2000 ----- Extracting Rows from Delimited Strings Pin
n1coltsfan24-Apr-08 2:35
n1coltsfan24-Apr-08 2:35 
GeneralRe: SQL 2000 ----- Extracting Rows from Delimited Strings Pin
Blue_Boy24-Apr-08 8:36
Blue_Boy24-Apr-08 8:36 
GeneralRe: SQL 2000 ----- Extracting Rows from Delimited Strings Pin
n1coltsfan25-Apr-08 4:42
n1coltsfan25-Apr-08 4:42 
GeneralRe: SQL 2000 ----- Extracting Rows from Delimited Strings Pin
Blue_Boy25-Apr-08 5:01
Blue_Boy25-Apr-08 5:01 
GeneralSelection between ranges in sql server 2005 Pin
salon24-Apr-08 2:00
salon24-Apr-08 2:00 
GeneralRe: Selection between ranges in sql server 2005 Pin
Broken Bokken24-Apr-08 2:37
Broken Bokken24-Apr-08 2:37 
GeneralCount number of records in related tables Pin
Kevin Brydon24-Apr-08 0:54
Kevin Brydon24-Apr-08 0:54 
Hi.

I have database structure like this:

Organizations(OrganizationID, Name)
Members(MemberID, OrganizationID, Name)
Courses(CourseID, OrganizationID, Name)

I need to return the Organization Name, the number of members of that organization and the number of courses in that organization in one sql statement so I'd have a table like

[OrganizationName] [Number of Members] [Number of courses]
[Org A] [10] [22]
[Org B] [92] [11]
...

Is it possible without using a stored procedure?

Can anyone help me out? Any help would be much appreciated.
GeneralRe: Count number of records in related tables Pin
Ashfield24-Apr-08 1:30
Ashfield24-Apr-08 1:30 
GeneralRe: Count number of records in related tables Pin
Kevin Brydon24-Apr-08 2:49
Kevin Brydon24-Apr-08 2:49 
GeneralRe: Count number of records in related tables Pin
Ashfield24-Apr-08 3:18
Ashfield24-Apr-08 3:18 
GeneralDiff b/W ADO & ADO.net Pin
sonia.sardana23-Apr-08 23:46
sonia.sardana23-Apr-08 23:46 
GeneralRe: Diff b/W ADO & ADO.net Pin
Mycroft Holmes24-Apr-08 20:19
professionalMycroft Holmes24-Apr-08 20:19 
GeneralTimeout Exception [modified] Pin
Vimalsoft(Pty) Ltd23-Apr-08 23:25
professionalVimalsoft(Pty) Ltd23-Apr-08 23:25 
GeneralRe: Timeout Exception Pin
Mike Dimmick24-Apr-08 4:15
Mike Dimmick24-Apr-08 4:15 
GeneralRe: Timeout Exception Pin
Vimalsoft(Pty) Ltd24-Apr-08 20:09
professionalVimalsoft(Pty) Ltd24-Apr-08 20:09 
GeneralRe: Timeout Exception Pin
GuyThiebaut24-Apr-08 5:52
professionalGuyThiebaut24-Apr-08 5:52 
GeneralRe: Timeout Exception Pin
Vimalsoft(Pty) Ltd24-Apr-08 20:03
professionalVimalsoft(Pty) Ltd24-Apr-08 20:03 
GeneralDropping all Tables Pin
Broken Bokken23-Apr-08 16:10
Broken Bokken23-Apr-08 16:10 
GeneralRe: Dropping all Tables Pin
Harini N K23-Apr-08 20:44
Harini N K23-Apr-08 20:44 
GeneralRe: Dropping all Tables Pin
Broken Bokken24-Apr-08 2:25
Broken Bokken24-Apr-08 2:25 
GeneralMissing table in SQL Server Pin
blakey40422-Apr-08 22:59
blakey40422-Apr-08 22:59 
GeneralRe: Missing table in SQL Server Pin
Marek Grzenkowicz22-Apr-08 23:36
Marek Grzenkowicz22-Apr-08 23:36 
GeneralRe: Missing table in SQL Server Pin
blakey40422-Apr-08 23:49
blakey40422-Apr-08 23:49 
GeneralRe: Missing table in SQL Server Pin
Marek Grzenkowicz23-Apr-08 1:27
Marek Grzenkowicz23-Apr-08 1:27 

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.