|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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/ |
|
#3
|
||||
|
||||
|
Quote:
There are any plans to make other functionalities available through SQL?
__________________
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) |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > arrays |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|