Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 No more question here!

Author  Topic 

sunflower2005
Petulant

5 Posts

Posted - 2007-12-05 : 14:57:14
No more question since it became all irrelevant.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-05 : 15:03:27
A starter would be to post your table definitions.
Then add some sample data and your expected output.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-12-06 : 03:52:22
I am assuming you only have one table as you didn't state otherwise.

1. select Studentname from Students where Department = 'IS'

2. select studentid from Student where HrsRegistered >= 12

3. select Count(StudentID), PermanentCity from Students Group by PermanentCity
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-12-06 : 04:48:39
Should I post links for Learn SQL?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-12-06 : 05:12:59
Might be helpful as it seems the knowledge would help OP.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-12-06 : 05:53:34
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-06 : 11:23:19
Are you obfuscating the two town names (Thibodeaux and Baton Rouge) just so that your professor shouldn't find you with google?


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

sunflower2005
Petulant

5 Posts

Posted - 2007-12-07 : 04:35:10
This became irrelevant since I have made a lot of changes to my database.
So for anyone else that was posting a reply you can stop here.
Or if you have nothing better to do like the person a*ove then keep posting comments.
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-12-07 : 04:51:09
quote:
Originally posted by sunflower2005

This became irrelevant since I have made a lot of changes to my database.
So for anyone else that was posting a reply you can stop here.
Or if you have nothing better to do like the person a*ove then keep posting comments.


You see, people who post here to help others do not do it for the money, they do it to try to teach others. If all you want is the queries without trying to figure things out for yourself, what is the point of doing SQL or in fact computers in any form as you will always need to learn things yourself.

Also, with that kind of attitude, do you really expect to get the kind of help you are after?
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-12-07 : 04:51:45
quote:
Originally posted by sunflower2005

This became irrelevant since I have made a lot of changes to my database.
So for anyone else that was posting a reply you can stop here.
Or if you have nothing better to do like the person a*ove then keep posting comments.


You see, people who post here to help others do not do it for the money, they do it to try to teach others. If all you want is the queries without trying to figure things out for yourself, what is the point of doing SQL or in fact computers in any form as you will always need to learn things yourself.

Also, with that kind of attitude, do you really expect to get the kind of help you are after?
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2007-12-07 : 05:01:51
grrr ...again??
quote:

Thanks to those who have given me a thoughtful answer.


--------------------------------------------------------------------------------
Edited by - sunflower2005 on 12/07/2007 04:44:54




Em
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-12-07 : 05:11:34
CONGRATULATION !


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

pootle_flump

1064 Posts

Posted - 2007-12-07 : 05:45:59
Original post from sunflower2005 (from Google cache):

1. List the students in the IS department -- either as majors or minors. (I only have students with majors. no minors in my database.)

2. List the IDs of students carrying 12 or more hours this semester. (I have a field "HrsRegistered" under Student table, 3 of them have over 12 and one has 9.)

3. List the number of students from each city. (I have 2 students from *hibodeaux and 2 from B*ton Rouge, I also have CurrentCity and PermanentCity for each student, and in this case I want to retrieve the results from PermanentCity.)

All my tables are created in MDB, and I wrote the script to create and populate the data in SQL Server, and having a bit trouble writing the above queries. If you need more specific info, please tell me, I will add the info.

Please no telling me to buy or download a converter software. If you can't write it or can't give me tips on writing the queries, then please don't bother your time.

Thank you everyone!

Info ADDED:
I have these basic tables, some might be added as needed.
Student -- List the detailed info about a student, like Name, address, gender, etc.
Major/Minor -- Name, Code (primary key), Degree.
Section -- ID (primary key), Year, Semester
Department -- Code (primary key), Name (Alternate key), Office No, Phone, College.
Course -- Disc, Num as primary key, Level, Hours.

Thanks to those who have given me a thoughtful answer.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-12-07 : 05:50:11
quote:
Originally posted by sunflower2005

No more question since it became all irrelevant.




I was surprised that this thread shows I answered to your question in active topic. Now I realised you not only changed questions but the tiltle as well

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -