|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Array datatype
Hi, I'm doing some experiments with array datatypes in Firebird 1.5.
I created a domain: Code:
CREATE DOMAIN POINT FLOAT [1:2] and a table Code:
CREATE TABLE ZIP_CODES (STATE_FIPS_CODE CHAR(2), ZIP_CODE CHAR(5) NOT NULL, STATE_ABBREVIATION CHAR(2), ZIP_CODE_NAME VARCHAR(50), ZIP_LOC POINT, POPULATION_1990 INTEGER, ALLOCATION_FACTOR FLOAT, PRIMARY KEY (ZIP_CODE)) Now I have troubles in using this table, this is what I'm doing: Code:
SQL> insert into zip_codes values ('wp', '12345', 'wp', 'pippo', '12:3', 123456,
23.5);
I'm trying to insert a POINT of coordinates x=12, y=3 Code:
SQL> select * from zip_codes;
STATE_FIPS_CODE ZIP_CODE STATE_ABBREVIATION ZIP_CODE_NAME
ZIP_LOC POPULATION_1990 ALLOCATION_FACTOR
=============== ======== ================== ====================================
============== ================= =============== =================
wp 12345 wp pippo
95:0 123456 23.500000
But I seem to get back x=95, y=0! What am I doing wrong? Also, I don't seem to find the syntax to retrieve just one value (example, only x coordinate). Thanks in advance for your help
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
|
#2
|
||||
|
||||
|
From my first look it seems to be a bug in isql so you should test it with api instead (c++, delphi ..etc)
Quote:
http://www.ibpp.org/doc/pg-arrays.php |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Array datatype |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|