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

  • Home
  • SEARCH
  • 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 6606285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:22:47+00:00 2026-05-25T19:22:47+00:00

I have the following row in the table TEMP_ID HTML_LABEL HTML_NAME OPTIONS_TYPE OPTION_VALUES HTML_CODE

  • 0

I have the following row in the table

 TEMP_ID    HTML_LABEL HTML_NAME     OPTIONS_TYPE OPTION_VALUES                   HTML_CODE
----------------------------------------------------------------------------------------------
    2       RULE_NO :  RULE_NO_7_32  D            SELECT DRV_COLUMN FROM FRD_DATA <reconTags:renderSelect></reconTags:renderSelect> 

I want an oracle sql query that gives the output like this

  TEMP_ID HTML_LABEL HTML_NAME      OPTIONS_TYPE OPTION_VALUES HTML_CODE
   ----------------------------------------------------------------------------                                                                     
    2      RULE_NO :  RULE_NO_7_32  D            1,2,3,4       <reconTags:renderSelect></reconTags:renderSelect>   

I want the result of the query stored in the option_values field to be displayed as the value of the option_values field. (Possibly comma-separated concatenated values, where the query would return multiple rows.)

  • 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. Editorial Team
    Editorial Team
    2026-05-25T19:22:47+00:00Added an answer on May 25, 2026 at 7:22 pm

    Create a function that takes your sql column as a parameter, and loops through each record building up a string of values then return the result, the usage would be SELECT col1, your_function(col2) from your table

    Here’s some pointers on dynamic SQL: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/dynamic.htm

    I guess it will be something like this:

    CREATE OR REPLACE FUNCTION sql_to_csv (p_select IN VARCHAR2)
       RETURN VARCHAR
    AS
      v_out             VARCHAR2 (4000);
      TYPE RefCurTyp    IS REF CURSOR;
      v_cursor          RefCurTyp;
      a_record          DUAL%ROWTYPE;
    
    BEGIN
        OPEN v_cursor FOR p_select;
        -- Fetch rows from result set one at a time:
        LOOP
        FETCH v_cursor INTO a_record;        
            EXIT WHEN v_cursor%NOTFOUND;
            v_out:=v_out || ',' || a_record.dummy;
        END LOOP;
    
        -- Close cursor:
        CLOSE v_cursor;
    
       RETURN (v_out);
    END;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have the following row in my table table rows id 63
I have the following jQuery script which hides/expands row in table: it was inspired
i have the following: mysql> show create table rc_profile_table \G; *************************** 1. row ***************************
I have following situation: I have loged user, standard authentication with DB table $authAdapter
I have following situation. A main table and many other tables linked together with
I have following table structure: Table: Plant PlantID: Primary Key PlantName: String Table: Party
I have a table with something like the following: ID Name Color ------------ 1
If I have table Test with two columns num1 and num2 and the following
I have the following problem: I need to insert N rows after row X.
I have the following program that generates a multiplication table. A formatting problem arises

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.