User's Guide and Reference

ST_Y

ST_Y takes a point and returns its Y coordinate.

Syntax

db2gse.ST_Y(p db2gse.ST_Point)

Return type

Double

Examples

The following CREATE TABLE statement creates the Y_TEST table, which has two columns: the GID column, which uniquely identifies the row, and the PT1 point column.

CREATE TABLE Y_TEST (gid integer, pt1 db2gse.ST_Point)

The INSERT statements insert two rows. One is a point without a Z coordinate or a measure. The other column has both a Z coordinate and a measure.

INSERT INTO Y_TEST VALUES(1,
db2gse.ST_PointFromText('point (10.02 20.01)', db2gse.coordref()..srid(0)))
 
INSERT INTO Y_TEST VALUES(2,
db2gse.ST_PointFromText('point  zm (10.02 20.01 5.0 7.0)', db2gse.coordref()..srid(0))) 

The following SELECT statement and the corresponding result set lists the GID column and the Double Y coordinate of the points.

SELECT gid, db2gse.ST_Y(pt1) "The Y coordinate" FROM Y_TEST
 
GID         The Y coordinate
----------- ------------------------
          1   +2.00100000000000E+001
          2   +2.00100000000000E+001
 
  2 record(s) selected. 


[ Top of Page | Previous Page | Next Page ]