Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrays in Interbase

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Can anyone give me an example of how to get an array in and out of InterBase table?
 
huh? you mean a record??

or an entire column of records in a variable?

please elaborate, i don't really understand. E-mail: Rob@matas.nl (till Jan 10, from then on it's Deathwish@winning.com)
 
To get an array out:

1) One element

Select Job_title[2] from employee into where Last_name = :lname


2) 3 elements

Select Job_title[2:4] from employee where Last_name = :lname

This will select Job_title[2], [3] and [4]

To RobPouwelse:

Interbase can store multiple data in the same column, but they must be of the same data type.
Take for example a table where one person can have multiple phone numbers. Declaring the Pnone Column as :
create table blabla
(Phones char(20)[3]);


Will make phones a 3 element array

Regards



S. van Els
SAvanEls@cq-link.sr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top