example of collect

Mr President

with sub query, I get the result I wanted

select brcode,acno,con

from
(
select brcode,acno,collect(cardno) con from
(
select brcode,rpad(brprdcd,8,' ')||'00000000'||lpad(braccno,8,'0')||'00000000' acno,cardno from atm_master
where status=1
)group by brcode,acno
)

However the out put is as

SYSTPwmL3beXgS2mYcqRCJeQJcA==('6075065100029669')

How can I avoid 'SYSTPwmL3beXgS2mYcqRCJeQJcA is'

As doc says, COLLECT returns a nested table (collection) that must be cast to a user-defined collection type to be handled.

The doc has also to give one simple example, here's another:

SQL> create or replace type varchar2_list as table of varchar2(4000);
  2  /

Type created.

SQL> select e.deptno
  2       , cast(collect(e.ename) as varchar2_list) as emp_list
  3  from scott.emp e
  4  group by e.deptno ;

    DEPTNO EMP_LIST
---------- --------------------------------------------------------------------------------
        10 VARCHAR2_LIST('CLARK', 'MILLER', 'KING')
        20 VARCHAR2_LIST('SMITH', 'FORD', 'ADAMS', 'SCOTT', 'JONES')
        30 VARCHAR2_LIST('ALLEN', 'JAMES', 'TURNER', 'BLAKE', 'MARTIN', 'WARD')

So far, you have no problem with that?

Tags: Database

Similar Questions

  • Example of collections... Performance problem

    Can you please help me why him below runs forever, it's because the table missing clues, I guess that is not the question as the emp & dept tables have 14 and 4 files only.

    DECLARE
    TYPE numlist IS TABLE OF emp.empno%type index by pls_integer;
    enums numlist;
    TYPE deptlist IS TABLE OF dep.deptno%TYPE INDEX BY pls_integer;
    deptnums deptlist;
    cursor c1 is select distinct deptno from dep;
    BEGIN
    dbms_output.put_line('Here 1');
    OPEN c1;
    loop
    fetch c1 bulk collect into deptnums;
    END loop;
    CLOSE c1;
    dbms_output.put_line('Here 2');
    forall j IN 1..deptnums.count
    DELETE FROM emp WHERE deptno=deptnums(j)
    RETURNING empno BULK COLLECT INTO enums;
    dbms_output.put_line('Here 3');
    FOR i IN 1..enums.count
    loop
    dbms_output.put_line(enums(i));
    end loop;
    end;
    

    Thank you

    Put the OUTPUT WHEN c1% NOTFOUND; After line 11 in your code.

  • Use of PL/SQL collections

    Hi gurus,

    I have a new collection and just wanted to know about little things.

    I would like to declare the associative array for emp % rowtype and I want to load the entire table in the pl/sql table, and then I want to display on the screen.

    I wrote the following code but impossible to load the entire table and display it.

    Could you please guide me in the loading and display of the entire record of the table emp also please share some links that will give me examples of collections on the emp table.

    Literature Informatics very difficult to understand concepts.

    declare
    type emplist is table of emp%rowtype index by binary_integer;
    etab emplist;
    
    
    
    
    begin
    if etab is null then
    dbms_output.put_line('etab empty');
    else
    dbms_output.put_line('etab not empty');
    end if;
    dbms_output.put_line(etab.count);
    --null;
    
    
    
    
    end;
    

    Thank you...

    Oracle offers 3 types of PL/SQL collection type.

    1. associative array

    2. nested table

    3. Varray

    You must first determine what type of suites collection your goal. To show how what you try, I used the nested Table collection type.

    SQL > select * from version $ v where rownum = 1;

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi

    SQL > declare
    2 tbl type is table of the emp % rowtype;
    tbl 3 v;
    4 start
    5 Select * bulk collect into emp v.;
    6
    7 because I loop 1.v.count
    8 dbms_output.put_line (v (i) .empno |) '/' || v (i) .ename);
    9 end of the loop;
    10 end;
    11.
    7369/SMITH
    7499/ALLEN
    7521/WARD
    7566/JONES
    7654/MARTIN
    7698/BLAKE
    7782/CLARK
    7788/SCOTT
    7839/KING
    7844/TURNER
    7876/ADAMS

    PL/SQL procedure successfully completed.

    A common myth about the treatment in bulk, it's that it improves performance. Grouping of PL/SQL variable uses an area of PGA memory. PGA is a private memory area. For example, if a process requires 1 MB of storage for a variable grouping in PGA and 25 users ask the same process, then 25 MB is allocated in PGA for this collection. It's a very expensive.

    It must be so always remember, the best and the only way to process the data in Oracle using SQL. PL/SQL is not a recommended tool to process the data. Therefore, always try to make the processing of your data by using simple SQL. Never treat the data in a loop using the explicit cursor or collection of PL/SQL.

  • first name and collection methods

    Hello

    Billy explained in a recent thread that do not use such and .last methods. Can someone explain this indetail. What are the problems, we will be facing if we use these?

    https://forums.Oracle.com/thread/2590384

    A loop in a table (do not use . First and . Last methods but if you fully realize the consequences of this):

    1. Start
    2. ...
    3. for I in 1.myArray. Counting loop
    4. .. do something with myArray (i)
    5. end loop;

    I prefer the following construction:

    I: = myArray.first;

    loop

    output I have is zero;

    do something with myArray (i);

    I: = myArray.next (i);

    end loop;

    It works on the associative and normal collections.

    Also, it will not fail if the collection is null.

    According to the first, last or 1.count will give an error with the rare collections, when indexes are not contiguous.

    For example, a collection where myArray (1) and myArray (3) exist, but there is no such thing as myArray (2).

    declare

    type t_myArray is table of index varchar2 (64) by pls_integer;

    myArray t_myArray;

    Start

    myArray (1): = "foo";

    myArray (3): = 'bar ';

    because me in 1.myArray.count

    loop

    dbms_output.put_line (myArray (i));

    end loop;

    end;

    This will give an ora-01403 no data found

    in the same way:

    declare

    type t_myArray is table of index varchar2 (64) by pls_integer;

    myArray t_myArray;

    Start

    myArray (1): = "foo";

    myArray (3): = 'bar ';

    I'm in myArray.first... myArray.last

    loop

    dbms_output.put_line (myArray (i));

    end loop;

    end;

    will also give ora-01403

    but it works perfectly:

    declare

    type t_myArray is table of index varchar2 (64) by pls_integer;

    myArray t_myArray;

    I have pls_integer;

    Start

    myArray (1): = "foo";

    myArray (3): = 'bar ';

    i: = myArray.first;

    loop

    output I have is zero;

    dbms_output.put_line (myArray (i));

    I: = myArray.next (i);

    end loop;

    end;

  • Dynamic characters of the Alphabet links: example/tutorial?

    I hope someone can point me to a tutorial/example of what I'm trying to do. which is to link dynamic of a page, based on the alphabet.

    An attempt to explain

    My database contains for example, a collection of CDs, artists, albums by them (Art_Name, Alb_Title, ArtID) and a list ID.  From a page where I have listed alphabet (A, B, C, etc. on a toolbar).  I'm looking for a way to bind a dynamic page, where all the artists starting with a specific letter will appear

    My efforts to date can bind either a single artist, or all the artists, but not all artists with a common letter list!

    I know I could do this by creating a page target for each letter, then using filtering in the Republika Srpska, but think there should be a more elegant solution

    Thank you

    The link is in the repeat region that displays the initial letters.

    simply inserts the file name of the current page.

    It is followed by a query string. In my example, I used? letter =.

    The resulting HTML output will be something like this:

    C.

    Thus, when the page loads, the second recordset will use $_GET ['letter'] to find all of the artists whose names begin with C.

  • Impression of field collection ArrayCollection object

    Hi all

    I can return the collection of items in area code (POJO/value object) server that can be extracted as a collection table-side client in Flex. On the iteration of the table collection, we can get each item as an object. It is now possible to print/get the individual properties on object/POJO without creating/binding with action script class.

    For example a collection of used class has been removed from the side server, and we have in collection ArrayCollection. We can print the Rible properties such as first name, last name etc without creating a corrosponding action script class.

    Thank you

    Hello

    well, sure you can.

    As you mention all the object will be an object with all the properties type. Then simply to know the names of these properties.

    for each (var obj:Object in _arrayCollection)

    {

    trace (obj ["name"]);

    trace (obj ["name"]); and so on

    }

  • Deployment of the Collections

    All,

    Does anyone know how can I deploy all the objects in a collection using OMBPlus

    Any help would be appreciated.

    Thank you

    Kensei
    _*OMBRETRIEVE COLLECTION*_
    
    Purpose
    
    Retrieve details of the collection, including its shortcuts.
    
    Prerequisites
    
    Should be in the context of a project, before retrieving a collection.
    
    Syntax
    
    retrieveCollectionCommand =  OMBRETRIEVE COLLECTION "QUOTED_STRING" ( GET (
          ( "referencesClause" | "propertiesClause" ) ) |
         "getReferenceIconSetClause" )+
    referencesClause =  ( ALL | TABLE | VIEW | PACKAGE | DIMENSION |
         MATERIALIZED_VIEW | SEQUENCE | CUBE | ADVANCED_QUEUE | STREAMS_QUEUE |
          QUEUE_TABLE | EXTERNAL_TABLE | VARYING_ARRAY | OBJECT_TYPE |
         NESTED_TABLE | MAPPING | COLLECTION | ORACLE_MODULE | PROCESS_FLOW |
         PROCESS_FLOW_PACKAGE | PROCESS_FLOW_MODULE | SAP_MODULE | CMI_MODULE |
          FUNCTION | PROCEDURE | FLAT_FILE_MODULE | FLAT_FILE |
         BUSINESS_DEFINITION_MODULE | BUSINESS_PRESENTATION_MODULE |
         PRESENTATION_TEMPLATE | ITEM_FOLDER | LIST_OF_VALUES | DRILL_TO_DETAIL
          | ALTERNATIVE_SORT_ORDER | DRILL_PATH | BUSINESS_AREA |
         GATEWAY_MODULE | CONFIGURATION | REGISTERED_FUNCTION |
         PLUGGABLE_MAPPING | PLUGGABLE_MAPPING_FOLDER | DATA_AUDITOR |
         TRANSPORTABLE_MODULE | EXPERT_MODULE | EXPERT | CALENDAR_MODULE |
         CALENDAR | DATA_PROFILE | DATA_RULE_MODULE | DATA_RULE ) REFERENCES
    propertiesClause =  PROPERTIES "(" "propertyNameList" ")"
    getReferenceIconSetClause =  GET ( REF | REFERENCE ) ICONSET
    propertyNameList =  "UNQUOTED_STRING" { "," "UNQUOTED_STRING" }
    
    Keywords And Parameters
    
    retrieveCollectionCommand
    
    Retrieve details regarding a collection of objects.
    
    referencesClause
    
    Specify the type of references to retrieve from the collection.
    
    propertiesClause
    
    Retrieve values for a number of properties.
    
    Basic properties for COLLECTION:
    
    Name: BUSINESS_NAME
    
    Type: STRING(200)
    
    Valid Values: N/A
    
    Default: ''
    
    Business name of the collection
    
    Name: DESCRIPTION
    
    Type: STRING(4000)
    
    Valid Values: N/A
    
    Default: ''
    
    Description of the collection
    
    Note:
    
    1. N/A means any valid character in supported character set.
    
    2. '' represents an empty string
    
    propertyNameList
    
    Comma separated list of property names to retrieve values. Property names
    
    are unquoted.
    
    Examples
    
    OMBRETRIEVE COLLECTION 'Purchasing Warehouse' GET TABLE REFERENCES
    
  • Import of CD in error

    I had this problem with CD commercial manufacturing where the wind album being listed somewhere else.  For example, Crossroads Collection CD of Clapton.  Songs on the same CD have been separated from the rest and put in their own "album.

    Now I import a CD and itunes of language learning is to take the first and sometimes the second piece of the album should be put as unique "track 01", "track 02".  I am sure that individual tracks were not appointed by the creators of the CD, and this is probably the question.  So, how I iTunes to import all the tracks in the album in iTunes?  Can I get these orphaned titles to their correct albums?

    Thank you

    Steve MacGuire alias turingtest2 - iTunes and iPod tips and tricks - grouping beaches in Albums - http://www.samsoft.org.uk/iTunes/grouping.asp (old post on Apple Discussions http://discussions.apple.com/message/9910895#9910895)

    Quick response: select all the tracks on the album, file > info (or right-click > news > Details) and give them all a single "album artist", or check the indicator of "compilation" (as in https://discussions.apple.com/message/17670085#17670085).

    If they are several CD sets, you will also need to enter the appropriate information in the fields of number of disk.  If they are not a set of multiple CDs that you must always make sure any vacuum or disc number fields are properly defined.

    Another explanation of hhgttg27 August 2015 - https://discussions.apple.com/message/27784417#27784417

    If they won't even really check this August 2008 post by turingtest2 group temporarily change labels - https://discussions.apple.com/message/7904806#7904806 or http://www.samsoft.org.uk/iTunes/merge.asp - add a letter at the end of the name of the artist, close the read information, then open it again and remove the letter. This works often but I had cases where securities combined when a letter has been added but divorced when he was kidnapped again.

    If they are mp3 files are trying to change the version of the ID3 tag, which can cause iTunes to re - write the tags and clarify inconsistencies.  I use iTunes 7.5 (Yes, from 2007) so I can't tell you where it is in later versions.

    I had a case of grouping stubborn reality.  The tracks will be re-group in a way that has no meaning when I changed metadata.  Without going into details, I deleted tracks iTunes completely, then add the files and they are all grouped together correctly.

  • category

    What are the categories in ibooks?

    Hi ParryDemetriou,

    The iBooks app organizes your books using Collections and categories.  When you purchase or download a book, you will find that they are categorized automatically for you.  You cannot create your own categories, but you can create Collections.  The resources below will explain a little more about iBooks:

    Help of iBooks on your iMac
    https://help.Apple.com/MacHelp/Mac/10.11/index.html?localePath=en.lproj#mh43558

    Organize and sort your books

    In iBooks, there are several ways to display books in your library. For example, you can see the books by author, manually order books and more.

    Options in your iBooks library
    Open IBooks for me

    In your library, do one of the following:

    Choose a presentation of the book: click on the options at the top of your library. For example, click Collections to see all the collections that you have created.

    Sort your books: click sort, and then select an option. For example, click Sort by, and then choose most recent to see the books you read recently displayed at the top.

    Manually reorganize books: click on sort by, select sort manually, and then drag books where you want.

    Display the titles of the books and authors: click sort, and then select Show title & author. If you see hide title & author, authors and book titles are already displayed.

    See all the books that you bought: click sort, and then select Show iCloud books. If you see Hide iCloud books, books that you have purchased are already displayed.

    You can see all the hidden books that you have purchased using your Apple ID, except for those that are hidden. Books that are not downloaded to your Mac display with a badge to iCloud.

    The iPhone to iOS user guide 9
    http://help.Apple.com/iPhone/9/#/iphab219b91

    Organize books

    See books by title or cover. Tap or .

    To what extent this time am I? On the iPhone 6 s and s 6, press the cover of a book to display your statistics and other info. If it's an audio book, you will see the time remaining listening.

    Show only audio books or PDFs. tap the name of the current collection (at the top of the screen) then choose a PDF file or audio books.

    Organize your books with collections. Press Select, then select a few books to add to a collection. To change or create collections, tap the name of the current collection (at the top of the screen). Some built-in, such as PDFs, collections cannot be renamed or deleted.

    Rearrange the books. While the books look at a cover, tap and hold a blanket, then drag it to a new location. While looking at the books by title, sort the list using the buttons at the top of the screen. The collection of books is automatically set up for you; switch to another collection if you want to manually rearrange your books.

    Looking for a book. Pull down to reveal the search at the top of the display field. The search looks for the title and the name of the author.

    Hide the books purchased, you have not downloaded. Tap the name of the current collection (top), and then turn on Hide iCloud books.

    On iBooks
    https://support.Apple.com/en-us/HT201478

    Organize your library

    You can sort the books and audiobooks in iBooks by switch to the display of the list and tapping the latest titles, authors or categories.

    You can also organize your books and audio books in these ways:

    • A list or grid view.
    • Specific collections based on a topic. For example, you can put all your books and PDF documents related to your work in a single collection.

    To change or add new Collections, tap the Collections button, or the name of the collection on your iPhone or iPod touch. To reorganize books in your collections of iBooks, touch and hold a book, then move it where you want. (You can not rearrange the books in the collection of books.)

    Take care

  • DAQmx PDM, add the external value to the log file

    Hello

    I would like to know if it is possible to permanently add an external double value to the TDMS file that is created by the DAQmx Configure logging (PDM) VI?

    Thus, for example, I collect double data of 8 channels, DAQmx, speed of 1 Hz (analog double, 1 d). I'll get these 8 values with corresponding time stamps in the TDMS file created. Is there a way to "tunnel" a double value external to the same TDMS file?

    If there is no such option, I will configure just the TDMS logging explicitly not through the DAQmx driver.

    Thank you!

    with any possibility of foor loop iteration time zero will give you a default value of reference if your reference will not be valid in this case.

  • Change the hour of start/stop maintenance window

    Hello

    This question is for 12.1.0.2 on 2012 Windows 64-bit. Many of the automated internal jobs Oracle (for example statistics collection) are overlapping with other application work.  I'm confused that adequate controls are to change the on/off time for the maintenance for these jobs window.  Can I change the window, set_attribute, etc...

    Can someone tell me the proper commands to view and edit the start and stop time for the window/internal maintenance task?

    Thank you...

    This question is for 12.1.0.2 on 2012 Windows 64-bit. Many of the automated internal jobs Oracle (for example statistics collection) are overlapping with other application work.  I'm confused that adequate controls are to change the on/off time for the maintenance for these jobs window.  Can I change the window, set_attribute, etc...

    Can someone tell me the proper commands to view and edit the start and stop time for the window/internal maintenance task?

    The answers you seek are discuess to chapter 26 of the Oracle documentation: automated management of Database Maintenance tasks

    http://docs.Oracle.com/database/121/Admin/tasks.htm

    26 automated management of Database Maintenance tasks

    Oracle database has automated many day-to-day maintenance tasks typically performed by database administrators. These automated maintenance tasks are carried out when the system load is expected to be light. You can enable and disable individual maintenance tasks and can configure these tasks and resource assignments at the time, they are awarded.

    This chapter contains the following topics:

    See this third point ' configuration of Maintenance Windows?

    These sections above the coverage of everything you need to know. As always, you must carefully design the test cases that includes your own test cases to work to ensure that things work as expected.

  • Colllection of the fonts in the Document

    Hello

    Use Illustrator CS6 on Mac. Is it possible to collect fonts everything I used in the document by the script? I had a few scripts of this forum, but not efficient.

    I realize the option available in the CC2014 package.

    But I need this for CS6. Help, please.

    Kind regards

    Kitty

    Here is an example to collect activeDocuments fonts:

    function getFntsLst (doc){
         var xmlString = new XML(doc.XMPString);
         var fntFamily = xmlString.descendants("stFnt:fontFamily");
         var fntFace = xmlString.descendants("stFnt:fontFace");
      var fntFile = xmlString.descendants("stFnt:fontFileName");
         var lst = new Array();
         for (var i=0; i 
               
  • Synchronize photos between desktop PC, Tablet and mobile devices

    Hi, I can't understand how works mobile sync, hope that someone would want to guide me.

    My goal is to have a subset of my photos are synchronized between desktop PC (MAC OS x running full LR CC), smartphone (mobile LR) and my Tablet (10 Windows running full LR CC).

    I managed to set up a Collection on my desktop PC that synchronizes with Mobile - for example, this collection is where I have some photos that relate to share between my devices. For example my smart phone can see these photos and I can also add photos to the collection of my smart phone that appears on the desktop.

    However, when you run the LR tablet, I can't get the same link. For example when I activate sync he wants to delete my existing association of the lightroom file and delete all the photos in the cloud. Mobile synchronization does not work between complete lightroom different instances or am I doing wrong?

    And if not possible, is there as another way of synchronization necessary here I can ask that only a subset of my photos (my Tablet cannot hold my complete database of photos)? I looked at the area of the creative cloud but it seems to be the manual copy area and I don't break my photos out (or duplicate physically) in different physical locations on the hard drive of my desktop PC? 

    Thanks in advance!

    Hi K0LDING,

    The synchronization between a main catalog and several mobile versions.

    This could be a problem if you have the full Lighroom program installed on your Tablet and you try to synchronize an another catalog outside of your PC and according to the message, which allows to synchronize would remove the previous synchronized data.

    You can install Lightroom Mobile on your Tablet and synchronization through that.

    Kind regards

    Claes

  • Conditional code of liquid to the output an image if webApp field is empty

    Hello world

    I have a webApp where one of the input fields is an image. If the image field is not completed then I don't want the image to display. Here is the block of code that is on the page of details webApp template:

    < div class = "booking / details" > {tag_image detail}

    < side >

    < style p = "" border: 0px; "class ="nice-date"> {tag_Event Date} < /p >"

    < / side >

    < / div >

    The tag {tag_image detail} is the field in the Web application which is filled if there is an image available, but as mentioned if the field is empty so I don't want a symbol of broken image appearing in the browser.

    I changed the above code by encapsulating code liquid around the tag {tag_image in detail} as follows:

    < div class = "booking / details" > {% if this.} Image! = "" %} {tag_image detail} {% endif %}

    < side >

    < style p = "" border: 0px; "class ="nice-date"> {tag_Event Date} < /p >"

    < / side >

    < / div >

    When I was reading the conditional code of liquid, he says to a collection under the label of output module. For example:

    collection = "myimages".

    I pulled out the following code to the module on the page of list of events:

    < div > < span style = "" line-height: 1; "> {module_webapps, 21018, one, 4 real, 1, date} </span > < / div >"

    But since the image that I'm trying to focus on the event details page I don't know if it will work. So I was wondering if someone could tell me if I just need to revise the module_webapps above tag to be as follows:

    < div > < span style = "" line-height: 1; "> {module_webapps, 21018, true, 4, 1,collection ="myimages",date} </span > < / div >"

    The above would be correct? Sorry, only to learn any liquid, and it's very confusing.

    Thanks in advance for any advice.

    Hello

    A few things.

    {tag_image detail} is the name of your image.

    This will make an image wrapped in an anchor by default.

    You can use the pure liquid output to make your own HTML code that you need.

    This leads to the main question why your liquid does not work.

    Your custom image field is called a precision of image and you just 'image' in your liquid.

    You have {% if this.} Image! = "" %} {tag_image detail} {% endif %}

    In programming, such as access to a file JSON with topic containing more then one word your liquid must be:
    {% If this.} ['image of detail']! = "" %} {tag_image detail} {% endif %}

    If it was a single word, lets say you want to copy the name then it would be

    {{name}} You don't need the 'that' bit.

    The ideal output would be something like:

    {% If this.} ['image of detail']! = « » %} {{name}} {% endif %}

    Note: This implies that your domain image is - detail of the Image / picture of detail

  • Photoshop has not installed with adobe first pro

    I recently installed adobe pro CS6 first.  I don't see Photoshop or After Effects in the form of application.  Note: I already had 12 Adobe elements.  Should I uninstall only so that Photoshop CS6 install?  I am definitely a newbie so please be nice...

    Photoshop does not part of first pro.

    do you own a suite (for example, cs6 collection master or design standard)?

Maybe you are looking for

  • ChumSearch malware/how to get rid of him?

    So I downloaded accidentally or somehow ended up with what we called ChumSearch and this is my new browser / default search engine and I tried just put in service and uninstall the extension safari, but even after I uninstalled it, it's still there.

  • How to connect by Satellite P300D to LCD TV

    Hello I'm new to the forum and hope I'm in the right place. I was tearing my hair out trying to connect my Satellite P300D to my LCD TV.All connections seem ok and the wallpaper appears on the TV but nothng else No slider, icons or anything else from

  • 1606dn RT of Windows and LaserJet Pro - does not

    HI - HP Windows 8 page info (here), the HP LaserJet Pro 1606dn should be fully supported in Windows RT with a driver in the OS.  However, it does not work.  On my Surface, running Windows RT, when I go to settings to laptop, then peripheral, the 1606

  • HP Photosmart all in one printer C7280 Windows Vista 32 bit.

    My HP Photosmart all in one printer keeps going to put in place for the printable school pictures. I unplugged and it always goes to the same thing when I turn it back on. How can I fix it This problem? Thank you ducksterman.

  • Impossible to get Airprint to work

    Hello I just bought a Deskjet 3050. J611a printer I've implemented without any problem on my computer. However, when I try to use my iPhone or iPad to print (both running iOS 5.0.1), they say no Airprint printer. I tried to restart my printer, and I