Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 57657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:43:32+00:00 2026-05-10T17:43:32+00:00

my goal is to write a stored proc that can collect all field values

  • 0

my goal is to write a stored proc that can collect all field values from multiple rows into one single output variable (maybe varchar(some_length)). It may seem strange solution but i’ve quite positive its the only one i can use at that situation im in. I have not used Firebird before and stored procs look way different than in other well-known db systems. My Firebird is 1.5 and dialect 3 (not sure what it means). So maybe someone could help me with a algorithm example.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:43:32+00:00Added an answer on May 10, 2026 at 5:43 pm

    The following procedure does what you describe:

    SET TERM !!; CREATE PROCEDURE concat_names   RETURNS (concat VARCHAR(2000)) AS DECLARE VARIABLE name VARCHAR(100); BEGIN   concat = '';   FOR SELECT first_name || ' ' || last_name FROM employee INTO :name   DO BEGIN     concat = concat || name || ', ';   END END!! SET TERM ;!! EXECUTE PROCEDURE concat_names; 

    But I question the wisdom of this solution. How do you know the VARCHAR is long enough for all the rows in your desired dataset?

    It’s far easier and safer to run a query to return the result to an application row by row. Every application programming language has methods to concatenate strings, but more importantly they have more flexible methods to manage the growth of data.

    By the way, ‘dialect’ in Firebird and InterBase refers to a compatibility mode that was introduced so that applications developed for InterBase 5.x can work with later versions of InterBase and Firebird. That was almost ten years ago, and AFAIK there’s no need today to use anything lower than dialect 3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The goal: To create a .NET dll i can reference from inside SQL Server
I have some images that I loaded from a remote source stored in Bitmap
My goal is to maintain a web file server separately from my main ASP.NET
My goal is to recognize simple gestures from accelerometers mounted on a sun spot.
My goal is to integrate testing into my development environment (as post-build step). I
I'm trying to write a PowerShell script that will do the following: Executes a
My goal is to write a SQL Server script (2008 R2 if it matters)
My goal is to be able to write this in XAML: <Grid> <Rectangle Fill=AliceBlue
I'm trying to write a stored procedure [SQL 2008] with a dynamic, auto incrementing
I am trying to write a complicated stored procedure for the first time. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.