Insert new column after get then XML

Hello,
I use Oracle 8i and SQL Utility. I want to do a query and after that, modify or insert the values of some elements.
xmlgen.clearBindValues;
xmlgen.setBindValue('vCity', vCity);
xmlSQL := 'select name, depto from emp where city = :vCity';
xmlString := xmlgen.getXML(xmlSQL);
Now, I want to read each line and modify
the name or depto values before create the
XML file. How can I do this?
Thanks,
Arthur Rafael

Again, it depends.
If you just want to fix your query
Create Table TABLE AS
Select column1, to_char(column2) column2, column3 from Table1
UNION
Select column1, column2, column3 from Table2;If you want to fix Table1
ALTER TABLE table1
  ADD( column2_varchar2 VARCHAR2(30) );
UPDATE table1
   SET column2_varchar2 = to_char( column2 );
ALTER TABLE table1
  DROP( column2 );
ALTER TABLE table1
  RENAME COLUMN column2_varchar2 TO column2Taking a step back, though, why are you creating a new table that is the result of unioning two other tables? Is this a one-time data model change? Or is this part of some ongoing process?
Justin

Similar Messages

  • Option + arrow keys suddenly inserts new columns

    This happens frequently when I work in Numbers.
    When I shall edit text in a cell, option + > and option + < all of a sudden cease to work. Instead of jumping to next or previous word, a new column is inserted.
    I don't know what causes it. I haven't found another solution than closing the document and reopen it.
    Fred

    I always edit text directly in cells and option + arrow keys normally jump to next or previous word.
    Yes they are greyed out for me too.
    I just noticed that if I by mistake press Cmd + return (instead of option + return) when I want to edit, it causes option + arrow keys to insert new columns. I can revert to normal by placing the cursor in the formula bar and using option + arrows. After that option + arrow keys jump to next or previous word also when I edit directly in cells.
    Thanks for telling about using the formula bar. Now I don't have to close and reopen the document.

  • How do I insert new record and get results on a landing page

    how do I insert new record and get results on a landing page

    It's not clear from your post what you are asking. In a SQL database, you use the INSERT statement to insert a row into a table. You use the SELECT statement to retrieve rows. Here's some basic info on how to do that within PHP
    PHP MySQL Insert Into
    PHP MySQL Select

  • Problem while inserting new Column in JTable

    Hi,
    I am facing Problem while inserting new Column in JTable.
    I have a JTable with one inherited ColumnModel class.
    When I am adding the column and moving towards the corresponding location, it moves successfully.
    but if I am adding another column or making any changes to table column structure the table retains the defualtcolumn structure.
    please help me to solve this..
    Regards
    Ranjith.........

    Maybe this example will help:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=579527

  • Insert new tags after root element

    Hi,
    I'm trying to insert new tags immediately after the root element in a DOM tree. The data to be inserted is being passed to the program as a string parameter. I've used Dom4J to add the data as a new element immediatelty after the root. Problem is, I'm not able to extract the content as a String from the document object. Here's my sample code :
    String addStr = "<div class=\"test2\">Test Val1</div><div class=\"test2\">Test Val2</div>";
    SAXReader reader = new SAXReader();
    String xml = "<div class=\"discussionThread dt\"><div class=\"dt_subject\">2011 IS HERE!</div></div>";
    Document document = reader.read(new StringReader(xml));
    DefaultElement newElement = new DefaultElement("div");
    newElement.addAttribute("class", "test");
    newElement.add(new DefaultText(addStr));
    List content = document.getRootElement().content();
    if (content != null ) {
            content.add(0, newElement);
    }There are couple of issues with this approach.
    1. I'm not able to find a way to convert the Document object content to String. The only API reference is asXML() which converts the document to a xml and sends it back as String. As a result of this, it adds a <xml> tag at the top.Also,the content within the added String has been parsed and converted to &gt; , &lt;
    Here's the output
    <?xml version="1.0" encoding="UTF-8"?>
    <div class="discussionThread dt"><div class="test">&lt;div class="test2"&gt;Test Val1&lt;/div&gt;&lt;div class="test2"&gt;Test Val2&lt;/div&gt;</div><div class="dt_subject">2011 IS HERE!</div></div>Just wanted to know if there's a better way to do this. Any pointers will be highly appreciated.
    -Thanks

    from oracle documentation...
    Old and new values are available in both BEFORE and AFTER row triggers. A new column value can be assigned in a BEFORE row trigger, but not in an AFTER row trigger (because the triggering statement takes effect before an AFTER row trigger is fired). If a BEFORE row trigger changes the value of new.column, then an AFTER row trigger fired by the same statement sees the change assigned by the BEFORE row trigger.
    for more details read the documentation

  • "open a new tab" buttton on the toolbar does not insert new tab after current

    I want the open a new tab button at the right end of the tab bar to open a new tab after the currently open tab the same way the browser does when the browser.tabs.insertRelatedAfterCurrent profile option is set to true.
    This current behavior is VERY annoying as I always have many tabs open and then have to scroll all the way to the right of the tab bar and drag the new tab back to where I want it, which is always following the currently active tab.
    Not sure if this was ever supported but if not I used to run Tabberwoky which no longer works and I've become quite fond of the feature and I need to make Firefox 8 do this.
    Please tell me how, not that I can't or should do it some other way.
    Thanks.

    That did it! Sure saves me trying to figure out how to write an extension to do it but if there is a simple example similar to my request that the source code is available for so I can take a look at it to see how its done the link to it would be appreciated.
    Thanks for the help!

  • Insert new Column in Reporting Cockpit (Portfolio Management)

    Dear colleagues;
    Any of you could change and insert a new column in Reporting Cockpit for BCV consult?
    I need to insert a new column with a formula (operation with more than two other column).
    How yo can activate this BCV Consult?
    Best regards.
    Mariano

    Dear Guru's;
    I have the solution.
    I solve this problem with the BRF Plus application.
    Watch this site --> Business Rule Framework plus [original link is broken]
    And go to the BCP Admin link in SAP PPM in Business Context Viewer -> Configuration center -> BCV Consult.
    Best regards.

  • Howto INSERT new column in correct position

    Currently I have a Table with 19 column, but it should have 20. I would like to insert after column 15, the new 16th column, so that it will be 20.
    I know how to alter a table, but how do I tell it to insert it as the new 16th column ?
    alter Table TABLE
    add
    COLUMN16 varchar2(10);
    THanks!
    TGIF

    Again, it depends.
    If you just want to fix your query
    Create Table TABLE AS
    Select column1, to_char(column2) column2, column3 from Table1
    UNION
    Select column1, column2, column3 from Table2;If you want to fix Table1
    ALTER TABLE table1
      ADD( column2_varchar2 VARCHAR2(30) );
    UPDATE table1
       SET column2_varchar2 = to_char( column2 );
    ALTER TABLE table1
      DROP( column2 );
    ALTER TABLE table1
      RENAME COLUMN column2_varchar2 TO column2Taking a step back, though, why are you creating a new table that is the result of unioning two other tables? Is this a one-time data model change? Or is this part of some ongoing process?
    Justin

  • DOM inserting new elements (no changes in xml file)

    I add the new element and it's nodes like that:
        public static int InsertZapis(String s)
            File dat = new File("nepremicnine.xml");
            try
                String nepr[]=s.split(":");
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(dat);
                Element nepremicninaNode = doc.createElement("nepremicnina");
                doc.appendChild(nepremicninaNode);
                Element tipNode = doc.createElement("tip");
                Text tipTextNode = doc.createTextNode(nepr[0]);
                tipNode.appendChild(tipTextNode);
                nepremicninaNode.appendChild(tipNode);
                Element lokacijaNode = doc.createElement("lokacija");
                nepremicninaNode.appendChild(tipNode);
                Text lokacijaTextNode = doc.createTextNode(nepr[1]);
                lokacijaNode.appendChild(lokacijaTextNode);
                Element stSobNode = doc.createElement("stSob");
                nepremicninaNode.appendChild(tipNode);
                Text stSobTextNode = doc.createTextNode(nepr[2]);
                stSobNode.appendChild(stSobTextNode);
                Element velikostNode = doc.createElement("velikost");
                nepremicninaNode.appendChild(tipNode);
                Text velikostTextNode = doc.createTextNode(nepr[3]);
                velikostNode.appendChild(velikostTextNode);
                Element letoNode = doc.createElement("leto");
                nepremicninaNode.appendChild(tipNode);
                Text letoTextNode = doc.createTextNode(nepr[4]);
                letoNode.appendChild(letoTextNode);
                Element telStNode = doc.createElement("telSt");
                nepremicninaNode.appendChild(tipNode);
                Text telStTextNode = doc.createTextNode(nepr[5]);
                telStNode.appendChild(telStTextNode);
                Element dodalNode = doc.createElement("dodal");
                nepremicninaNode.appendChild(tipNode);
                Text dodalTextNode = doc.createTextNode(nepr[6]);
                dodalNode.appendChild(dodalTextNode);
                return 0;
            catch (Exception e)
                e.printStackTrace();
                return -1;
        }But I don't see changes in my xml file.
    XML file looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <seznam_nepremicnin>
      <nepremicnina>
        <tip>Apartma</tip>
        <lokacija>Novalja 162d, Pag</lokacija>
        <stSob>4</stSob>
        <velikost>25</velikost>
        <leto>1980</leto>
        <telSt>051231521</telSt>
        <dodal>uporabnik2</dodal>
      </nepremicnina>
      <nepremicnina>
        <tip>Stanovanje</tip>
        <lokacija>Gosposvetska 83c, Maribor</lokacija>
        <stSob>3</stSob>
        <velikost>30</velikost>
        <leto>1975</leto>
        <telSt>041523163</telSt>
        <dodal>uporabnik1</dodal>
      </nepremicnina>
    </seznam_nepremicnin>

    Document doc = builder.parse(dat);this means a doc object with the copy of ur xml file has been created..that means..even if u modify ur doc element..it doesnt reflect in the file..
    u need to transofrm back ur document object to ur xml file to reflect the changes u have done on xml..did u get i?
    shanu

  • Inserting new columns based on the condition!

    Hi guys,
    I have a very simple query like the following… 
    SELECT table2.column_code2,
    table2.column_description2,
                 table2.column_code1,
                 table1.column_description1
    FROM database_001.table2 table1 LFET OUTER JOIN database_001.table2 table1 on (table2.column_code1 = table1.column_code1)
    From this query, its returning me a result set of something like below:
    column_code1       column_description1        column_code2                 column_description2
    RO1                              BOOK                              RL1            
                               PDF/ECOPY
    RO2                              PAPER                             RL2            
                            CONFERENCE
    RO5                            JOURNAL 
    RL11  OTHER
    Now, on the above query I want to insert three extra columns with the name (status, location and contact) where the results in the extra three columns would be based on the conditions I want to define in the query based on the above results…
    Something for example (sorry, I am not trying to write a condition: my question is how to write it), 
    if column_code1 = RO1 and column_description2  =  PDF/ECOPY on status column it should return a value ‘ONLINE’ & on location column it should return ‘WEB’ and on contact column it should write ‘BOB’.
    Also,
    if column_code1 = RO5 and column_description1 = JOURNAL on status column it should return a value ‘ON PRESS FOR PRINT’ & on location column it should return ‘S.R STREET, LONDON’ and on contact column it should write
    ‘SMITH’ like below result…so the final output should be the top four columns and the extra three columns…I hope someone can help me into this…thanks a lot…
    status                                            location                
                            contact
    ONLINE                                               WEB                          
                           BOB
    ON PRESS FOR PRINT                     S.R STREET, LONDON                           SMITH

    Hi artistdigital,
    you can use case statment for same in sql server. MSDN link - > http://technet.microsoft.com/en-us/library/ms181765.aspx
    Try code like this:
    SELECT table2.column_code2,
    table2.column_description2,
    table2.column_code1,
    table1.column_description1,
    case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'ONLINE'
    when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'ON PRESS FOR PRINT'
    end as [status],
    case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'WEB'
    when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'S.R STREET, LONDON'
    end as [Location],
    case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'BOB'
    when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'SMITH'
    end as [contact]
    FROM table2
    join table1
    on table2.column_code1 = table1.column_code1
    Regards Harsh

  • Insert new user column in pick and pack manager window

    Hi all,
    Exist a way to insert new column in pick and pack manager window?
    I try  by code too but i can´t. Is possible to do this?
    Thank you all again.
    Regards.

    Hi Aitor,
    Unfortunately, I don't think it is possible to add columns to this particular window. I had a requirement to do this a while back in SBO 2005A SP1 and I ended up designing my own pick and pack window.
    Kind Regards,
    Owen

  • Excel & ActiveX: Insert arbitrary columns from 2D array and create graph problems

    Hi there,
    I want to insert data from either a 1D or 2D array from LabView into Excel and create graphs.
    I used the information from the following example:
    http://www.ni.com/example/28934/en/
    and was able to create a new Excel file (I'm using Excel 2010), writing data from an 1D array to a column in excel by creating a while loop and using the first element of the array to write it to a specific cell. I use the counter of the loop to write to the next cell when the loop starts over and always delete the first value, which I write to the cell, from the array until it is empty.
    Now I also would like to write a 2D array - so the first column in Excel should be the first column from the array and so. Here I cannot use the loop counter directly as Excel only counts 1,2,... for the rows, but uses A,B,... to count columns. Also I do not know in advance how many columns my 2D array will contain, so creating a lookup table like (A means 1, B means 2,...) is not really an option (except there really is no other way). Is there a possibilty to convert numbers into letters or some way to 'explain' to the program that column 2 in the array means column B in Excel for example, or is there a way to insert new columns?
    I figured out how to add new Worksheets and as I also need to create a certain number of Worksheets and I know that on standard 3 sheets are present when creating the file, I use the 'add' methode to create every new worksheets before worksheet 3 - I could use the same methode to create new columns in Excel, but so far I didn't find a methode to do so. Or is there a way to enter the whole 2D array at once?
    Then I'd like to create a graph (in case of the 1D arrays a bar plot, when using 2D arrays a 3D plot) to view the data. I found this example:
    http://www.ni.com/newsletter/51339/en/
    -> as I do not have the toolkit I'd like to do it using ActiveX directly, so I tried to do things like shown under the headline 'DIY ActiveX/.NET'
    I tried to load the snippet to a new Excel file but got the error message 'microsoft.office.interop.excel.dll not found' and hence the code is not working. That confuses me a little as I would guess when this dll is not present I cannot access Excel from LabView at all, though my understanding of what I'm really doing so far is quiet limited. ;-)
    Also - as far as I understand from the snippet - when creating a new chart object I should be able the create methodes for it, however when I do a right click on the chart object of an ActiveX Worksheet symbol there are none listed.
    To explain my problems better I added a snippet showing my two problems: The inner of the two while loops shows how I import a 1D array. In the outer loop I seperate the columns. I know that currently this is not working as all data end up in column A of the Excel sheet - so I would need to convert the number of the outer counter to A, B,... or find a different solution.
    Moreover on the snippet I placed an ActiveX Worksheet Property with the Chart Object - as I can see the difference to the Chart Object in the example code from the last link above is the color. However I'm not sure what that means and how to change/ solve this.
    And just to make sure - I know this way the VI does not run as the Chart Object is placed completely wrong - I just did it, so it is included in the snippet.
    I'd be thankful for any suggestions,
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    ExcelAreaScan.png ‏60 KB

    Hello everyone and thanks for the answers.
    I only have the LabView Student Edition available here - is the toolkit included in it too. How can I check if it is installed/ available and in case it is installed - where can I find it?
    Today I had time to take a look at the example
    Create via ActiveX Labview a XY Scatter plot graph on an excel sheet
    It almost does what I want in terms of creating a graph. The only problem I could not fix, is that in this example a sheet is created where only the graph is present. i'd like to add the graph to a previously created worksheet. Today I tried get this working but it seems I stilll don't really understand what I'm doing, I'll post a snippet of my code as soon as I can access the PC with LabView on it again.
    I also took a look at the other example for inserting 2D attays - it seems to be what I need, I just had no time so far to test it, I'll post an update when I could test it.
    Thanks for the help so far!

  • Start new column at group change?

    My report is 2 columns.  I used the following steps: Section expert>Details>Format with multiple columns; and then on the Layout Tab i checked Format Groups with Multiple Columns.  Also, under the "Change Group Options" box and the "Options" tab, I have checked "Keep Group Together" and "Repeat Group Header on Each Page."
    I need to get a new column to start with a change in Group #1, and I can't figure that out.  There is an option for "New Page After [1] visible group" and that's close, but I need to have *a new column* after one visible group.
    My report contains details per US State.  I need to not have one page per state, but one column per state.
    Any ideas?
    Many thanks,
    Lara

    Will it work if you use Cross-Tab instead of Multiple columns for sections?

  • Inserting single column in crosstab

    Post Author: millercepbs
    CA Forum: WebIntelligence Reporting
    Does anyone know of a way to insert only a single column in a crosstab table? Every time I try to insert a column, I get a column added next to each existing column. The problem is, I can't delete a single column either, so I cant add and then delete the extras. I would like to add a single column for things like a sum for each row, but I don't want it next to each column.

    Post Author: Sujitha
    CA Forum: WebIntelligence Reporting
    Hi
    Did you find a solution.I guess it can only happen when u add a column beside the header and change the color Bg color same as the column value.I had the same problem but luckily I had to add just after the header.

  • New columns to select in FS10N/FBL3N

    Can I insert new columns for selection in the Report of FS10N/FBL3N?
    Of all the columns that already exist today to selecting and assembling the report, I need to install new fields that are not available. Where do I include this?
    Thanks in advance.

    Hi,
    You can go to T-Code O7R3 and add additional fields for display as per your requirement.
    Regards,
    SAPFICO

Maybe you are looking for

  • OBI11g installation on Windows Server 2008 R2 (64bit)

    Hi, Sorry to pick up this topic again, but my research in the forum and other inet sites doesn't help me so far and my installation will not work. My Situation: I have a Windows Server 2008 R2 (64bit) default installlation. The server (HyperV-managed

  • Mobile Hotspot Issue after 10.1 Update

    Hello, just wondering if there is a know issue with using mobile Hotspot after update z10 to 10.1. After this update was installed Mobile Hotspot will turn on but past network that I had created is not there anymore, also I cannot configure, when I p

  • Version of Autoconfig

    Hi everyone, I have a doubt, i hope somebody can help me. How can i know the current version of autoconfig that i had, i see in metalink how know if we have the last version, but how can i know my current version? Thank you very much. Regards

  • After Mavericks install, iPhoto, Garageband, not upgraded

    I have installed Mavericks on three of my Macs so far, the last one would not upgrade the iPhoto (& Garageband?) to the associated version.  Apple online support (where I have a really great, helpful person) coached me through to reaching a real pers

  • Reg. EDI-2-R3 IDOC integration.

    Hi,       We are going to implement a new project on EDI-2-IDOC XI integration using See burger BIC adaptor. EDI would be configured as outbound and R3 would configured as inboud. So where can I get the EDI ANSI X12 messages in .XDS format for 850, 8