Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012

    Unanswered: Dynamically Spool data within PL/SQL Block

    I have a requirement as follows.

    I have a master table A that has 10+ columns along with data and a configuration table B that has only 2 columns i.e table name and column name. For ex:-

    Table A:-

    C1 C2 C3 C4 C5 C6
    -- -- -- -- -- -----
    1 2 3 4 3 6
    4 5 6 5 5 5

    Table B:-

    Table_Name Column_Name
    --------- ----------
    A C1
    A C2
    A C3

    Now I need to write a sql script that should take the table A Columns defined in Table B and then based on the columns it should spool the columns output from Table A.

    For above ex:- I need to spool the C1,C2,C3 columns data from Table A in to some Unix path using SQL SCRIPT.

    Request someone to provide suggestions or script if you have some idea

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts