How to import XML into SQL Table

Dear all,
There are a lot of books about exporting data into XML format.
Actually, how to use XML Documents? Sorry I am new that I ask such a question.
What i think may be exchange or save data using xml. If so, How to import into MS SQL table? Do it need to do any mapping?
Appreciate for your hints

Are you sure you want to use XML with tables for this? No doubt importing XML into tables is useful for some specialized tasks, such as importing formatting information inside the XML itself, but for most of the familiar tasks that XML excels at, tables are neither necessary nor useful.
In my (limited) experience, if the XML elements are well-differentiated, by which I mean different types of data have their own distinctive tags, then the special powers of XML can be exploited more fully using the more familiar tagged text, nested tags etc. in ordinary text frames using paragraph breaks, tab characters, etc. to achieve a suitably "tabular" finished appearance.
If you must import XML into tables, I recommend Adobe's own PDF "Adobe InDesign CS3 and XML: A Technical Reference" availabe here:
http://www.adobe.com/designcenter/indesign/articles/indcs3ip_xmlrules.pdf
It sounds very daunting -- the words "technical reference" make me shudder -- but actually it's very readable and not very technical at all. Some nice pics and everything!
Jeremy

Similar Messages

  • Can't Figure Out How To Import XML into a Table?

    HELP!
    I've been using InDesign for several years now... but everything Ive ever done has been basic one off layout concepts.
    I am working on a website for a musical theater actress and for her resume, Id like to make a PDF which lists in table format the show, theatre and role she had for each job.
    I could do this manually... but Id really like to learn how to just reuse the same XML data that I have for her website and import it into InDesign.
    I have looked at Adobe's help file, I have scoured the internet, and I still can't figure it out... I have done like the adobe support file says... and I cant seem to get the values I create in her resume xml file to show up in a table I create in InDesign.
    I even tried to simplify it for the learning process and did something as basic as an XML file that has 5 colors... couldnt even get that working.
    So could someone explain it to me like Im a 5 year old... how to take a XML file, import it, place it in a table and have the data actually show up in the table.
    thanks,
    brian

    Are you sure you want to use XML with tables for this? No doubt importing XML into tables is useful for some specialized tasks, such as importing formatting information inside the XML itself, but for most of the familiar tasks that XML excels at, tables are neither necessary nor useful.
    In my (limited) experience, if the XML elements are well-differentiated, by which I mean different types of data have their own distinctive tags, then the special powers of XML can be exploited more fully using the more familiar tagged text, nested tags etc. in ordinary text frames using paragraph breaks, tab characters, etc. to achieve a suitably "tabular" finished appearance.
    If you must import XML into tables, I recommend Adobe's own PDF "Adobe InDesign CS3 and XML: A Technical Reference" availabe here:
    http://www.adobe.com/designcenter/indesign/articles/indcs3ip_xmlrules.pdf
    It sounds very daunting -- the words "technical reference" make me shudder -- but actually it's very readable and not very technical at all. Some nice pics and everything!
    Jeremy

  • SSIS ETL Import XML into SQL Tables

    HI,
    I am trying to import the below shown sample file data into sql tables using SSIS. Could you please guide on how to import data 
    Metadata={A=@RefID, B=CH_ERT_ID, C=CH_DATE_ADDED, D=CH_DATE_DELETED, E=CH_SOURCE_TABLE, F=CH_SOURCE_ID, G=CH_FIRST_NAME, H=CH_MIDDLE_NAME, I=CH_LAST_NAME, J=CH_NAME_SUFFIX, K=CH_BIRTH_DATE, L=CH_BIRTH_ORDER, M=CH_DEATH_DATE, N=CH_STREET_ADDRESS, O=CH_CITY,
    P=CH_STATE, Q=CH_ZIP, R=CH_PHONE, S=CH_MOTHERS_MAIDEN_LAST, T=CH_MOTHERS_MAIDEN_FIRST, U=CH_GENDER}
    Initial RefID CoDoSA Identity
    ITBSQUVY3UD7M89W OysterID: ITBSQUVY3UD7M89W
    Creation Date: null
    Size: 1
    CType: N
    Persistant: false
    Record 0: @RefID=source1.2, CH_DATE_ADDED=2014-05-27 12:05:00.87, CH_SOURCE_TABLE=sample, CH_SOURCE_ID=151001, CH_FIRST_NAME=xx, CH_LAST_NAME=xx, CH_BIRTH_DATE=2003-07-05 00:00:00.0, CH_STREET_ADDRESS=2478 S 13th st, CH_CITY=xx, CH_STATE=xx, CH_ZIP=xx CH_GENDER=F,
    Input record: false, Current Traces: OID: ITBSQUVY3UD7M89W, RunID: 1, Rule: [@], Previous Traces: []
    Merges: {}
    StrToStr: []
    NegStrToStr: []
    T6RGLWXTUL7JT4LK OysterID: T6RGLWXTUL7JT4LK
    Creation Date: null
    Size: 1
    CType: N
    Persistant: false
    Record 0: @RefID=source1.5, CH_DATE_ADDED=2014-05-27 12:05:00.87, CH_SOURCE_TABLE=sample, CH_SOURCE_ID=151015, CH_FIRST_NAME=xx, CH_MIDDLE_NAME=I, CH_LAST_NAME=xx, CH_BIRTH_DATE=2003-06-21 00:00:00.0, CH_STREET_ADDRESS=N128 W20158 HOLY HILL RD, CH_CITY=x, CH_STATE=x,
    CH_ZIP=x, CH_GENDER=M, Input record: false, Current Traces: OID: T6RGLWXTUL7JT4LK, RunID: 1, Rule: [@], Previous Traces: []
    Merges: {}
    StrToStr: []
    NegStrToStr: []

    In your case the file needs to be transposed (rows to columns), likely you'll need to transform the data using a pre-processing step outside SSIS.
    I suspect another option could be to load the file as a whole using a Flat File Source that defines a single large column (typically a DT_STR set to its max size, if the file sure fits in completely) and then you can use a Conditional Split Transform. to
    take each row (based on lengths if fixed) and write to another file this time in tabular format.
    Arthur
    MyBlog
    Twitter

  • Howto import XML into Excel table ?

    Hi,
    I asked this before in the Excel forums but received the suggestion that I ask here instead.  The question precis : How to ungrey the "Append new data to existing XML lists" checkbox so I can select it when importing XML data into an Excel
    spreadsheet.
    I have a local server which provides data in XML form and need to import successive reloads of the XML page into successive lines in an Excel spreadsheet.  I found the Excel help page entitled "How to use XML in Excel 2003" at http://office.microsoft.com/en-gb/excel-help/how-to-use-xml-in-excel-2003-HA001101964.aspx?CTT=1&origin=EC001022986
    which was useful in so far as permitting me to import the data using the XML Source task pane and mapping the elements I need from the XML source to columns in the spreadsheet.
    In order to append successive lines from the XML source page, as I understand it from the link I quoted,  I need to change the XML Map properties to "Append new data to existing XML lists".  However this checkbox is greyed out in the
    XML Map properties dialog box so I can't select it.
    Any ideas how I can achieve my aims here ?
    Thanks in advance,
    Mike

    Hi Mike,
    Thank you for contacting Office IT Pro General Discussions Services. 
    From your description, I understand that you tried to import XML into Excel table. You selected “Use the XML Source
    task pane” when opening the XML file, then you tried to check the option in the
    Map Properties window: "Append new data to existing XML lists". 
    However, this option is grayed out. If there is any misunderstanding, please feel free to let me know.
    I have checked the issue on my side but could not reproduce this issue. I suggest download the sample XML file as suggested on the page and test the
    issue again:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=B4BD3283-AD0B-408D-9CE7-AB9C3537BBBB&displaylang=en
    If the problem does not occur with the sample XML file, this issue might occur as there are some problems with the XML you were using.
    If the problem also occurs in with the sample XML file, this issue might be related to some third-party software conflicts. I suggest checking this
    issue by starting Excel in the safe mode.
    Start the Office program in safe mode
    ==============
    1.      
    Click Start, point to All Programs, and then point to
    Microsoft Office.
    2.       
    Press and hold the CTRL key, and then click
    Microsoft Excel.
    If the problem does not occur in the safe mode, this issue might be related to some third-party add-ins in the Excel program, we can try to disable
    them. Normally, you could do the following to disable the conflict add-ins in your Excel program:
    Disable add-ins
    Click
    Tools > Options > 
    Add-in, click Go button in the Manage:
    Com-in Add.
    Check if there are any add-ins,
    clear the checkbox to disable them.
    Close the Office program and
    restart it.
    Add one check back each time to the list of Add-In,
    restart the Office program, and repeat the above procedure. Once the issue reappears again, we can determine which add-in causes this problem and then disable it.
    Please take your time to try the suggestions and let me know the results at your earliest convenience. If anything is unclear or if there is anything
    I can do for you, please feel free to let me know.
    Best Regards,
    Sally Tang

  • How to import data into taxonomy tables

    Hi ALL,
    Can anybody suggest to import data into taxonomy tables.Please send me any documentation related this.
    Regards,
    Ravi.

    Hi,
    I hope following URL may help you.
    Taxonomy Import:
    http://help.sap.com/saphelp_mdm550/helpdata/en/09/322ad42c864bf79892af2123525b6f/content.htm
    Importing Hierarchy:
    http://help.sap.com/saphelp_mdm550/helpdata/en/36/c4c97f96484f438c2d5c96171cdd6f/content.htm
    Importing Attributes:
    http://help.sap.com/saphelp_mdm550/helpdata/en/bd/f768fd70d945ee873712304127493b/content.htm
    Importing Attribute text Values:
    http://help.sap.com/saphelp_mdm550/helpdata/en/52/2086075c584d96be102512036b9c0c/content.htm
    Importing Attribute Links:
    http://help.sap.com/saphelp_mdm550/helpdata/en/26/17f916867344afbdfcf7d629035c83/content.htm
    Regards
    Nisha

  • How to import data into taxonomy tables and qualified tables

    Hi ALL,
    Can anybody suggest to import data into taxonomy tables and qualified tables, when is value mapping neccessary and  what is partitioning? and what is the use of that partioning?

    Hello rehman
    even i am facing same issue regading import of data in taxonomy table
    . can we do it through import manager.
    please provide me some details i will be very very thankful to u
    my email - [email protected]
    Thanks & regards
    Himanshu

  • How To Load XML into a Table

    Hello All,
    I need to load many XML files into their own tables without using the XMLType column type. We need each element/attribute to get it's own column. For example
    <book id="bk103">
    <genre>Mystery</genre>
    </book>
    should load to a table with columns ID, GENRE of type varchar2. I have 1000s of XML files that need to be loaded, each with different data/structure. Ideally, I want to be able to point a SP at a folder that contains, say 250 XML files, run it, then have it create 250 tables each with a column set corresponding to each element/attribute from the XML file. Given that each XML file has a different structure, I need a solution that does not require a table to already exist. A solution that figures it out on the fly, perhaps using the VARCHAR2 type for all columns, would be best. I did notice this post, but it first requires the table to already exist. Is there a way to load 1 or more XML files into their own table with non XMLType datatypes where each table is created on the fly?
    Any help appreciated,
    TIA
    Rob
    Edited by: user10729248 on Dec 19, 2008 6:13 AM
    Edited by: user10729248 on Dec 19, 2008 6:14 AM

    Thanks for the response but I am not finding the information helpful. The examples provided assume the table into which the XML file is loaded already exists or a CREATE TABLE script is run. I need a solution that creates the table automagically. Can someone provide an example of this please? Also, I'm looking for a PL/SQL SP-based solution if this is possible. Many of the examples use Java; we're using .NET.

  • How to delete the Table Contents before inserting records into SQL table ?

    Hello Experts,
            I have a scenario where in I have to Pick up some records from SAP RFC & insert into SQL table.
            i know how to do this scenario but the proble with this is before inserting we first have to ZAP the SQL table & insert a new records. One more twist is The Triggering is happening from SAP side with Sender RFC. If this would have been from SQL Side i could have written a Stored Procedure/ Trigger & could have called this before the SENDER JDBC communciation channel picks up the Triggering event from SQL side.
    So how to do this scenarioin XI, First deleting all the Records of SQL table & then inserting the new reocrds. without using the BPM.
    Regards,
    Umesh

    hi umesh,
    you can achieve this by writing SQL query in message mapping level..
    refer this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/frameset.htm
    regards.

  • How can I write into a table cell (row, column are given) in a databae?

    How can I write into a table cell (row, column are given) in a database using LabVIEW Database Toolkit? I am using Ms Access. Suppose I have three columns in a table, I write 1st row of 1st column, then 1st row of 3rd column. The problem I am having is after writing the 1st row 1st column, the reference goes to second row and if I write into 3rd column, it goes to 2nd row 3rd column. Any suggestion? 
    Solved!
    Go to Solution.

    When you do a SQL INSERT command, you create a new row. If you want to change an existing row, you have to use the UPDATE command (i.e. UPDATE tablename SET column = value WHERE some_column=some_value). The some_column could be the unique ID of each row, a date/time, etc.
    I have no idea what function to use in the toolkit to execute a SQL command since I don't use the toolkit. I also don't understand why you just don't do a single INSERT. It would be much faster.

  • How to 'import xml' in my script

    Hi All,
    Below "Script 1" is working fine, now I want to call the '.xml' file which was placed in Template folder(see script code).
    How to import xml in 'New.indd' file("Line 27:-->var source = File(path + '/New.indd')".
    Please add import xml code in 'Script 1"
    Script 1:
    var path = Folder.selectDialog ("Select folder");
    if(path==null)
    exit();
    var files = path.getFiles(/\.(indd?|indt?)$/i);
    if(files==0)  
      alert("There is no 'indd'/'indt' file in your folder");
      exit();
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
    try
    myDocument = app.open(new File(files));
    MasterpageScriptLabel();
    TableCellStyleCreation();
    myDocument.save(new File(path + "/New.indd"));
    var folder = new Folder(path + '/Updated_Folder');
    folder.create();
    myDocument.close();
    var source = File(path + '/New.indd');
    var dest = new File(folder + '/New.indd');
    source.copy(dest);
    source.remove();
    catch(e)
    alert ("Your folder permissible only one file of 'INDD' or 'INDT' file");
    exit();
    function MasterpageScriptLabel()
    var myDoc=app.activeDocument;
    var myXMLElement=myDoc.xmlElements[0];
    if(myXMLElement.isValid)
        var myParentStory=myXMLElement.parentStory;
        var myTextContainers=myParentStory.textContainers;
        for(var i=0;i<myTextContainers.length;i++)
            myTextContainers[i].label="S_TF";
    var myDoc=app.activeDocument;
    var mspreads=myDoc.masterSpreads;
    for (i=0;i<mspreads.length;i++)
    if(mspreads[i].textFrames.length>1)
        var txfmlength=mspreads[i].textFrames;
        for (j=0;j<txfmlength.length;j++)
            if(txfmlength[j].nextTextFrame!=null)
            {txfmlength[j].label="S_TF";}
            if(txfmlength[j].previousTextFrame!=null)
            {txfmlength[j].label="S_TF";}
    function TableCellStyleCreation()
        var cestyle = myDocument.cellStyles;
        var array = ["TBL_COLH", "TBL_BODY"];
        var i = array.length;
        while(i--)
                try{
                    var style = myDocument.cellStyles.add();
                    style.name = array[i++];
                catch(e)
                    style.remove();
                    alert("'" + array[i-1] + "'"+ " Already exists in the document.")
                i--;
    main();
    function main(){
          var progress_win = new Window ("palette");
    var progress = progress_bar(progress_win, 2, 'Processing ... Completed');
        delay(1);
          progress.value = progress.value+1;
        delay(1);
        progress.parent.close();
    // delay function found here
    //found here http://www.wer-weiss-was.de/theme157/article1143593.html
      function delay(prmSec){
      prmSec *= 1000;
      var eDate = null;
      var eMsec = 0;
      var sDate = new Date();
      var sMsec = sDate.getTime();
      do {
      eDate = new Date();
      eMsec = eDate.getTime();
      } while ((eMsec-sMsec)<prmSec);
    * Taken from ScriptUI by Peter Kahrel
    * @param  {Palette} w    the palette the progress is shown on
    * @param  {[type]} stop [description]
    * @return {[type]}      [description]
    function progress_bar (w, stop, labeltext) {
    var txt = w.add('statictext',undefined,labeltext);
    var pbar = w.add ("progressbar", undefined, 1, stop);
    pbar.preferredSize = [300,20];
    w.show ();
    return pbar;
    by
    hasvi

    DECLARE @x xml=N'
    <Jobs>
    <Job>
    <JobCode>123</JobCode>
    <JobTitle>Years</JobTitle>
    <JobSubCode>
    <div>
    <Ol>
    <li>2001</li>
    <li>2002e</li>
    <li>2003</li>
    <li>2004</li>
    </Ol>
    </div>
    </JobSubCode>
    </Job>
    </Jobs>'
    SELECT J.c.value('(JobCode/text())[1]', 'varchar(10)') AS JobCode,
           J.c.value('(JobTitle/text())[1]', 'nvarchar(40)') AS JobTitle,
           L.c.value('.', 'varchar(10)') AS Years
    FROM   @x.nodes('/Jobs/Job') AS J(c)
    CROSS  APPLY J.c.nodes('JobSubCode/div/Ol/li') AS L(c)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Adding a link to an external file into SQL table

    I would like to add a link to an external file (picture stored on my local hard drive) into SQL table. Then use C# to query data from SQL table and export to Excel.  I got everything working ok except the link to external file. I would like to export
    this link to Excel and user can click on the link to open the file. How can I accomplish this? Thank you very much in advance for your help!

    In that case the Filetable feature could be of interest to you. With this feature the file can be part of the database, and still be accessible from tools outside SQL Server.
    I don't really have any good examples handy, but if anyone knows of a good blog post that could help Nhan, please feel free to add.
    Here is a link to the description in Books Online:
    http://msdn.microsoft.com/en-us/library/ff929144.aspx
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Importing Data into Sql Server 2012 from Excel Data

    Hi,
    I got errors like this when i am doing import data into sql server from excel Data. Can you please help us?
    - Executing (Error)
    Messages
    Error 0xc020901c: Data Flow Task 1: There was an error with Source - demotable$.Outputs[Excel Source Output].Columns[Comment] on Source - demotable$.Outputs[Excel Source Output]. The column status returned was: "Text was truncated or one
    or more characters had no match in the target code page.".
     (SQL Server Import and Export Wizard)
    Error 0xc020902a: Data Flow Task 1: The "Source - demotable$.Outputs[Excel Source Output].Columns[Comment]" failed because truncation occurred, and the truncation row disposition on "Source - demotable$.Outputs[Excel Source Output].Columns[Comment]"
    specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
     (SQL Server Import and Export Wizard)
    Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Source - demotable$ returned error code 0xC020902A.  The component returned a failure code when the pipeline engine called PrimeOutput().
    The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
     (SQL Server Import and Export Wizard)

    Are you attempting to import into a newly made table or into an existing table? It looks like it's trying to insert data where it cannot be inserted (invalid column or lack of data size in your column).
    Try the following:
    1). In your excel sheet, highlight the whole sheet and make sure the cells are in 'text' form and try re-importing
    2). save the document as ms dos TEXT and import as a text document.
    3). double check your columns are correct for the data, for example if you have a column that has a string of 100 characters and your column is 'NvarChar(90)' - that might cause the error? Or just correct data type in your column
    3). If that doesn't work and you're inserting into a new table, try importing it as string first and writing a query to insert columns that should be float/integer or whatever. You may want to convert float texts to a 'bigint' first rather than string
    > float as that can cause problems if I remember correctly.

  • QUERY FOR INSERT INTO  SQL TABLE

    Hi all,
    i want to insert some records into SQL table but not SAP database table. This table is only present in SQL database &
    not present in SAP database.
      i want to write a program in SAP to update the SQL table(not present in SAP database). is it possible?
       if yes, plz give me the query for inserting records into SQL table.
    Regards

    Hello,
    working on the same issue:
    Try this:
    DATA : Begin Of XY Occurs 1000,
            id(15)    TYPE C,
            Name(50)  TYPE C,
            ArtNr(50) TYPE C,
            lieferant TYPE I,
         End Of XY.
    Fill this internal Table with the SAP-Table
    START Connection to your Database
      EXEC SQL.
          Connect TO 'TEST_FH'
      ENDEXEC.
      IF SY-SUBRC EQ 0.
        EXEC SQL.
        Set Connection 'TEST_FH'     " <-- this is defines with TCode dbco
        ENDEXEC.
        IF SY-SUBRC EQ 0.
        Else.
          " OUT_Msg = '... won't connect'.
          Exit.
        EndIf.  " Else IF SY-SUBRC EQ 0
      Else.
        " OUT_Msg =  'Error at Set Connection Test_FH'.
        Exit.
      EndIf.  " IF SY-SUBRC EQ 0
    ENDE  Connection to your Database
    START Insert your table XY to an external database
        Loop AT XY.
          Try.
           EXEC SQL.
               INSERT INTO stoff
               (id, name , artnr, lieferant)
               VALUES
               ( :XY-ID,  :XY-Name, :XY-ArtNr, :XY-Lieferant )
           ENDEXEC.
           COMMIT WORK AND WAIT.     " <=== Maybe VERY important
          CATCH cx_sy_native_sql_error INTO exc_ref.
              error_text = exc_ref->get_text( ).
              Concatenate 'Table-INSERT: ' error_text Into error_text.
              MESSAGE error_text TYPE 'I'.
          ENDTRY.
        ENDLoop.     " Loop AT XY     
    END   Insert your table XY to an external database
    START: Clear Connection
        EXEC SQL.
          DISCONNECT 'TEST_FH'
        ENDEXEC.
    END : Clear Connection
    Hope it works
    Best wishes
    Frank

  • How to import images into BLOB datatypes

    Dear All,
    I'm trying to import image into BLOB table type.I'm executing this SQL commands but found error.
    ORA-22288
    ORA-06512
    Please help me i'll be thank full.
    Regards
    FAHEEM LATIF
    CREATE OR REPLACE DIRECTORY images AS 'C:\IMAGES';
    CREATE TABLE test007 (column1 BLOB);
    DECLARE
    l_bfile BFILE;
    l_blob BLOB;
    BEGIN
    INSERT INTO test007 (column1)
    VALUES (empty_blob())
    RETURN column1 INTO l_blob;
    l_bfile := BFILENAME('IMAGES', 'MyImage.gif');
    DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
    DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
    DBMS_LOB.fileclose(l_bfile);
    COMMIT;
    END;
    /

    I know your original pl/sql routine contained a COMMIT, but did you use the same code with the COMMIT? If not, are you checking the table from a different session?
    I ran your same code and it worked without issues. Are saying if you do a SELECT COUNT(*) from test007 it returns zero rows?

  • How to join two pl/sql tables .,.,,Urgent pls help

    Hi,
    Please tell me how to join to pl/sql tables with example
    thanks
    asp

    If your main intention is to get the common records/or getting whole records from the 2 different pl/sql arrays then , pls check this piece of code & explanation
    The SQL language has long offered the ability to apply set operations (UNION, INTERSECT, and MINUS) to the result sets of queries. In Oracle Database 10g, you can now use those same high-level, very powerful operators against nested tables (and only nested tables) in your PL/SQL programs and on nested tables declared as columns inside relational tables.
    Let's take a look at some of the syntax needed to do this, starting with UNION.
    First, I create a schema-level nested table type:
    CREATE OR REPLACE TYPE strings_nt
    IS TABLE OF VARCHAR2(100);
    Then I define a package and within it create and populate two nested tables of this type, each containing some of my father's and my favorite things:
    CREATE OR REPLACE PACKAGE favorites_pkg
    IS
    my_favorites strings_nt
    := strings_nt ('CHOCOLATE'
    , 'BRUSSEL SPROUTS'
    , 'SPIDER ROLL'
    dad_favorites strings_nt
    := strings_nt ('PICKLED HERRING
    , 'POTATOES'
    , 'PASTRAMI'
    , 'CHOCOLATE'
    PROCEDURE show_favorites (
    title_in IN VARCHAR2
    , favs_in IN strings_nt
    END;
    In this package, I also include a procedure to show the contents of a strings_nt nested table. This will come in very handy shortly.
    By defining these collections in a package, outside any program, they persist (they maintain their state and values) for the duration of my session or until I change or delete them. This means that I can now write programs outside the package to manipulate the contents of those collections.
    Note that this package has been simplified for the purposes of presenting collection functionality. In a production application, you should always take care to "hide" your package data, as with these collections, in the package body, and then provide procedures and functions to manage the data.
    Suppose, for example, that I would like to combine these two collections into a single collection of our favorites. Prior to Oracle Database 10g, I would have to write a loop that transfers the contents of one collection to another. Now, I can rely on the MULTISET UNION operator, as shown below:
    DECLARE
    our_favorites
    strings_nt := strings_nt ();
    BEGIN
    our_favorites :=
    favorites_pkg.my_favorites
    MULTISET UNION ---- Use INTERSECT , if you want to know common records
    favorites_pkg.dad_favorites;
    favorites_pkg.show_favorites (
    'ME then DAD', our_favorites);
    END;
    The output from this script is:
    ME then DAD
    1 = CHOCOLATE
    2 = BRUSSEL SPROUTS
    3 = SPIDER ROLL
    4 = PICKLED HERRING
    5 = POTATOES
    6 = PASTRAMI
    7 = CHOCOLATE
    ------------------------------

Maybe you are looking for

  • Apple TV no HD Streaming

    Just noticed today (before everything ok) streaming YouTube and Vimeo "HD" videos are showing not in HD. Changed HDMI cables and reset Apple TV with no difference. Any ideas much appreciated.

  • Monitoring of  existence of  generic filenames

    With CCMS agents, one could monitor the existence of a file (testfile) using the LOGFILE_TEMPLATE DIRECTORY="....." FILENAME="testfile" CHECK_EXISTENCE_ONLY=1 Can this work for monitoring the existence of generic files such as FILENAME="testfile*" CH

  • BSP to query Sql database?

    Just curious to find out if this is an option.. We web AS 6.40, can we write in ABAP to query data from a SQL database? Thanks in advance.. Vince

  • Saving an Agilent N1996A waveform trace to graphics/Excel files

    Hello, I am new to LabView.  I need to create a VI that will save an Agilent N1996A (CSA) waveform trace to a graphics file (PNG, BMP). The user will enter a filename through the front panel.  The Functions palette has a CSA ReadTrace.VI that sends t

  • TB icon is different on different computers

    I recently installed TB on my second Win7 computer. Both TB versions are up-to-date. In other words, both computers are running the same version of TB, 31.3.0.5444. The TB execute icons on the two computers are different. Why is this? I would much pr