Solved

Interbase 5.5 "Passing an Array into a Stored Procedure"

Posted on 2003-11-18
2
2,702 Views
Last Modified: 2013-12-09
I need to be able to pass in multiple values into a single parameter.

Example

Select EmployeeName
from employee
Where EmployeeID in (:ParameterValues)


Output would be multiple EmployeeNames


I can't seem to define an Input Paramter as an Array and I can't seem to declare a variable as an Array.

The current syntax for the Input Param is:
EmployeeID Integer[10]

The current syntax for the variable declaration is:
Delcare Variable EmpID Integer[10];


I have tried several variations of the above with no luck.

I am using Interbase Version 5.6 on a windows 2000 platform.


Thanks,
matchbx27
0
Comment
Question by:matchbx27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
chart11610 earned 500 total points
ID: 9772900
Interbase stored procedures do not support the passing of arrays to the best of my knowledge.  All variable are passed by Value (copy) and must remain language independent.   The SQL gurus that I have worked with over the years try to avoid arrays.  

One possible solution is to store the list of employees in a staging table, and then use that table within the SQL of the stored procedure.
0
 

Author Comment

by:matchbx27
ID: 9772957
A little backgound...

I am currently creating more reports in an Interbase database that came with an application my company purchased.

The Solution you mentioned is the way it is currently being handled.  I don't have alot of confidence in some the work I have seen from the company and their Product.  I just wanted to see if something better, faster was available.


Thanks,
matchbx27
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question