Is it possible to use the record type or a PL/SQL table in the Select statement

Hi all

My requirement is that.
I want to write a query and write a function, function, I want to return multiple columns at the same time in a Select statement.
I select the return values in the Select no statement in a PL/SQL block.
Is it possible to use the PL/SQL Table or Variable of Type record, or any other method in the statement Select?

Please help me understand the solution.


Kind regards

830960 wrote:
do we like it?

In general, Yes, if the function is a function table, you can do something like:

select  t.col1,
        t.col2,
        f.col1,
        f.col2,
        f.col3
  from  table_name t,
           table(some_table_function(param1,...paramN)) f
/

SY.

Tags: Database

Similar Questions

  • How to pass parameter in the function using the select statement?

    Hello

    I had a problem. I can't pass as parameter to the function by using the select statement. But it can pass as a parameter using the "code". How can I solve this problem?

    For example,.
    Select * from table (SplitFunction ('HS750020, HS750021')) < < < this work.

    but

    Select * from table (SplitFunction (select LOT_NO in the TRACER_SEARCH_SCHEDULE where JOB_ID = '36')) < < < do not work.

    Thank you for trying to help him. Thank you.

    Select * from table (SplitFunction (select LOT_NO in the TRACER_SEARCH_SCHEDULE where JOB_ID = '36'))< do="" not="">

    Try like this

    select * from table(select splitfunction(lot_no) from tracer_search_schedule where job_id='36')
    

    Just make sure that your subquery returns only 1 row.

  • How to display the data type long using the select statement

    Hai All

    I have to select the text of a view. But the text is declared as long and I need to see full view

    When I use this

    Select the text in all_views where view_name = "DAILY_ATTEND_VIEW";

    I have got only half of a select statement

    Concerning

    Srikkanth.M

    Hello

    SQL> SET LONG 100000
    SQL> select text from user_views
      2   where view_name='MVIEW';
    
    TEXT
    ------------------------------------------
    select e.empno,e.deptno,d.dname
    from emp@sdblink e,dept@sdblink d
    where e.deptno=d.deptno
    

    But it is limited to sql alone. If you use the double click TOAD on the text column in the grid will show you the entire SQL views.
    Unfortunately, there is limitation to consider,
    The largest value that you return from the function would be 32 k (RETURN VARCHAR2), both.

    Twinkle

  • How to use the select statement in loop for

    Hi all

    My question is can I use a select statement in for loop like as follows.

    for the key in the selection of one_table key.

    When I use this am getting an error as found select invalid I ID

    How to select a statement use in loop for

    Please suggest me.

    Thank you
    Sree

    Hello

    You can use code below

    For key in (select button from table_a)
    loop
    If key.key = 1 then
    -insert statement
    on the other
    -Select statement
    end loop;

    Thank you
    Naveen.

  • Insert a variable + string using the select statement with cfquery

    I'm doing an insertion by a select statement where the insert for one of the fields should be a combination of a vaule comes from the selection and concatenated with a string of text. Is this possible and if what the correct syntax so? Here is an example of what I'm trying, but does not.

    < name cfquery = "createnote" datasource = "#application.datasource #" >
    INSERT INTO gtbl_notes (notedate, strCustomerID, notetype, note, notecreatedby)
    SELECT "#currentdate #", strCustomerID, "miscellaneous", "#gtbl_people.email # DELETED because of HARD BOUNCE ', 'Bounce Routine.
    OF gtbl_people, gtbl_bounces
    WHERE gtbl_bounces.email = gtbl_people.email AND gtbl_bounces.subscriber = 1 AND gtbl_bounces.status = 2

    < / cfquery >

    Any input would be greatly appreciated.

    Concatonation is possible with most, if not all of the databases.  The syntax is a specific software and you do not your specify.

  • Update using the Select statement

    I have a requirement of the main table was updated. Here is an example
    Example (a) works in PL SQL but does not work in Forms6i.
    Example (b) works in PLSQL so in Forms 6i.

    I need work example (a) in forms 6i. What is the solution


    one)
    UPDATE fman_validation_master SET TOT_HRS = TOT_HRS +.
    (SELECT SUM (FAV. H TOT_HRS)
    OF FMAN_ACTQTY_VALIDATION FAV
    WHERE fman_validation_master. = PROJECT: CONTROL. PROJECT AND
    fman_validation_master. PROJECT = fav. PROJECT AND
    fman_validation_master. ACTIVITY_CODE = FAV. ACTIVITY_CODE
    FAV GROUP. PROJECT, FAV. ACTIVITY_CODE
    ) where of the = project: CONTROL. PROJECT;


    (b)
    UPDATE fman_validation_master SET TOT_HRS =
    (SELECT SUM (FAV. H TOT_HRS)
    OF FMAN_ACTQTY_VALIDATION FAV
    WHERE fman_validation_master. = PROJECT: CONTROL. PROJECT AND
    fman_validation_master. PROJECT = fav. PROJECT AND
    fman_validation_master. ACTIVITY_CODE = FAV. ACTIVITY_CODE
    FAV GROUP. PROJECT, FAV. ACTIVITY_CODE
    ) where of the = project: CONTROL. PROJECT;

    Hello

    According to Oracle 8.1, you can say:

    UPDATE  table_x
    SET     column_a = exp;
    

    where exp is any expression, or

    UPDATE  table_x
    SET     column_a = (ssq);
    

    where ssq is now called a scalar subquery. Oracle 8.1 sometimes allowed scalar subqueries in places where the documentation did not say that they were allowed. The first statement is an example, when you use

    tot_hrs + (ssq)
    

    as an expression. It works in SQL * Plus and also in PL/SQL, but (apparently) not in the forms.

    Re-write your UPDATE statement so that the scalar subquery appears in itself to the right of the sign =, like this:

    UPDATE     fman_validation_master
    SET     tot_hrs =
         (
         SELECT     fman_validation_master.tot_hrs + SUM (fav.tot_hrs)
         FROM     fman_actqty_validation     fav
         WHERE     fman_validation_master.project          = fav.project
           AND     fman_validation_master.activity_code     = fav.activity_code
         )
    WHERE     project = :control.project;
    

    In other words, just move the original fman_validation_master.tot_hrs (to which you add the SUM) of the main request in the subquery.

  • Creating a table using the Select statement of the physical layer

    Hello

    I use 10G, and I have the sub query in my physical layer. I chose the type of Table as Select and gave the SQL below. When I say the number of lines of update updates lines 93, that is correct, but does not show me the columns, or when I say display data, it does not show me the data, please see if I'm doing something worng. Thanks for your time and your help.

    Select (select program_id, project, actvty_id, commitment_date, row_number() over (partition by order project by commitment_date desc) as rnk project, actvty_id, program_id, commitment_date)
    of project_detail) a
    where rnk = 1

    Yes, create columns individually and click view data, you'll be able to get data

  • Is it possible to use the Web ADF service proxy client in ADF mobile app

    Hello

    Recently, I started to develop mobile ADF applications on the device. Is it possible to use the client for proxy to service Web ADF with mobile application on the device? I read it in a document that, mobile ADF will not support "* WebService Java Proxy" * and supports only "* ADF webservice datacontrol * '"»

    If the customer service Web ADF proxy is not supported in mobile ADF, so how can I integrate ADF with EBS?

    REDA

    Where did you read that you can not use complex types with the Web Service data control? What version is that for.
    You should be able to use the Web Service data with complex types control.
    You can try and let us know if you encounter any specific problems?

  • How to use the Type of Oracle Table values in the Select statement.

    Hello

    I get the initial set of values in the Table of Type Records of the Oracle and want to use the list of values in the Select statement.

    For example, try something like the following:

    TYPE t_record () IS RENDERING
    ID TABLEA.ID%type,
    NO TABLEA.NO%type

    );
    v_record t_record;
    T_table TYPE IS the v_record TABLE % TYPE;
    v_table t_table;

    -Code to fill the values of v_table here.

    SELECT ID, NO, COLLECT in BULK IN < some other table variabes here > FROM TABLEA
    WHERE ID IN (i) v_table USER.USER;

    I want to know how to use the Type of Oracle Table values in the Select statement.

    Something like this:

    create or replace type t_record as  object (
    id number,
    no number
    )
    /
    
    CREATE or replace type t_table AS TABLE OF t_record;
    /
    
    set serveroutput on
    declare
    
      v_table t_table := t_table();
      v_t1 t_table := t_table();
    
    begin
    
      v_table.extend(1);
      v_table(1).ID := 1;
      v_table(1).No := 10;
    
      v_table.extend(1);
      v_table(2).ID := 2;
      v_table(2).ID := 20;
    
      SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
      from TableA
      FROM TABLEA
      WHERE ID IN (select t.ID from table(v_Table) t);
    
      for i in 1..v_t1.count loop
        dbms_output.put_line(v_t1(i).ID);
        dbms_output.put_line(v_t1(i).No);
      end loop;
    end;
    /
    

    No test!

    P;

    Published by: bluefrog on March 5, 2010 17:08

  • Is it possible to use the title of column sorting along w / a union?

    When I had a simple select statement, I might get the kind work with either one "in order to" in the select statement or with sorting of the column header.
    Then, I changed the select a Union. I can get the folders to sort if I specify the column number in the order (for example, the order of 9, 7, 1), but the position column sorts do not work. The records look like they are sorted on page 1, but are not sorted on pages 2-5.
    Is it possible to use the title of column sorting and a Union?

    Thank you!
    Laura

    Laura:

    You can re-write the query in the form

    Select col1, col2, col3...
    Of
    (select col1, col2, col3 from T1
    Union
    Select col1, col2, col3 from T2
    )

    CITY

  • Is there a way to the target url by using the power of Attorney (I want to say is possible to use the proxy to target a site something like that.)?

    Is there a way to the target url by using the power of Attorney (I want to say is possible to use the proxy to target a site something like that.)?

    By default, you can not in Firefox.

    But you can use an add-on like FoxyProxy Standard, I think he understands the functionality you need.

  • Is it possible to use the Remote app with the Apple TV connected via ethernet and iPhone via WiFi?

    Is it possible to use the Remote app with the Apple TV connected via ethernet and iPhone via WiFi? When I try this Apple TV does not appear in the list of devices on my iPhone.

    Yes, I'm doing exactly this with the same put in place.

    If the problem persists the next relative to the following articles might help you.

    Troubleshooting home sharing

  • Is it possible to use the current version of Safari on Windows 10?

    Is it possible to use the current version of Safari on Windows 10?

    N ° Safari has been developed and supported for Windows in 2012.  If you don't want to use Edge or IE, I recommend Firefox.

  • Is it possible to use the 32-bit firefox with the plugin java 64 bit?

    Is it possible to use the 32-bit firefox with the plugin java 64 bit?
    I would use 32-bit firefox and I already install the plugin java 64 bit.
    Is this a good choice is not to install the 32-bit java plugin?
    These will cause problems?

    Thanks in advance.
    Kind regards
    Sean

    Nope - you need the 32-bit Java to go with the 32-bit Firefox, if you want that Java run

  • Is it possible to use the port replicator with the Satellite Pro series?

    Hello
    Is it possible to use the port replicator (Docking Stations) for Tecra series laptop with the Satellite Pro series?

    Hello

    No, as far as I know it of not possible to use a port on laptops Satellite Pro Replicator.
    All laptops that support the Port Replicator has a port extension at the bottom of the unit.
    To my knowledge, the Satellite Pro series don t have this port.
    For now only the Tecra and some units Protégé(ie: S100) supports this feature.

Maybe you are looking for

  • New app now hangs after upgrade to iOS 9.3.2

    I could use my app News earlier today and in recent days since the iPad Pro update to iOS 9.3.2.  However, all of a sudden my News app crashes and will not open.  I press on the icon and it opens and says he's looking for new stories and then crashes

  • Hanging laptop loading splash screen

    Hello I have a laptop HP 2000-329WM who always stuck at the loading screen when I turn on my laptop. Can you help me please? Before I haved this problem: I have download a driver AMD AMD.com. Since the problem: Safe mode does not work.All the Hard Dr

  • "Wireless network connector of your WLAN card stopped working.

    I get this message when I turn on my computer: "wireless network connector of your WLAN card stopped working.  I called DELL when I got this message before, thinking that it was the wireless network card does not not, but now I think maybe that the m

  • Error details: printer Says Code 80070490 is unable to update... works fine

    Using Windows 7 Home premium and not planning on upgrading constantly receive error code 80070490 after installation failed, that everything works so, what gives? Hewlett-Packard - other hardware, printer - print Null - HP Officejet Pro 8620 Download

  • HTTP Live Streaming Audio MP3 in the Simulator 10.1

    Hello I'm working on an online radio application and I am very disappointed to see that the BB 10.1Simulator (10.1.0.1483) does not support the HTTP live streaming of multimedia files (MP3) M3U. I get the following message in the log of the device: M