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
 help with this assignment
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

egipto
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.

task:
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.

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3383 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

sportsguy
Starting Member

USA
38 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  
 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