Solved

variable fields in procedure output

Posted on 2011-03-02
3
575 Views
Last Modified: 2012-05-11
Hi all!
I use firebird 2.5.
It's possible make variable the number of fields in output procedure?
I would need to return a set of fields, but depending on what the user asked (depends on a parameter input), I might return 1 or 100. One solution is to declare the 100 fields in output, but I wanted to know if there are other methods
thanks!
0
Comment
Question by:ExDev001
3 Comments
 
LVL 25

Accepted Solution

by:
reb73 earned 250 total points
ID: 35016352
Can you not use a single output column with a delimited list (eg CSV)?
0
 
LVL 19

Assisted Solution

by:NickUpson
NickUpson earned 250 total points
ID: 35016421
the answer to your actual question is no, there is no way to have a procedure that returns a variable number of parameters

however, as mentioned, concatinating them together into one (possible CSV) parameter is perfectly possible, just a bit tedious in the code as you will need the following

if (var not null) then
  output = output || ',' || var

for all 100 vars
0
 

Author Comment

by:ExDev001
ID: 35027073
thanks! I will try this!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Move SQL 2005 Express to Server 2012R2 19 125
Display multiple images in report 12 116
Write Caching in the Cloud for VFP9 16 114
Question about consuming GB from Comcast 5 53
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Creating and Managing Databases with phpMyAdmin in cPanel.
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…

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now