Record type.  Display the entire register with DBMS_output.putline

Hello. I have the following code, I've played with to better understand the Collections. I have a 'how' question. Is there a way to dbms_output.putline a complete file or I have to name each column as I began to do in the code below?

If there is no single statement to display a record, is it a good way to dynamically loop through the registration and use of dbms_output.putline for each output column without having to name each column explicitly?

Thanks much for any help.
DECLARE
pc_info_rec performance_clusters%rowtype;

CURSOR C1 IS 
     SELECT * 
     INTO pc_info_rec
     FROM performance_clusters 
     WHERE rownum < 11; 

BEGIN
     OPEN C1;
     LOOP
     FETCH C1 INTO pc_info_rec;
     EXIT WHEN C1%NOTFOUND;

                -- Currently have to name each column in the record, but would prefer a simpler way to output the entire record
          DBMS_OUTPUT.PUT_LINE (pc_info_rec.pc_code||', '||pc_info_rec.zip3);


     END LOOP;
     CLOSE C1;
END; 
/

You can not 'loop' in the columns folder. You must list the columns individually. As I already mentioned, if you need display case in many places, you can create a procedure (you don't need a package as I suggested earlier):

SQL> create or replace
  2    procedure print_dept_rec(
  3                             p_rec dept%rowtype
  4                            )
  5      is
  6      begin
  7          dbms_output.put_line(p_rec.deptno || ', ' || p_rec.dname || ', ' || p_rec.loc);
  8  end;
  9  /

Procedure created.

SQL> set serveroutput on
SQL> DECLARE
  2      v_rec dept%rowtype;
  3      CURSOR C1 IS SELECT  *
  4              FROM  dept;
  5  BEGIN
  6      OPEN C1;
  7      LOOP
  8        FETCH C1 INTO v_rec;
  9        EXIT WHEN C1%NOTFOUND;
 10        print_dept_rec(v_rec);
 11      END LOOP;
 12      CLOSE C1;
 13  END;
 14  /
10, ACCOUNTING, NEW YORK
20, RESEARCH, DALLAS
30, SALES, CHICAGO
40, OPERATIONS, BOSTON

PL/SQL procedure successfully completed.

SQL> 

Obviously, you will need to create a procedure for each record type.

SY.

Tags: Database

Similar Questions

  • Error in passing in the RECORD type in the API

    Gurus,

    Get the following error when I try and change from one type of RECORD in an API. I am in passage correctly?

    Any help is appreciated.

    Thank you
    -Scott



    Here is my error:

    fnd_descr_flex_col_usage_pkg.load_row
    *
    ERROR at line 21:
    ORA-06550: line 21, column 4:
    PLS-00306: wrong number or types of arguments in the call to 'LOAD_ROW '.
    ORA-06550: line 21, column 4:
    PL/SQL: Statement ignored



    Here is my anon block:

    declare
    Who_type RECORD TYPE IS
    (
    created_by NUMBER,
    CREATION_DATE DATE,
    last_updated_by NUMBER,
    last_update_date DATE,
    last_update_login NUMBER
    );
    v_who_type who_type;
    date of v_sysdate;
    Start
    Select sysdate
    in v_sysdate
    Double;
    v_who_type.created_by: = 0;
    v_who_type. CREATION_DATE: = v_sysdate;
    v_who_type.last_updated_by: = 0;
    v_who_type.last_update_date: = v_sysdate;
    v_who_type.last_update_login: = 0;
    fnd_descr_flex_col_usage_pkg.load_row
    (x_application_short_name = > 'SPL',)
    x_descriptive_flexfield_name = > 'HR_LOCATIONS ',.
    x_descriptive_flex_context_cod = > '441',.
    x_application_column_name = > 'ATTRIBUTE5 ',.
    x_who = > v_who_type,
    x_end_user_column_name = > "District."
    x_column_seq_num = > 10,
    x_enabled_flag = > 'Y ',.
    x_required_flag = > 'n',.
    x_security_enabled_flag = > 'n',.
    x_display_flag = > 'Y ',.
    x_display_size = > 50,
    x_maximum_description_len = > 50,
    x_concatenation_description_le = > 25,
    x_flex_value_set_name = > 50 characters,
    x_range_code = > ",
    x_default_type = > ",
    x_default_value = > ",
    x_runtime_property_function = > ",
    x_srw_param = > ",
    x_form_left_prompt = > "District."
    x_form_above_prompt = > "District."
    x_description = > ");

    ...

    sreese wrote:
    Tubby,

    Im not asking for your help with this error. I want to define my own FILE type that mimics the call package so I can spend in my own variables.

    Pretty sure I've described previously, there was a specific question with the answer that you do not understand?

    >

    The problem with this type of recording is that it contains all the 'who' columns that the application requires. When it is called from a package within the schema, the package has no difficulty arising from these data. When you call the package from an anon block, I have to pull my own values.

    You did before declaring a LOCAL record type, then you need to reference to the PACKAGE of type folder, as I showed you... it makes you EF values even as you were in your first post.

    I want to define the RECORD type of the manner in which it has been set to 'fnd_flex_loader_apis.who_type', but using my own variable and passing in the parameter. Make sense?

    Thank you
    Scott

    Hope that helps.

  • Set the width of the text in order to display the entire message

    I put a dynamic text (multiline) on stage with 91.3 width and height 21.9.
    The name of the instance of the text is "txtdirection".

    On the other hand, I have a variable called "mymessage."

    And my code is as follows:

    myMessage = "turn right... » ;
    _root.txtdirection.TextWidth = myMessage.Length;
    _root.txtdirection.text = myMessage;

    But it does not display the entire message...
    And I tried to replace the second line with the following statements, but it still not working...

    _root.txtdirection.length = myMessage.Length;
    _root.txtdirection.TextWidth = myMessage.textWidth;
    _root.txtdirection._width = myMessage._width;
    _root.txtdirection.TextWidth = myMessage._width;

    Is there something wrong?

    If you want your textfield to be 'just' the text of the size, use the textfields autoSize property.

  • How to save important files a files on a dvd before doing a restore of the entire system with factory.so disk I am able to reinstall computer after system restore.

    I need to do a restore of the entire system with disc received from factory.but that I have personal files and folders that I need keep.such as banking, contacts, photos, ect. ect. How do I put them on a dvd a restore then their return after the full system restore

    Hello

    If the system still boot and CD/DVD Burns just put in a DVD-R (write once) or DVD - RW (burn
    several times)-it will encourage - when its ready use Windows Explorer to drag and drop files (and
    their content) on the DVD. When you're ready, click BURN. I would like to make a couple of each DVD for
    Security with redundancy. These will not be encrypted and you can access the files out of them or
    subsequently copy on a hard drive.

    Basically, make sure you know what you want to copy the files and put them in a blank DVD to write.

    ---------------------

    If the system does not start, then you will need to put the drive in another computer or in a
    External enclosure USB so you can copy files to removable media.

    ---------------------

    Burn a CD or DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/b47eb51a-ea6d-4d97-97b0-2d07a59316981033.mspx

    How to burn a CD with Vista
    http://ITsVISTA.com/2006/12/ITsVISTA-Tip-10-how-to-burn-a-CD-with-Vista/

    Burn a CD or DVD in Windows Vista
    http://maximumpcguides.com/Windows-Vista/burn-a-CD-or-DVD-in-Windows-Vista/

    Microsoft video - how to burn CD/DVD
    http://www.YouTube.com/watch?v=0BwF60m05m8

    Excellent Forum for help with programs and CD/DVD problems
    http://Club.cdfreaks.com/

    Burn a CD or DVD in Windows Media Player
    http://windowshelp.Microsoft.com/Windows/en-us/help/30ffa641-B682-4315-8c7e-8a29f383a7131033.mspx
    Burn a CD or DVD in Windows Media Player: frequently asked questions
    http://windowshelp.Microsoft.com/Windows/en-us/help/51a88740-Abda-4144-9176-cec79cca31e81033.mspx

    Burn a CD or DVD in Windows Media Center
    http://windowshelp.Microsoft.com/Windows/en-us/help/9ee6cb78-bd7e-4DE3-A154-82d40c4289e01033.mspx

    Burn a CD or DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/b47eb51a-ea6d-4d97-97b0-2d07a59316981033.mspx
    How to burn an Audio CD - see also related Articles
    http://www.vista4beginners.com/how-to-burn-an-audio-CD
    Burn a CD or DVD using Windows Vista - a video
    http://www.YouTube.com/watch?v=0BwF60m05m8

    Disc burning: frequently asked questions
    http://windowshelp.Microsoft.com/Windows/en-us/help/2fa35b0d-B280-4589-9805-55e753888f5c1033.mspx

    Should which CD or DVD format I use?
    http://windowshelp.Microsoft.com/Windows/en-us/help/2af64e60-60AA-4d79-AB6C-3a5db5806cbe1033.mspx

    Windows Media Player playlist: frequently asked questions
    http://windowshelp.Microsoft.com/Windows/en-us/help/4bf0d986-a1cb-40d2-94de-85dba30a83831033.mspx

    Get the most out of WMP11http://windowshelp.microsoft.com/Windows/en-US/mediaplayer11/default.mspx

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • I inadvertently erased the entire photo with webroot... program a stupid mistake, but a mistake nonetheless.  How to reconnect my backup photos.  I can import them, but I am unable to edit them with photoshop.

    How to reconnect my backup to Photoshop photos.  I inadvertently delete the program whole photo with webroot... permanently.  Help

    I'm having a problem of understanding that you wrote it's describing.

    You wiped out the entire photo with webroot... program what it means.  This means that you wiped out of Photoshop? What is webroot?

    How to reconnect my backup photos?  For this that and why are you concerned about your backup Photos if you program you Photo wiped out, you also destroy your Photos?

    You can then import but cannot change the theme in Photoshop.  What you can import you them with and where do you have to import them and why you can not change what you've imported with Photoshop.

    Provide relevant information to get faster answers

    More information you provide about your situation, the better equipped with other community members will answer. Consider including the following in your question:

    • Product number and the version of Adobe
    • Operating system and version number
    • The full text of all error messages
    • What you were doing when the problem occurred
    • Screenshots of the problem
    • Computer hardware, such as CPU; GPU; amount of RAM; etc.
  • . CBV file type displays the content rather that give download options

    I just changed my Web site hosting provider; old and new providers of Linux services.
    My site is scottishcca.co.uk - a site of chess by correspondence - and I use Win7 and 26.0 Firefox.
    There is a page (members/downloads) where members can download files of games of chess and e-magazines - the page is password protected using htaccess/htpasswd which works well.
    Each e-magazine has 4 download links: pdf, zip and pgn all work fine, but cbv does not - it just displays the contents of the file in the browser page. What needs to happen is that the browser should display a dialog box asking if the file should be opened with ChessBase 11 database software (which is associated with the type of file .cbv on my computer - I checked my default program settings). File .pgn type is also associated with the ChessBase 11 database software and working properly - the dialog box allows me to open or save.
    All the links work correctly when I use Google Chrome.
    I'm puzzled - advice please!
    Iain

    I think I have a solution for this. I went back to my new hosting provider (easyspace) and received this response:
    'Hi Iain,

    I did some research on this for you and have a suggestion for you to try.
    It is possible that Firefox is not to recognize the MIME Type application/cbv, because it is not just a registered IANA MIME Type.
    You could try instead of application/octet-stream, which is a generic MIME Type for non-text files.
    This idea came to me while reading the page at https://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types and this document can give you more of an idea of why this does not work in Firefox.
    Can you try this please and let me know how you go.
    Best regards
    Gerry Munn
    Support services
    I implemented the suggestion of Gerry via .htaccess in my root directory and everything works now (after clearing the cache of Firefox). Maybe you could send Gerry an certificate of ability!

  • How to adapt to the size to display the entire image in the display of the image?

    HI, I use a range of control to display my video images using image display. However, the size is always out of proportion. How can I view the entire image in the size of the screen of box. Essentially, in order to adjust the size for the images?

    You have this option in the indicator of the Image itself. Right-click on the indicator, you will get an option something like "Image Fit with indicator" (sorry I forgot the actual name)

  • White type in the text box with fill with transparency

    This page of color in my INDD document a lot of transparency on this - in the following stacking order:

    1. downstairs are two boxes gradients covering the entire page.

    2. next is a background photo that's an advantage to feathers.

    3. then comes my text box that floats over a part of the photo in the background. The text box is filled with a gradient purple feather. The text box contains 8.5 PT. White type (Helvetica Neue Medium).

    4. a transparent dingbat straddles a corner of the text box.

    Where the white guy is pictured in the background, a color is reflected type. I have not noted on the PDF, but of course, the work of back of the printer, you can see.

    I thought all type except automatically eliminated black?

    I pulled out the file using PDFX-3 (1.3) because my printing does service provider ' t supports the 1.4. I underdstand this version flattens transparency. I scanned "Print Production Guide for transparency" Adobe and learned that the areas of complex transparency can cause unexpected results. Is what happened here?

    When I opened the flattening of transparencies and he asked to highlight objects with 'Text of Raster-Fill and Stroke' or 'Text described', this type area is highlighted. No other boxes on this page type were noted, even where it overlaps the background photo (which has applied feather).

    Several other transparent dingbats (such as duplication of the text box) are also highlighted as 'Raster - Fill and Stroke text'. They are all on the highest layer (type).

    This isn't a disaster - it's still readable - but the details of the publication who are affected, which is important. Maybe next time I won't be as lucky. What would I do different?

    It is possible in the more recent versions of ID to the value of transparency to the object, STROKE, fill and levels of content, and I suspect that you have applied your effects to the object level. I was able to recreate what you see as well by using the gradient feather tool and in the effect controls panel and using the pen it y to the entire object. Oddly enough, once the gradient feather tool has been used I couln can't access options in the effect controls panel or in the menu object.

    In all cases, if you can, select the block of text, open the effect controls panel or object > Effects > menu feather degraded, remove the gradient feather and reapply just the filling.

    If you are not able to do so, copy the text, delete the block of text and create a new and paste back the text, and then select the image and apply the gradient feather to complete using the effect controls panel or the menu object.

  • Desktop - cannot display the entire screen, scroll bar

    Cannot use the scroll up/down or see the entire screen when reading the mail/documents because that office titles show on the left.  What can I do for securities of funds do not appear when I read the emails? They take a part of my screen.

    This could be a matter of adjustment of the monitor.  They are hard to find and difficult to understand, but there should be buttons on your monitor that adjust to what is displayed.   The controls you want to make the display wider or narrower.

  • Object Type display the VM

    I'm trying and question where I created a function:

    function Get-VMMemoryReservation
    {
        [CmdletBinding()]
        param(
            [Parameter(Mandatory=$true,Position=0,ValueFromPipelineByPropertyName=$true)]
            [VMware.VimAutomation.ViCore.Impl.V1.Inventory.VirtualMachineImpl[]]$VM
        )
        
        BEGIN {}
        
        PROCESS
        {
            foreach ($item in $VM)
            {
                $VMResourceConfig = $item | Get-VMResourceConfiguration
                $Hash = [ordered]@{'ComputerName' = $item.Name;
                            'AllLocked' = $item.ExtensionData.Config.MemoryReservationLockedToMax;
                            'ReservationGB' = $VMResourceConfig.MemReservationGB;
                            'ShareLevel' = $VMResourceConfig.MemSharesLevel;
                            'Shares' = $VMResourceConfig.NumMemShares }
                            
                New-Object -TypeName PSObject -Property $Hash
            }
        }
        
        END {}
    }
    

    When to run the function I get the following error:

    Get-VMMemoryReservation : Cannot process argument transformation on parameter 'VM'. Cannot convert the
    "Server1" value of type "VMware.VimAutomation.ViCore.Impl.V1.VM.UniversalVirtualMachineImpl" to type
    "VMware.VimAutomation.ViCore.Impl.V1.Inventory.VirtualMachineImpl[]".
    At line:1 char:32
    + Get-VMMemoryReservation -VM $ctx
    +                                ~~~~
        + CategoryInfo          : InvalidData: (:) [Get-VMMemoryReservation], ParameterBindingArgumentTransformationExc
       eption
        + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-VMMemoryReservation
    

    This function accepts an object of VM VirtualMachineImpl type which, so far, is the object of VM Type. However, in the latest PowerCLI 6.3 Release 1 this type has changed to UniversalVirtualMachineImpl. A few questions: 1. why and in what version did the change of type and 2. is there a better way to accept an object of Type VM while being compatible with Type of VirtualMachineImpl? I have may cmdlets that I created with this type for the input parameters. Thanks for any input you can give.

    Take a look on PowerCLI recommended: correct use of the Strong typing.

    It is what explains what you see I think and also explains why it is happenig.

  • Display the poor® (registered trademark) in the text of the hyperlink

    Normally when it shows a glyph® in PDFs, I prefer to display as exhibitors. Now, I've run into situations where they are part of the display text for hyperlinks to URLS. I have two options:

    1. Display do glyph one Exhibitor, as shown in this screenshotsnip_26may2015.JPG
    2. Display the glyph by exposing that seems worse than indicated above, because the® underscore appears in position of exponent instead of aligned with the rest of the link.

    Does anyone have a solution to this problem?

    Thank you!

    Finally solved it myself!

    1. Created a new style of character for this one character and it inspires my hyperlink default character style. Following changes: the character Options of Style > underline Options > Shift up = 1 pt. underline offset = 1.8 pts; stress weight = 1.25 pts ===>> final result, it is not almost perfectly aligned and functions as a link.
    2. Followed the above procedure but changed the settings as follows: character Options of Style > underline Options > Shift up = 1 pt. Exhibitor; underline offset = pt 5.8; stress weight = 1.25 pt ===>> end result® in the exhibitor with the underlined passage position almost perfectly aligned with the rest of the link.
  • Unable to display the entire contents of the CF query return the result on my Web see page

    Hello

    I'm trying to extract data from a table (project_reports), which is to have a column of type CLOB (details) inside data.

    Details this column takes a huge amount of data in it.

    And I use the code to retrieve and display the data on my CF Web page below.


    < cfquery name = "getReport" datasource = "myDS" >
    Select details in project_reports where project = 54516
    < / cfquery >

    < cfoutput query = "getReport" > #getReport.details # < / cfoutput >


    ColdFusion is able to process and display a quantity limited data, but not the full data.
    I want to retrieve and display all of the data using ColdFusion.
    Can someone help me on this? Thanks in advance.

    Kind regards
    Jacques.

    Mamidela wrote:

    ColdFusion is able to treat & display a quantity limited data, but not the full data.

    Check the data source settings in the CF administrator. Make sure that the CLOB parameter (enable Long Text Retrieval) is checked.  When this box is _not_ checked, CF retrieves only the 64000 bytes.

  • How to create a type of record and a pl/sql table of this record type in the database

    Hello
    I want to create a record type, and then I want to create a PL/SQL table in the oracle 9i database.
    I did block PL/SQL.
    But when I'm doing it in the database it throws me a few errors.
    Could you please tell me how can I do?

    Concerning

    user576726 wrote:
    Hello
    I want to create a record type, and then I want to create a PL/SQL table in the oracle 9i database.
    I did block PL/SQL.
    But when I'm doing it in the database it throws me a few errors.
    Could you please tell me how can I do?

    Concerning

    RECORD type is only supported in PL/SQL for SQL, you must use the OBJECT type.

  • How to pass the value of the variable record type in the procedure

    Hai All

    My Question is

    I have a table named Emp and the structure

    ID Varchar2 (25)

    Name varchar2 (25)

    Number of salary


    And now, I created a folder named Rec_Emp

    Like this

    Type Rec_emp is made
    (Rec_Id varchar2 (25),)
    rec_name varchar2 (25).
    Number of Rec_salary);
    rec_emp emp_record;


    I created a SQL type

    Now how to pass the value type in the procedure


    Thanks and greetings
    SrikkanthM

    You are looking for something like this

    create table my_emp (id integer, name varchar2(100), sal number)
    /
    create type my_emp_obj as object(id integer, name varchar2(100), sal number)
    /
    create or replace procedure insert_into_my_emp(pEmp_Obj in my_emp_obj)
    as
    begin
      insert into my_emp (id, name, sal) values(pEmp_obj.id, pEmp_Obj.name, pEmp_obj.sal);
    end;
    /
    begin
      insert_into_my_emp(my_emp_obj(1,'karthick',1000));
    end;
    /
    select * from my_emp
    /
    
  • CFdocument not convert IMG with CSS overflow hidden - displays the entire image

    Title text here

    series - amps.gif is strong 800px of 16px wide. He moves to his good display with css background-position: 0 - 50px; the overflow in the H4 (24 PX height) tag is hidden with css overflow: hidden. works great as html, but the PDF of CFdocument output image high hidden full 800px, not positioned, or overflow in H4. any ideas?

    Unfortunately ColdFusion only supports CSS limited during conversion to PDF format.

    The documentation for the cfDocument tag lists the supported CSS styles.

    See you soon

    Eddie

Maybe you are looking for