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.
Author |
Topic |
egipto
Starting Member
1 Post |
Posted - 2013-01-09 : 10:59:56
|
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 municipalityname, character varying (32), Name of municipalitygeom, geometry (polygon, 32,161), geometry of the municipalityEach student has a unique record in the student table that has four columns:code, character(2), student identifier codename, character varying (32), Name of studentlastname, character varying (64), Last name of studentmunicipality, character varying (32), Student municipality nameEach 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 codegeom, 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
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2013-01-09 : 11:25:01
|
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. |
|
|
sportsguy
Starting Member
39 Posts |
Posted - 2013-01-09 : 17:54:03
|
who gets the grade if we do your homework?MS Access 20 years, SQL hack |
|
|
|
|
|
|
|