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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 help with this assignment
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 01/09/2013 :  10:59:56  Show Profile  Reply with Quote
Data provided are:
We have a schema named Student Data that contains 3 tables: Municipality, student and student location The tables are described as follows:

There is a table with 3 columns named Municipality:

id, integer, identifier number of the municipality
name, character varying (32), Name of municipality
geom, geometry (polygon, 32,161), geometry of the municipality

Each student has a unique record in the student table that has four columns:

code, character(2), student identifier code
name, character varying (32), Name of student
lastname, character varying (64), Last name of student
municipality, character varying (32), Student municipality name

Each student has located his position and entered the student identifier code in the student_ location table, which has two columns:

code, character (2), student identifier code
geom, geometry (point, 32,161), student point location

Students table has filled all columns except for the municipality column whose value is null.

1 - Write an instruction in structured query language (SQL) to update the name field of the municipality in the students table, where the point the student is placed within the polygon corresponding to the municipality that contains the point placed.

Flowing Fount of Yak Knowledge

United Kingdom
3385 Posts

Posted - 01/09/2013 :  11:25:01  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
What have you tried?
Do you know how to handle geometry datatypes? - have a look at STIntersects

Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Starting Member

39 Posts

Posted - 01/09/2013 :  17:54:03  Show Profile  Reply with Quote
who gets the grade if we do your homework?

MS Access 20 years, SQL hack
Go to Top of Page
  Previous Topic Topic Next 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.14 seconds. Powered By: Snitz Forums 2000