Save Xml rows in table

I am having Stored procedure where i am inserting category and subcategory from xml rows.
I already have three tables i.e category,subcategory and combination of both i.e  catsubcatCombination.
I would like to insert records in catsubcatCombination where columns are  pksubcatcomb, fkCatid,fksubcatId
My sp looks like
INSERT INTO [catsubcatCombination]
( [fkCategoryId] ,
[fkSubCategoryId],
[createdDate] )
SELECT [Table].[Column].value(' Value0 [1]', 'varchar(50)') AS ' Value0' ,
[Table].[Column].value(' Value1 [1]', 'varchar(50)') AS ' Value1',
GETDATE()
FROM @xmlData.nodes('/ SubCategorySkuData/SubCategorySku') AS [Table] ( [Column] )
WHERE NOT EXISTS ( SELECT distinct fkCategoryId
FROM [tblSubcategoryCombination]
WHERE fkCategoryId =(select pkCategoryId from category where categoryName= [Table].[Column].value(' Value0 [1]', 'varchar(50)'))
and fkSubCategoryId=(select pkSubCategoryId from subcategory where subCategoryName= [Table].[Column].value(' Value1 [1]', 'varchar(50)')))
I am getting error 'Error converting data type varchar to bigint'
I know the error is here
SELECT  [Table].[Column].value(' Value0 [1]', 'varchar(50)') AS ' Value0' ,
[Table].[Column].value(' Value1 [1]', 'varchar(50)') AS ' Value1',
As fkCatid,fksubcatId are bigint, so i need to fetch the pkCategoryid from category and pkSubCategoryid fom subcategory, so i was trying int this way
INSERT INTO [catsubcatCombination]
( [fkCategoryId] ,
[fkSubCategoryId],
[createdDate] )
select pkCategoryId from category where categoryName= [Table].[Column].value(' Value0 [1]', 'varchar(50)') ,
select pkSubCategoryId from subcategory, where subCategoryName= [Table].[Column].value(' Value1 [1]', 'varchar(50)'),
GETDATE()
but its not working means some syntax error.
Can anyone tell that how do i write this correctly.
Thanks in advance..
Niki

Hi my whole sp is below after merging the changes given by you
USE [DTestDb]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Alter PROCEDURE [dbo].[usp_SaveCsvSubCategory11] (
@xmlData XML ,
@retValue int OUTPUT
AS
BEGIN
SET @retValue=0;
INSERT INTO [tblSubcategoryCombination]
( [fkCategoryId] ,
[fkSubCategoryId],
[createdDate] )
SELECT *
FROM
SELECT [Table].[Column].value(' Value0 [1]', 'varchar(50)') AS 'Value0' ,
[Table].[Column].value(' Value1 [1]', 'varchar(50)') AS 'Value1',
GETDATE()
FROM @xmlData.nodes('/ SubCategorySkuData/SubCategorySku') AS [Table] ( [Column] )
WHERE NOT EXISTS ( SELECT distinct fkCategoryId
FROM [tblSubcategoryCombination]
WHERE fkCategoryId =(select pkCategoryId from tblCategory where categoryName= [Table].[Column].value(' Value0 [1]', 'varchar(50)'))
and fkSubCategoryId=(select pkSubCategoryId from tblSubCategory where subCategoryName= [Table].[Column].value(' Value1 [1]', 'varchar(50)')))
)t
WHERE [Value0] LIKE '%[^0-9]%'
OR [Value1] LIKE '%[^0-9]%'
IF(@@ROWCOUNT > 0)
SET @retValue=1;
END
Altering database  i am getting error
 No column name was specified for column 3 of 't'.
Niki
I didnt ask you to change ths SP
I asked you to check if there's some nonnumeric data first
that script has to be seperate
ie just this
DECLARE @XmlData XML
SET @XmlData = '<Your xml value here>'SELECT *
FROM
SELECT [Table].[Column].value(' Value0 [1]', 'varchar(50)') AS 'Value0' ,
[Table].[Column].value(' Value1 [1]', 'varchar(50)') AS 'Value1',
GETDATE()
FROM @xmlData.nodes('/ SubCategorySkuData/SubCategorySku') AS [Table] ( [Column] )
WHERE NOT EXISTS ( SELECT distinct fkCategoryId
FROM [tblSubcategoryCombination]
WHERE fkCategoryId =(select pkCategoryId from tblCategory where categoryName= [Table].[Column].value(' Value0 [1]', 'varchar(50)'))
and fkSubCategoryId=(select pkSubCategoryId from tblSubCategory where subCategoryName= [Table].[Column].value(' Value1 [1]', 'varchar(50)')))
)t
WHERE [Value0] LIKE '%[^0-9]%'
OR [Value1] LIKE '%[^0-9]%'
and see if it returns anything
If yes then your sp code will break as it cant convert them to bigint
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • How to extract a clob xml string with multiple row of table tag. in 10g

    i have a xml value like:
    <table><c1>0</c1><c2>Mr</c2><c3>abc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mrs</c2><c3>abcd</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mr</c2><c3>sabc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mrs</c2><c3>sdabc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mr</c2><c3>dabc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mr</c2><c3>adbc</c3><c4>Sharma</c4></table>
    i want to insert each of <c> value in a table with respective columns according c1,c2,c3,c4
    pls suggest me what to do
    I use extract(xml, '/table) tab but it just read first one line & return error for other

    Can you plz explain to me thisIt is because you did not provide us with a valid xml structure so I used 11g's xmlparse function to create a xmltype even with the xml not being valid (no root tag).
    With a valid xml structure I could use the xmltype constructor instead and go on the same way as before:
    SQL> select *
      from xmltable (
             'table'
             passing xmltype ('
                            <root>
                            <table><c1>0</c1><c2>Mr</c2><c3>abc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mrs</c2><c3>abcd</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mr</c2><c3>sabc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mrs</c2><c3>sdabc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mr</c2><c3>dabc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mr</c2><c3>adbc</c3><c4>Sharma</c4></table>
                            </root>').extract ('root/table')
             columns c1 number path 'c1', c2 varchar2 (4) path 'c2', c3 varchar2 (6) path 'c3', c4 varchar2 (6) path 'c4')
            C1 C2     C3        C4      
             0 Mr     abc       Sharma  
             0 Mrs    abcd      Sharma  
             0 Mr     sabc      Sharma  
             0 Mrs    sdabc     Sharma  
             0 Mr     dabc      Sharma  
             0 Mr     adbc      Sharma  
    6 rows selected.

  • Indesign library drag drop looses xml attributes of Table tag

    Hi all,
         I have created a Table with 1 row and 3 coloumns, I have text in all 3 cells. I have attaced xml tags to cell text and after that I have added attibutes to Story tag, Table tag and Text tag.  I have drag this table frame to Indesign library to save it for further use.
         When I tried to drag it back to document the Table tag attributes are missing. This is happening on Indesign CS4 Win and Mac.
    I have saved required information in the xml attributes of table tag and since its attributes are missing after drag from library I am not able to use library of Indesign.
    Is this an issue with Indesign CS4?
    -Rahul Dalvi.

    Hi All,
         I am still waitng for the reply. I have attached 2 files here, first one is the Indesign document 'TableXMLTags.indd' having a tagged table. second one is the Library file 'TableXMLtagLibrary.indl' in which I have draged table from 'TableXMLTags.indd'. When I tried to drag that table from library to any document it just loses attributes of Table tag. Here each tag has 3 attributes attached to it.
    I am using Indesign CS4 on Windows and Macintosh.
    Please let me know if there is any way to avoid tag attribute loss.
    Thanks,
    Rahul Dalvi.

  • How to delete a row of table in Word using powershell.

    I want to search for a word which is present in Table. If that word is present than I want to delete that row from table.
    Can anybody help me with that. The script I am using is:
    $objWord = New-Object -ComObject word.application
    $objWord.Visible = $True
    $objDoc = $objWord.Documents.Open("C:\temp\Recipe.docx")
    $FindText = "DP1"
    $objSelection.Find.Execute($FindText)
    $objWord.Table.Cells.EntireRow.Delete()
    $objDoc.SaveAs("C:\Temp\P.docx")
    $Doc.Close()

    Maybe try this:
    $objWord = New-Object -ComObject word.application
    $objWord.Visible = $True
    $objWord.Documents.Open("C:\temp\Recipe.docx")
    $FindText = "DP1"
    $objWord.Selection.Find.Execute($FindText) | Out-Null
    $objWord.Selection.SelectRow()
    $objWord.Selection.Cells.Delete()
    $objWord.Documents.SaveAs("C:\Temp\P.docx")
    $objWord.Close()
    $objWord.Quit()
    [System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$objWord) | Out-Null
    This definitely assumes the text you're trying to find only exists in a table, per your specified requirements.  If it exists anywhere else, or in multiple tables, the code above is inadequate.
    I hope this post has helped!

  • How to Hide Row in table view depend on condition

    Dear Friends,
    Please any one suggest how to do hide some rows in table depend on condtions.
    My Issue is :
    I have table with binding componant context controller, with in that some rows are no need to disply in my table, I tried to delete that entities from collection wrapper in do_prepare_output. but that entites are perminatly deleted from model node.
    how can achive this with out delete entities from model node and hide some rows in table view.
    thanks & Regards

    Hi Andrew,
    Please can you explain alobrate, because i wont' found that method in my implimentation and it's table config like follow
    <% IF attr->check_consistency( ) eq abap_true. %>
        <chtmlb:configTable  xml="<%= lv_xml %>"
                             id="TextList"
                             navigationMode="BYPAGE"
                             onRowSelection="select"
                             table="//Text/Table"
                             width="100%"
                             selectedRowIndex="<%=Text->SELECTED_INDEX%>"
                             selectedRowIndexTable="<%=Text->SELECTION_TAB%>"
                             selectionMode="<%=Text->SELECTION_MODE%>"
                             usage="ASSIGNMENTBLOCK"
                             visibleRowCount="3"/>
      <% ENDIF. %>
    thanks & Regards
    Ganesh

  • ADF Popup for adding a new Row in  table

    Hi All,
    I have VO which is rendering as table on my jsff.I created a button of createInsert to add a new row and after commit it saves the values in Table in DB.
    Works abst fine.
    Now i want to change this feature to that when a New Row should be Added, a pop up should appear in the format of a form, and at the click of OK it should save the data and on Cancel go back to Page.
    What i did was i added a pop up, in the pop up body i again dropped my VO as a form and added a dialoglistener to the pop up which commits on click of OK and Rollback on click of Cancel.
    I am not getting any exception but The Db is not modified with my entries.
    So its simple that i am commiting but nothing is changed till that time.
    How can i get the Task done?????
    Regards
    User

    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/77-ok-cancel-support-in-dialog-351871.pdf
    insert operation using popup
    http://andrejusb.blogspot.com/2009/11/crud-operations-in-oracle-adf-11g-table.html
    Edited by: Erp on Oct 20, 2011 6:47 AM

  • Sql query, from xml to nested table

    Hello!
    I have DB table: my_table
    It has 2 fields: file_id and file_data (it's clob with xml)
    I need to write query that returns info from xml using nested table (Oracle v.9)
    The number of rows witch will return query must be equal to number of files (file_id)
    Structure of XML:
    <?xml version = "1.0" encoding = "utf-8"?>
    <head>
    <AAA v1="a" v2="b">
    <BBB p1="1" p2="2"/>
    <BBB p1="3" p2="4"/>
    </AAA>
    <AAA v1="c" v2="d">
    <BBB p1="5" p2="6"/>
    <BBB p1="7" p2="8"/>
    <BBB p1="9" p2="0"/>
    </AAA>
    </head>
    I have query, witch works! but not optimally! each CLOB scaned 3 times - I want to scan it once!
    SELECT an.file_id,
    CAST(MULTISET(SELECT extract(VALUE(val2),'//@v1').getStringVal() v1,
    extract(VALUE(val2),'//@v2').getStringVal() v2,
    CAST(MULTISET(SELECT extract(VALUE(val3),'//@p1').getStringVal() p1,
    extract(VALUE(val3),'//@p2').getStringVal() p2,
    FROM TABLE (XMLSEQUENCE(XMLTYPE(an.file_data).EXTRACT('/head/AAA/BBB[../@v1='||extract(VALUE(val2),'//@v1').getStringVal()||']'))) val3) AS T_VAL3) info
    FROM TABLE (XMLSEQUENCE(XMLTYPE(an.file_data).EXTRACT('/head/AAA'))) val2) AS T_VAL2) head
    FROM (SELECT olr.*
    FROM my_table olr,
    TABLE (XMLSEQUENCE(XMLTYPE(file_data)).EXTRACT('/head'))) val1) an
    PLEASE, help me to rewrite this query!

    I assume you're using nested objects like these to hold the result?
    create type t_val3_rec as object ( p1 number, p2 number );
    create type t_val3 as table of t_val3_rec;
    create type t_val2_rec as object ( v1 varchar2(30), v2 varchar2(30), c1 t_val3 );
    create type t_val2 as table of t_val2_rec;
    /then this query should work :
    SELECT t.file_id
         , CAST(
             MULTISET(
               SELECT extractvalue(value(x1), '/AAA/@v1')
                    , extractvalue(value(x1), '/AAA/@v2')
                    , CAST(
                        MULTISET(
                          SELECT extractvalue(value(x2), '/BBB/@p1')
                               , extractvalue(value(x2), '/BBB/@p2')
                          FROM TABLE(XMLSequence(extract(value(x1), '/AAA/BBB'))) x2
                        AS t_val3
               FROM TABLE(XMLSequence(extract(value(x), '/head/AAA'))) x1
             AS t_val2
    FROM my_table t
       , TABLE(XMLSequence(extract(xmltype(t.file_data), '/head'))) x
    ;

  • Generate xml using FOR XML PATH from table with hierarchy

    I need to create xml from a table like:
    EL1 EL2 EL3 Attr01 Attr02 Attr03 Attr04
    E10,    ,    ,a,b,c,d
    E10,E1010,    ,a,b,c,d
    E10,E1010,E101010,a,b,c,d
    E10,E1010,E101020,a,b,c,d
    E10,E1010,E101030,a,b,c,d
    E10,E1020,    ,a,b,c,d
    E10,E1020,E102010,a,b,c,d
    E20,    ,    ,a,b,c,d
    E20,E2010,    ,a,b,c,d
    E20,E2010,E201010,a,b,c,d
    E20,E2020,    ,a,b,c,d
    E20,E2020,E202010,a,b,c,d
    E20,E2020,E202020,a,b,c,d
    The hierarchy is EL1--EL2--EL3, and the 3 columns should be elements of xml;
    The other for columns Attr01,Attr02,Attr03,Attr04 should be attributes of xml;
    The actual table could have more than 500 rows(there are many values for El1,EL2,and EL3). 
    The expected xml should like:
    <root>
      <E10 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
        <E1010 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
          <E101010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
          <E101020 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
          <E101030 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
        </E1010>
        <E1020 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
          <E102010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
        </E1020>
      </E10>
      <E20 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
        <E2010 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
          <E201010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
        </E2010>
        <E2020 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
          <E202010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
          <E202020 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
        </E2020>
      </E20>
    </root>
    I create a sample Src table:
    CREATE TABLE Src
    EL1 VARCHAR(10),
    EL2 VARCHAR(10),
    EL3 VARCHAR(10),
    Attr01 VARCHAR(10),
    Attr02 VARCHAR(10),
    Attr03 VARCHAR(10),
    Attr04 VARCHAR(10)
    GO
    INSERT INTO Src
    (EL1,EL2,EL3,Attr01,Attr02,Attr03,Attr04
     SELECT 'E10','','','a','b','c','d'
     UNION SELECT 'E10','E1010','','a','b','c','d'
     UNION SELECT 'E10','E1010','E101010','a','b','c','d'
     UNION SELECT 'E10','E1010','E101020','a','b','c','d'
     UNION SELECT 'E10','E1010','E101030','a','b','c','d'
     UNION SELECT 'E10','E1020','','a','b','c','d'
     UNION SELECT 'E10','E1020','E102010','a','b','c','d'
     UNION SELECT 'E20','','','a','b','c','d'
     UNION SELECT 'E20','E2010','','a','b','c','d'
     UNION SELECT 'E20','E2010','E201010','a','b','c','d'
     UNION SELECT 'E20','E2020','','a','b','c','d'
     UNION SELECT 'E20','E2020','E202010','a','b','c','d'
     UNION SELECT 'E20','E2020','E202020','a','b','c','d'
    GO
    I tried to use FOR XML PATH to generate xml for the sample data. When the records increase to a few hundreds, it's not a good idea.
    Here is my script:
    SELECT
    (SELECT Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E101010'
    FOR XML PATH('E101010'),TYPE
    ) AS 'node()'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E101020'
    FOR XML PATH('E101020'),TYPE
    ) AS 'node()'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E101030'
    FOR XML PATH('E101030'),TYPE
    ) AS 'node()'
    FROM Src
    WHERE EL2 = 'E1010' AND (EL1 <>'' AND EL3 ='')
    FOR XML PATH('E1010'),TYPE
    ) AS 'node()'--1010
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E102010'
    FOR XML PATH('E102010'),TYPE
    ) AS 'node()'
    FROM Src
    WHERE EL2 = 'E1020' AND (EL1 <>'' AND EL3 ='')
    FOR XML PATH('E1020'),TYPE
    ) AS 'node()'--1020
    FROM Src
    WHERE EL1 = 'E10' AND (EL2 ='' AND EL3 ='')
    FOR XML PATH('E10'),TYPE) 'node()'
    ,(SELECT Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E201010'
    FOR XML PATH('E201010'),TYPE
    ) AS 'node()'
    FROM Src
    WHERE EL2 = 'E2010' AND (EL1 <>'' AND EL3 ='')
    FOR XML PATH('E2010'),TYPE
    ) AS 'node()'--2010
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E202010'
    FOR XML PATH('E202010'),TYPE
    ) AS 'node()'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E202020'
    FOR XML PATH('E202020'),TYPE
    ) AS 'node()'
    FROM Src
    WHERE EL2 = 'E2020' AND (EL1 <>'' AND EL3 ='')
    FOR XML PATH('E2020'),TYPE
    FROM Src
    WHERE EL1 = 'E20' AND (EL2 ='' AND EL3 ='')
    FOR XML PATH('E20'),TYPE) AS 'node()'
    FOR XML PATH(''),ROOT('root')
    If I get a few hundreds of rows, how huge the script should be. Does anyone have better solution for this? Thanks.
    Tao

    wBob,
    Thanks! And sorry for late feedback.
    The XSD requires the xml structures like the following
    <Schools>
    <School01>Some school</School01>
    <School02>Some other school</School02>
    </Schools>
    I have to use the number in the element name. 
    Right now I just use the nested FOR XML PATH, although I have to write thousand lines code.
    Thanks anyway.
    Tao
    Tao

  • To Update rows in Table in OA Framework

    Hi All,
    I have one requirement to update the table.
    For the first time when User opens the form, nothing is stored in database for the user id.
    He opens the form and enter 5 rows and click on save button.So 5 rows get inserted in database. Each record is having unique key which is also the primary key.
    Now user relogin, this time initially inserted 5 records should be displayed and editable by user. Also he should be able to insert new row with unique key.
    After editing, when he again clicks on "Save" button, edted record should get saved in table with same unique key.
    How to achieve this.
    I am able to insert rows in table for the first time. I am not getting how rows will get updated with same unique row. And at the same user should be able to add new row also.
    As for unique row, I am using a sequence which is autoincremented for each row insertion..
    Please can anyone help me in this regard
    Thanks in Advance

    Hi Tapashray,
    Thanks for help..
    My requirement is same as what you said...
    Lets say I have one table with column as Emp_id, emp_name,address, phone_no.
    Emp_id is sequence which is auto incremented each time a row is added in table.
    Other fields are user enterable.
    Say for ex Manager logs in and create 4 employees for which emp_id auto generated as 1,2,3,4.
    He has entered other details through screen. When he clicks on "Save" buton, all details get saved in database.
    Now when he logs in again, he should be able to see all details of 4 employees and details should be editable.
    Now suppose he change the emp_name column of first employee with emp_id =1 and clicks on "Save" button, then a row in database should get update with same emp_id =1.
    Also on the screen, he should be able to create new employees with new and next emp_id.
    Hope you got my requirment.

  • Problems encountered while inputting XML to DB tables

    Hi,
    I tried to use Ms-access DB to convert XML to DB tables (samp10.java). The errors I get is given below. I have configured the drivers & DB connection correctly as I do not have any problems getting from the DB to XML. Can someone please help me out ?
    Thanks.
    -Patil
    C:\xml-parsers\OracleXSQL\xml-sql\OracleXSU\sample>java samp10
    oracle.xml.sql.OracleXMLSQLException: [Microsoft][ODBC Microsoft Access Driver]
    Too few parameters. Expected 1.
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:377)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:276)
    at samp10.main(samp10.java:30)
    null

    To insert rows into a table, you have to
    use Oracle's JDBC drivers.
    Unfortunately, it doesn't work with Access.

  • Tigger to automatically save deleted row(s)

    How can I create trigger that saves the row(s) to be deleted in some other table???

    Hi,
    As always, RTFM...
    Yoann.

  • Updating certain rows of table by external file??

    Hello gentlemen,
    I need your help.I have a very large table.I need to update certain rows of table every day(around 200 per day)
    I would like by using an external file (.csv or .txt) to update certain column on the 200 rows i have in the external file.
    Can this be done?Do i need to write down a pl/sql procedure?Please help.I am a newbie to pl/sql but it will save me much time every day if i manage to do this.
    Thank you in advance for your help.

    I made a first attempt to create the external table from a .txt file.
    I used the below:
    CREATE TABLE pol_test
    (STATUS VARCHAR2(30 CHAR),
    ASFAL VARCHAR2(20 CHAR)
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY def_dir1
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY STRING
    FIELDS (STATUS VARCHAR2(30 CHAR),
    ASFAL VARCHAR2(20 CHAR)
    LOCATION ('C:\Users\t.christopoulos\Desktop\TEST.TXT')
    I get the below error :
    Error report:
    SQL Error: ORA-06564: object DEF_DIR1 does not exist
    06564. 00000 - "object %s does not exist"
    *Cause:    The named object could not be found.  Either it does not exist
    or you do not have permission to access it.
    *Action:   Create the object or get permission to access it.
    I suppose that it goes to create the directory on the server where i dont have access.I run these commands from my desktop using SQL developer.

  • 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

  • How to save xml output of fm into sap as xml

    how to save xml output of fm into sap as xml
    thank you,
    regards,
    Jagrut bharatkumar shukla

    Hi Jagrut
    The XML document can be stored in an ABAP variable rxml of the type STRING or XSTRING, or in an internal standard table sxml of the elementary line type C. Hence, I believe, your issue with the lenght can be resovled with this types.
    For rxml, you specify an interface reference variable of the type IF_IXML_OSTREAM that points to an IXML output stream.
    For rxml, you specify an interface reference variable of the type IF_IXML_DOCUMENT that points to an IXML document.
    With the stream factory you have several options. Before you call your CALL TRANSFORMATION, you setup your stream factory for these different options.
    1. You want to write the file to the application server file system. You want to create your OSTREAM as a binary string. In this example b_xml is an empty binary string. OSTEAM will be the reference variable of tyep IF_IXML_OSTREAM.
    ostream =
    streamfactory->create_ostream_xstring( b_xml ).
    You get the output lenght with the following:
    ressize = ostream->get_num_written_raw( ).
    You can then send the entire string to the file system with the following:
    transfer b_xml to filename1 length ressize.
    Also refer to this weblog:
    /people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1
    Regards
    Ravish Garg
    <b>
    *Remember reward points is the best way to say thank you :)</b>

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

Maybe you are looking for

  • Help with s-l-o-w-w-w-w-w  Windows file sharing

    After much hair-pulling, I finally got windows file sharing working on our 10.4.4 xserve (opening up ports 137-139 helped a lot!) - however I have noticed that directory navigation from the PC's are extremely slow... it takes about 25-30 seconds to n

  • Partitioning Hard Drive for Use with Mac (Time Machine) and Windows

    I have a brand new Imac on which I am also running WIndows Vista through Boot Camp (sweet, by the way). I have a large external hard drive on which I set up Time Machine easily enough. I would like to partition the drive somehow so that I could use h

  • Will URLS (Unified light speed) improves the current app. perf. as well ?

    Hi, We are using ABAP webdynpro application that encapsulates Interactive PDF as well. But it's performance is not good. Normally it takes 30-50 seconds when user opens the workitem from UWL which further calls the webdynpro application and shows the

  • Can't synch iPhone with iPhoto

    I've been trying to sync the pictures on my iPhone with iPhoto but I keep getting a pop-up message that says:m"Photos are being imported to the photo library. Please wait while import is complete. " Unfortunately nothing else happens....I can't updat

  • C 3-01, heated while charging

    I bought Nokia C3-01 few days ago. It is good combination touch and type. But I am facing problem that when I plugin charger, it start heating.  Please, Nokia, keep in note this problem for next software update. Nokia C3-01 S/W V5.65 RM-640 MEA-7