SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 No more question here!
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sunflower2005
Petulant

5 Posts

Posted - 12/05/2007 :  14:57:14  Show Profile  Visit sunflower2005's Homepage  Reply with Quote
No more question since it became all irrelevant.


Edited by - sunflower2005 on 12/07/2007 05:03:35

SwePeso
Patron Saint of Lost Yaks

Sweden
30114 Posts

Posted - 12/05/2007 :  15:03:27  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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

United Kingdom
3608 Posts

Posted - 12/06/2007 :  03:52:22  Show Profile  Reply with Quote
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

India
22744 Posts

Posted - 12/06/2007 :  04:48:39  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
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

United Kingdom
3608 Posts

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

madhivanan
Premature Yak Congratulator

India
22744 Posts

Posted - 12/06/2007 :  05:53:34  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
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

Sweden
30114 Posts

Posted - 12/06/2007 :  11:23:19  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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"

Edited by - SwePeso on 12/06/2007 11:23:35
Go to Top of Page

sunflower2005
Petulant

5 Posts

Posted - 12/07/2007 :  04:35:10  Show Profile  Visit sunflower2005's Homepage  Reply with Quote
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

United Kingdom
3608 Posts

Posted - 12/07/2007 :  04:51:09  Show Profile  Reply with Quote
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

United Kingdom
3608 Posts

Posted - 12/07/2007 :  04:51:45  Show Profile  Reply with Quote
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

United Kingdom
1208 Posts

Posted - 12/07/2007 :  05:01:51  Show Profile  Reply with Quote
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)

Singapore
17586 Posts

Posted - 12/07/2007 :  05:11:34  Show Profile  Reply with Quote
CONGRATULATION !


KH
Time is always against us

Go to Top of Page

pootle_flump
Flowing Fount of Yak Knowledge

United Kingdom
1064 Posts

Posted - 12/07/2007 :  05:45:59  Show Profile  Reply with Quote
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

India
22744 Posts

Posted - 12/07/2007 :  05:50:11  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000