Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 23rd, 2004, 04:51 AM
pabloj's Avatar
pabloj pabloj is online now
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,906 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 6 h 57 m
Reputation Power: 279
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

Reply With Quote
  #2  
Old December 8th, 2004, 08:29 AM
mariuz's Avatar
mariuz mariuz is offline
Bug Hunter
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Transylvania (Romania)
Posts: 274 mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 20 h 12 m 34 sec
Reputation Power: 9
Lightbulb

From my first look it seems to be a bug in isql so you should test it with api instead (c++, delphi ..etc)
Quote:
Firebird and Interbase do support the storage of arrays of values in a single column or a single row. This feature is not widely available at the Dynamic SQL interface level, and best require some C-API programming to be used. IBPP allows you to read and write those array columns easily.


http://www.ibpp.org/doc/pg-arrays.php
__________________
My home page: http://www.firebirdsql.org and work place :http://www.reea.net

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Array datatype


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT