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 March 5th, 2005, 08:10 PM
calvados calvados is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 66 calvados User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 2 h 40 m 23 sec
Reputation Power: 4
arrays

Hello
Did somebody use arrays in firbird and could tell me how to ,manage them. I have create Such a Table:
Code:
CREATE TABLE SETTINGS (
  SETT_ID                        SMALLINT NOT NULL,
  TIMERS                         SMALLINT[1:20],
  SPEEDS                         DECIMAL(7,2)[1:20],
  M_DATA                        DECIMAL(5,2)[1:20]);
 
/* Primary key */

ALTER TABLE SETTINGS ADD CONSTRAINT INTEG_58 PRIMARY KEY (SETT_ID);

and can somebody Tell me how to inset intop such a table values, and how to JOIN ON such a Table on different table for example:
Code:
CREATE TABLE MAIN (
NUMBER BIGINT NOT NULL,
SIDE VARCHAR(10),
STATE SMALLINT,
PROG_ID FOR_PROG_ID,
LENGHT DECIMAL(6,2),
SETT_ID SMALLINT,
QUE_CON BIGINT NOT NULL,
JL_NUM SMALLINT NOT NULL,
PRIMARY KEY (QUE_CON,JL_NUM),
FOREIGN KEY (SETT_ID) REFERENCES SETTINGS (SETT_ID)
ON UPDATE CASCADE
ON DELETE CASCADE
);

br
Calvados

Reply With Quote
  #2  
Old March 15th, 2005, 08:32 AM
IvanP IvanP is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 12 IvanP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 7 m 37 sec
Reputation Power: 0
The *only* operation on arrays supported in sql (and in SP/triggers)
is retrieving individual value, e.g.

SELECT col[30]
FROM tab
WHERE col[1]=1000;

All other functionality is accessible via specialized API *only*.

Internally, arrays are just specialized blobs. So if you use blobs
instead of arrays you will loose the ability to directly retrieve
single values in sql, but you will get better support from other
tools and libraries.

Ivan
http://www.volny.cz/iprenosil/interbase/

Reply With Quote
  #3  
Old March 15th, 2005, 09:05 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,925 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 20 h 9 m 23 sec
Reputation Power: 279
Quote:
All other functionality is accessible via specialized API *only*

There are any plans to make other functionalities available through SQL?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > arrays


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 5 hosted by Hostway
Stay green...Green IT