By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,603 Members | 1,096 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,603 IT Pros & Developers. It's quick & easy.

How to find Double Majors

P: 3
I have 2 colums, one with the list of all students id number and if they are in a double major their id is listed 2 times in the colum. The next colum is the id of the specific business scholl they are in (accounting, mis...)
How do I find out specifily how many double majors are in mis with accounting or with finance ect. in an SQL statment?


id major code

rt1245 bs223
rt1245 bs224(this person is a double major)
rs235 bs223
May 24 '07 #1
Share this Question
Share on Google+
2 Replies

MMcCarthy
Expert Mod 10K+
P: 14,534
I have 2 colums, one with the list of all students id number and if they are in a double major their id is listed 2 times in the colum. The next colum is the id of the specific business scholl they are in (accounting, mis...)
How do I find out specifily how many double majors are in mis with accounting or with finance ect. in an SQL statment?


id major code

rt1245 bs223
rt1245 bs224(this person is a double major)
rs235 bs223
You haven't explained your requirements very well. I'm afraid I'm confused as to what actual results you want in your query.
May 26 '07 #2

missinglinq
Expert 2.5K+
P: 3,532
I agree with Mary that clarification is needed. At first glance, however, it seems you are needlessly complicating things! It is very poor design to have student IDs, which I assume would be your unique identifier for a record, appear twice in a table. With only two majors possible per student, it makes more sense to have a second Major field and a corresponding second field for school of study, in your record.
May 26 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.