Issues in inserting record in the Oracle table from BizTalk
HI ,
I am getting some problem in the fields of types FLOAT or NUMBER type in the oracle table. while inserting data from BizTalk it is showing that the field value is invalid. as per shown below
The adapter failed to transmit message going to send port "Sp_ImpexIntegration_AX_Profile_Impex" with URL "oracledb://spj1/". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException:
The value for field "ACTUALWEIGHT_LASTDIE" is invalid. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: numStr
at Oracle.DataAccess.Types.OracleDecimal..ctor(String numStr, String format)
at Microsoft.Adapters.OracleCommon.OracleCommonMetadataUtils.CreateParameterValue(OracleDbType oracleType, Object xmlValue, OracleConnection dbConn, Boolean ignoreLOB, String fieldName)
--- End of inner exception stack trace ---
Server stack trace:
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
Please suggest.
Regards,
Gyan
Hi Gyan,
The error reads The value for field "ACTUALWEIGHT_LASTDIE" is invalid. Value cannot be null.
You need to ensure below things:
1) Ensure that all the columns in the oracle table allow NULL.
2) The field which is getting the error should have property Nillable set to True and Min Occurs = 0.
3) You also need to configure your WCF_Oracle adapter properly i.e. SOAP Action (see for instance this
thread).
Why SOAP Action?
If you used the default bindings which were created when generating your schema, they are usually created wrapped within an operation.
Unless the send port within your orchestration's operation matches the same name as the enclosing operation tag in the "SOAP action header" sending messages using the default setting will fail.
So to ensure that your send port works just supply a URL for the "SOAP action header" setting.
Rachit
Please mark as answer or vote as helpful if my reply does
Similar Messages
-
How to insert record inside the internal table in below code
Hi all,
My requirement is to find the sub-total and need to insert in between the internal table.
You can see the output ....where I want the sub-total F2 when 1 & 2 combindely , 3 , 4& 5 combindely .Please check it and let me know is it possible
when i am using modification it is not creating extra row inside the table instead it is modifying one row and putting the total there.
For ex: the origianl output is
F1 F2 F3
A 1 1
B 1 1
F 2 1
D 3 1
E 4 1
C 5 1
We want to display all the total of f2 of 1-2 , 3 , 4-5
so expcected output is
F1 F2 F3
A 1 1
B 1 1
F 2 1
* 3 ->This is the sub-total of 1& 2 of f2
D 3 1
* 1 ->this is the sub-total of 3
E 4 1
C 5 1
* 2 -> this is the sub-total of 4 & 5
= space
But coming output is
A 1 1
B 1 1
* 3 -> it is modifying the F row and inserting the total .Total is comong correct but is shoule insert instead of modifying the record!!
* 1
E 4 1
* 2
Please help how to insert the row total at the end of the chage of field
Please find the below code ..Due to space problem i am attaching below
SasHere is the solution ....i Got the answer Thanks for your helping hands friends
REPORT YTEST_MODIFY.
DATA: BEGIN OF ITAB OCCURS 1,
TOT TYPE C,
F1 TYPE C,
F2 TYPE C,
F3 TYPE I ,
END OF ITAB.
DATA: BEGIN OF JTAB OCCURS 1,
F1 TYPE C,
F2 TYPE C,
F3 TYPE I ,
END OF JTAB.
START-OF-SELECTION.
ITAB-F1 = 'A'.
ITAB-F2 = 1.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'B'.
ITAB-F2 = 1.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'C'.
ITAB-F2 = 5.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'D'.
ITAB-F2 = 3.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'E'.
ITAB-F2 = 4.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'F'.
ITAB-F2 = 2.
ITAB-F3 = 1.
APPEND ITAB.
SORT ITAB BY F2.
LOOP AT ITAB.
WRITE:/1 ITAB-F1 ,
8 ITAB-F2 ,
10 ITAB-F3 .
ENDLOOP.
LOOP AT ITAB.
IF ITAB-F2 = 1 OR ITAB-F2 = 2.
ITAB-TOT = 1.
MODIFY ITAB.
ELSEIF ITAB-F2 = 3.
ITAB-TOT = 3.
MODIFY ITAB.
ELSEIF ITAB-F2 = 4 OR ITAB-F2 = 5.
ITAB-TOT = 4.
MODIFY ITAB.
ENDIF.
ENDLOOP.
SKIP 2.
SORT ITAB BY TOT.
DATA : L_SUM(2) TYPE C,
L_ROW(2) TYPE C.
LOOP AT ITAB.
MOVE-CORRESPONDING ITAB TO JTAB.
APPEND JTAB.
L_SUM = L_SUM + ITAB-F3 .
AT END OF TOT.
CLEAR JTAB.
JTAB-F3 = L_SUM .
APPEND JTAB.
CLEAR L_SUM.
ENDAT.
ENDLOOP.
LOOP AT JTAB.
WRITE:/1 JTAB-F1 ,
8 JTAB-F2 ,
10 JTAB-F3 .
ENDLOOP.
* DATA: a TYPE i , b .
* LOOP AT itab.
* IF b = 0.
* a = a + itab-f3.
* ENDIF.
* AT END OF tot.
* MOVE space TO itab-f1.
* MOVE space TO itab-f2.
* MOVE a TO itab-f3.
* MODIFY itab .
* CLEAR a.
* b = 1.
* ENDAT.
* b = 0.
* ENDLOOP.
* LOOP AT itab.
* MOVE-CORRESPONDING itab TO jtab.
* APPEND jtab.
* ENDLOOP.
* ULINE.
* LOOP AT jtab.
* WRITE: / jtab-f1 , jtab-f2 , jtab-f3.
* ENDLOOP. -
How to insert a record in to oracle table from Java which has a oracle LONG Field?
The problem is only 80 char's inserted in to the LONG FIELD which happend to me when i run the same insert statement from SQL plus.
Here is the code....
java.io.File inputFile = new java.io.File("input.txt");
int inputFileLen = (int) inputFile.length();
java.io.InputStream ipStream = new java.io.FileInputStream(inputFile);
System.out.println(inputFileLen);
PreparedStatement myStmt = conn.prepareStatement("insert into LONG_EXAMPLE (notes,name)values(?,?)");
myStmt.setAsciiStream(1, ipStream, inputFileLen);
myStmt.setString(2,"Steve");
int res = myStmt.executeUpdate();
myStmt.close();
Note : Here the size of the input.txt 250 bytes , 1KB.
Thanks in advance......:-)
Cheers,
Vetri !Hien
I had a similar requirement to you and put the code on a push button. In my case the reports are being run interactively to the screen and then printed, and I have no way to know whether the report had actually been printed, so we rely on the user pressing the button. Of course there is a danger that the user forgets to press the button, but in our situation that would not be disasterous. Whatever method is used, I don't think there is any way to be sure that it has actually come out of the printer. -
Add records to the physical table from Internal table
Hello,
I am trying to insert the records from IT table to physical table. But, its not inserting. Please let me know how do I add the records to the table zebp_iv_cf_log.
I have used only few fields for example *
After looping I get about 800 records in it_non_ebp tab *
loop at non_ebp_inv.
it_non_ebp-zspgrv = non_ebp_inv-spgrv.
it_non_ebp-zspgrq = non_ebp_inv-spgrq.
it_non_ebp-zspgrs = non_ebp_inv-spgrs.
it_non_ebp-inv_ref_num = non_ebp_inv-xblnr.
it_non_ebp-zspgrc = non_ebp_inv-spgrc.
it_non_ebp-zlifnr = non_ebp_inv-lifnr.
append it_non_ebp.
endloop.
insert zebp_iv_cf_log from table it_non_ebp[] accepting duplicate keys .
I also tried inserting one by one by putting insert syntex within a loop but, it takes keeps processing.
Shall appreciate the response.
Thks & Rgds,
Hemal
Edited by: hemalgandhi on Jun 12, 2009 6:27 PMHi,
for the internal table you are using for appending , you must declare it with the header line option
as
data it_non_ebp type table of zebp_iv_cf_log with HEADER LINE.
or else you can have a separate workarea of type zebp_iv_cf_log
as
data wa_zebp_iv_cf_log type zebp_iv_cf_log.
then the code should be like :
loop at non_ebp_inv.
wa_zebp_iv_cf_log -zspgrv = non_ebp_inv-spgrv.
wa_zebp_iv_cf_log -zspgrq = non_ebp_inv-spgrq.
wa_zebp_iv_cf_log -zspgrs = non_ebp_inv-spgrs.
wa_zebp_iv_cf_log -inv_ref_num = non_ebp_inv-xblnr.
wa_zebp_iv_cf_log -zspgrc = non_ebp_inv-spgrc.
wa_zebp_iv_cf_log -zlifnr = non_ebp_inv-lifnr.
append wa_zebp_iv_cf_log to it_non_ebp.
clear wa_zebp_iv_cf_log .
endloop.
and use
modify zebp_iv_cf_log from table it_non_ebp accepting duplicate keys .
instead of
insert zebp_iv_cf_log from table it_non_ebp[] accepting duplicate keys .
Please try out and let me know of you face any problem -
How to find last inserted record in the table.
Version: Oracle 10g
I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
How to find last inserted record in the table "Manufacture".
As i come to know that Rowid is not result perfect results. Please provide your inputs.user13416294 wrote:
Version: Oracle 10gThat is not a version. That is a product name. A version is 10.1.0.2 or 10.2.0.4, etc.
I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
How to find last inserted record in the table "Manufacture".Not possible as your data model does not cater for it. That simple.
If there is a need to determine some order or associate some time to an entity, then that should be part of the data model - and a relationship, or one or more attributes are needed to represent that information. Thus your data model in this case is unable to meet your requirements.
If the requirements are valid, fix the data model. In other words - your question has nothing to do with Oracle and nothing to do with rowid, rowscn or other pseudo columns in Oracle. It is a pure data modeling issue. Nothing more. -
Inserting one table records to the another table
Hi There
Though i don't close the Result set , My program throws the following Exception
java.sql.SQLException: ResultSet is ClosedBecause of this my program Inserts only one record in the another table
My code is this
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.DefaultComboBoxModel.*;
import javax.swing.table.*;
import java.sql.*;
import java.util.*;
public class SearchBook extends JDialog implements ActionListener
private JComboBox comboCategory,comboAuthor;
private JSplitPane splitpane;
private JTable table;
private JToolBar toolBar;
private JButton btnclose, btncancel;
private JPanel panel1,panel2,panel3,panel4;
private JLabel lblCategory,lblAuthor;
private Container c;
//DefaultTableModel model;
Statement st;
ResultSet rs;
Vector v = new Vector();
public SearchBook (Connection con)
// Property for JDialog
setTitle("Search Books");
setLocation(40,110);
setModal(true);
setSize(750,450);
// Creating ToolBar Button
btnclose = new JButton(new ImageIcon("Images/export.gif"));
btnclose.addActionListener(this);
// Creating Tool Bar
toolBar = new JToolBar();
toolBar.add(btnclose);
try
st=con.createStatement();
rs =st.executeQuery("SELECT BCat from Books Group By Books.BCat");
while(rs.next())
v.add(rs.getString(1));
catch(SQLException ex)
System.out.println("Error");
panel1= new JPanel();
panel1.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.HORIZONTAL;
lblCategory = new JLabel("Category:");
lblCategory.setHorizontalAlignment (JTextField.CENTER);
c.gridx=2;
c.gridy=2;
panel1.add(lblCategory,c);
comboCategory = new JComboBox(v);
comboCategory.addActionListener(this);
c.ipadx=20;
c.gridx=3;
c.gridwidth=1;
c.gridy=2;
panel1.add(comboCategory,c);
lblAuthor = new JLabel("Author/Publisher:");
c.gridwidth=2;
c.gridx=1;
c.gridy=4;
panel1.add(lblAuthor,c);
lblAuthor.setHorizontalAlignment (JTextField.LEFT);
comboAuthor = new JComboBox();
comboAuthor.addActionListener(this);
c.insets= new Insets(20,0,0,0);
c.ipadx=20;
c.gridx=3;
c.gridy=4;
panel1.add(comboAuthor,c);
comboAuthor.setBounds (125, 165, 175, 25);
table = new JTable();
JScrollPane scrollpane = new JScrollPane(table);
//panel2 = new JPanel();
//panel2.add(scrollpane);
splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panel1,scrollpane);
splitpane.setDividerSize(15);
splitpane.setDividerLocation(190);
getContentPane().add(toolBar,BorderLayout.NORTH);
getContentPane().add(splitpane);
public void actionPerformed(ActionEvent ae)
Object obj= ae.getSource();
if(obj==comboCategory)
String selecteditem = (String)comboCategory.getSelectedItem();
displayAuthor(selecteditem);
System.out.println("Selected Item"+selecteditem);
else if(obj==btnclose)
dispose();
else if(obj==comboAuthor)
String selecteditem1 = (String)comboAuthor.getSelectedItem();
displayavailablity(selecteditem1);
//System.out.println("Selected Item"+selecteditem1);
System.out.println("Selected Author"+selecteditem1);
private void displayAuthor(String selecteditem)
try
{ Vector data = new Vector();
rs= st.executeQuery("SELECT BAuthorandPublisher FROM Books where BCat='" + selecteditem + "' Group By Books.BAuthorandPublisher");
System.out.println("Executing");
while(rs.next())
data.add(rs.getString(1));
//((DefaultComboBoxModel)comboAuthor.getModel()).setVectorData(data);
comboAuthor.setModel(new DefaultComboBoxModel(data));
//rs.close();
catch(SQLException ex)
System.out.println("ERROR");
private void displayavailablity(String selecteditem1)
try
Vector columnNames = new Vector();
Vector data1 = new Vector();
String bname,bauthor,bcategory,bref1,bavail,bid;
int bref,mid,num;
rs = st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");
while(rs.next())
bname = rs.getString("BName");
bauthor = rs.getString("BAuthorandPublisher");
bcategory = rs.getString("BCat");
bref = rs.getInt("BRef");
if(bref==1)bref1="Yes";
else bref1 = "No";
mid = rs.getInt("Mid");
if(mid==0)bavail="Available";
else bavail="Issued To:"+mid;
bid = rs.getString("BId");
System.out.println("Book Name is::"+bname);
System.out.println("Book Availabilty::"+bavail);
num = st.executeUpdate("insert into BSearch Values('"+bid+"','"+bname+"','"+bcategory+"','"+bauthor+"','"+bavail+"','"+bref1+",')");
System.out.println("Inseted in the table");
/**ResultSetMetaData md= rs.getMetaData();
int columns =md.getColumnCount();
String booktblheading[]={"Book ID","Book NAME","BOOK AUTHOR/PUBLISHER","REFRENCE","CATEGORY"};
for(int i=1; i<= booktblheading.length;i++)
columnNames.addElement(booktblheading[i-1]);
while(rs.next())
Vector row = new Vector(columns);
for(int i=1;i<=columns;i++)
row.addElement(rs.getObject(i));
data1.addElement(row);
//System.out.println("data is:"+data);
((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
//DefaultTableModel model = new DefaultTableModel(data1,columnNames);
//table.setModel(model);
//rs.close();
//st.close(); */
catch(SQLException ex)
ex.printStackTrace();
}Please help me Friends. I am very new to java. otherwise give me some suggestion to implement this idea in effective manner.
Thank you for your service
CheersHi
Here i am Posting My programs code
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.DefaultComboBoxModel.*;
import javax.swing.table.*;
import java.sql.*;
import java.util.*;
public class SearchBook extends JDialog implements ActionListener
private JComboBox comboCategory,comboAuthor;
private JSplitPane splitpane;
private JTable table;
private JToolBar toolBar;
private JButton btnclose, btncancel;
private JPanel panel1,panel2,panel3,panel4;
private JLabel lblCategory,lblAuthor;
private Container c;
//DefaultTableModel model;
Statement st,st1;
ResultSet rs,rs1,rs2;
Vector v = new Vector();
public SearchBook (Connection con)
// Property for JDialog
setTitle("Search Books");
setLocation(40,110);
setModal(true);
setSize(750,450);
// Creating ToolBar Button
btnclose = new JButton(new ImageIcon("Images/export.gif"));
btnclose.addActionListener(this);
// Creating Tool Bar
toolBar = new JToolBar();
toolBar.add(btnclose);
try
st=con.createStatement();
rs =st.executeQuery("SELECT BCat from Books Group By Books.BCat");
while(rs.next())
v.add(rs.getString(1));
catch(SQLException ex)
System.out.println("Error");
panel1= new JPanel();
panel1.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.HORIZONTAL;
lblCategory = new JLabel("Category:");
lblCategory.setHorizontalAlignment (JTextField.CENTER);
c.gridx=2;
c.gridy=2;
panel1.add(lblCategory,c);
comboCategory = new JComboBox(v);
comboCategory.addActionListener(this);
c.ipadx=20;
c.gridx=3;
c.gridwidth=1;
c.gridy=2;
panel1.add(comboCategory,c);
lblAuthor = new JLabel("Author/Publisher:");
c.gridwidth=2;
c.gridx=1;
c.gridy=4;
panel1.add(lblAuthor,c);
lblAuthor.setHorizontalAlignment (JTextField.LEFT);
comboAuthor = new JComboBox();
comboAuthor.addActionListener(this);
c.insets= new Insets(20,0,0,0);
c.ipadx=20;
c.gridx=3;
c.gridy=4;
panel1.add(comboAuthor,c);
comboAuthor.setBounds (125, 165, 175, 25);
table = new JTable();
JScrollPane scrollpane = new JScrollPane(table);
//panel2 = new JPanel();
//panel2.add(scrollpane);
splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panel1,scrollpane);
splitpane.setDividerSize(15);
splitpane.setDividerLocation(190);
getContentPane().add(toolBar,BorderLayout.NORTH);
getContentPane().add(splitpane);
public void actionPerformed(ActionEvent ae)
Object obj= ae.getSource();
if(obj==comboCategory)
String selecteditem = (String)comboCategory.getSelectedItem();
displayAuthor(selecteditem);
System.out.println("Selected Item"+selecteditem);
else if(obj==btnclose)
dispose();
else if(obj==comboAuthor)
String selecteditem1 = (String)comboAuthor.getSelectedItem();
displayavailablity(selecteditem1);
//System.out.println("Selected Item"+selecteditem1);
System.out.println("Selected Author"+selecteditem1);
private void displayAuthor(String selecteditem)
try
{ Vector data = new Vector();
rs1= st.executeQuery("SELECT BAuthorandPublisher FROM Books where BCat='" + selecteditem + "' Group By Books.BAuthorandPublisher");
System.out.println("Executing");
while(rs1.next())
data.add(rs1.getString(1));
//((DefaultComboBoxModel)comboAuthor.getModel()).setVectorData(data);
comboAuthor.setModel(new DefaultComboBoxModel(data));
catch(SQLException ex)
System.out.println("ERROR");
private void displayavailablity(String selecteditem1)
try
Vector columnNames = new Vector();
Vector data1 = new Vector();
String bname,bauthor,bcategory,bref1,bavail,bid;
int bref,mid,num;
//rs2.Open();
rs = st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");
boolean tr=true;
while(rs.next())
if(true)
bname = rs.getString("BName");
bauthor = rs.getString("BAuthorandPublisher");
bcategory = rs.getString("BCat");
bref = rs.getInt("BRef");
if(bref==1)bref1="Yes";
else bref1 = "No";
mid = rs.getInt("Mid");
if(mid==0)bavail="Available";
else bavail="Issued To:"+mid;
bid = rs.getString("BId");
System.out.println("Book Name is::"+bname);
System.out.println("Book Availabilty::"+bavail);
num = st1.executeUpdate("insert into BSearch Values('"+bid+"','"+bname+"','"+bcategory+"','"+bauthor+"','"+bavail+"','"+bref1+",')");
System.out.println("Inseted in the table");
catch(SQLException ex)
ex.printStackTrace();
}Thank you for your service -
FTP adapter Batching is not inserting records in to multiple tables
Hi,
Env : 11.1.1.5
We have a scenario where we are reading file with the FTP adapter. As the file can be huge, we are using batching option with a batch size of 2000 records. The records in the file is in the Order and Lines format. In Bpel i am inserting those records in database. I have one Db adapter having two tables Orders and lines with a 1:M relation.
Now in the positive test case scenario, Bpel is able to read the file , split it in to batches and successfully inserts the records in the tables (Orders and Lines).
Now when i am testing a negative test case, i have violated the Primary key constraint in one of the record. Now ideally the batch which encountered the issue and failed, none of the records should get inserted in the Orders and Lines table, but that is not happening. In our case, no records are getting inserted to the lines table (which is as expected) but few records are getting inserted in to the Order table of the failed batch.
F.Y.I : Number of Records in the batch can be less then Batch Size.
Any clue on this?
Thanks.Hi Jaap,
thanks for your reply...
Sorry for being a little unclear ...
I have followed the instrunctions in the on-line help of OWB , and :
1) have imported four code tables into a source module . The tables are in an Oracle RDBMS 10g .
2)I have created manually a table - using the OWB client tool - which consisted of some of the columns found in the four tables .
3)I have inserted a Join Operator in order to correlate the four table columns with the columns of the target module.
4)I have defined the Join condition of the the four table columns. In my first post , unintenionally I have written that I removed the Join Operator. I meant the Join Condition in order to make sure that the join condition isn't the reason that the records are not inserted....
5)I have validated and generated the mapping without any errors - not even warnings.
6)I have selected Project->Deployment Manager and I selected the OWB_RUN user - which is the Runtime Repository owner.
7)I have selected the objects to deploy - the mapping , the one table I created in the target module. The deployment has succedded , and the table was created but no records are found in it.
Now , is there a possibility that this problem is caused by absence of the privileges to insert the rows...?
How can I check that the source tables are filled on the registered location of your source module?
Another basic question...
I have created a Runtime Repository owner - called owb_run- using the Runtime Repository Assistant . I use this user in order to deploy the mapping and the new table. I want -and it is created- that table in another schema (user his_dw) - even another database in the same server. Should I run the Runtime Repository owner in this schema (his_dw)???
Thanks , again a lot
Simon -
Issue of inserting greek characters into Oracle database using ICAN505
Hi All,
We are currently facing an issue of inserting greek characters into Oracle database using ICAN505.
We receive a file containing greek characters.The values from the file should be inserted into the database.We are reading the file using file OTD with default encoding.
The file can contain english characters too other than greek characters.
The database NLS_CHARACTERSET is AL32UTF8.
When I insert using an insert statement directly ,the values get inserted properly into the DB table.
Inserting the same values using code results in improper characters getting inserted into the table in the database.
Please help....
Thanks in advance !!Globalization forum?
Globalization Support
It works for SQL Developer, which does not depend on NLS_LANG, so I suspect a problem with your NLS settings. -
Insert XML data into oracle table
I want to insert xml data returned by the VB code into oracle table.
As a prequisite I have installed the XDK capabilities for Oracle by installing JServer & running
SQL scripts catxsu.sql,xmlparserv2.jar,load.sql to load the XMLSQL Utility (DBMS_XMLQuery) into the database.
I have also granted following privileges to the user.
Grant users access to XMLParser and XMLDom packages:
grant execute on xmldom to public;
grant execute on xmlparser to public;
create public synonym xmldom for sys.xmldom;
create public synonym xmlparser for sys.xmlparser;
But still i am not able to create procedure which will accept input parameter as an XML document coming from front end which in turn will insert that record into simple oracle table . I am using Oracle 8.1.7
Thanks in advanceWould you specify the database version?
Since DBMS_XMLSave requires DOM, you normally need to divide the huge XML before insertion. -
How to process each records in the derived table which i created using cte table using sql server
I want to process each row from the CTE table I created, how can I traverse from first row to second row and so on....
how to process each records in the derived table which i created using cte table using sql serverIdeally you would be doing a set based processing rather than traversing row by row as thats more efficient. To answer it specific to your scenario we may need more info. Can you explain with some sample data your exact requirement?
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
How to insert records in user defined tables through DI Server API
Hi All,
I have created a UDO using some userdefined tables .I am able to insert records in the user defined tables using DI API but problem is that now I want to insert records in those tables using DI Server API but I dont know how to do that please give me some way to do that
Thanks and Regards
UtpalThe AddObject message is :
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<SessionID>...</SessionID>
</env:Header>
<env:Body>
<dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS">
<BOM>
<BO>
<AdmInfo>
<Object>...</Object>
</AdmInfo>
</BO>
</BOM>
</dis:AddObject>
</env:Body>
</env:Envelope>
How to use it with a user defined table ? -
@Inserting Records in an Internal Table
Hi,
How can I Insert records in an internal table..such that i can insert the records somewhere in the middle based on the entry in a field?INSERT wa INTO TABLE itab INDEX idx .
Effect
This variant can only be used for standard tables and sorted tables. Each line line_spec to be inserted into the line before the table index idx and the table index of the following lines is increased by one. A data object of the type i is expected for idx.
If idx contains a value equal to the number of the existing table lines plus one, the new line is appended as the last line in the internal table. If idx contains a greater value, no line is inserted and sy-subrc is set to 4.
An exception that cannot be handled is raised when:
idx contains a value less than or equal to 0
A line to be inserted would cause a duplicate entry in tables with a unique table key
A line to be inserted would disrupt the sort order of sorted tables
Within a LOOP loop, you can omit the addition INDEX. Each line to be inserted is inserted before the current table line of the LOOP loop. However, if the current line is deleted in the same loop pass, the response is undefined. -
Duplicate records in the same table
Hello.
I want to duplicate records in the same table, changing just two date fields and id. Id is changed with sequence.
Example:
id name start_date end_date
1 record_1 01.01.04 31.12.04
2 record_2 01.01.03 31.12.03
I want to duplicate record with the start_date year 04 and the duplicated record would change that start_date into year 05.
After duplicate it should look like:
1 record_1 01.01.04 31.12.04
2 record_2 01.01.03 31.12.03
3 record_1 01.01.05 31.12.05
How should my insert look like?
Thankscreate sequence A_SEQ
start with 3
nocache
insert into tableA
(ID, name, start_date end_date)
select
A_SEQ.nextval
,NAME
,start_date + add_months (12)
,end_date + add_months (12)
from
tableA
where
start_date >= to_date('01.01.2004','dd.mm.yyyy')
and start_date <= to_date('01.01.2004','dd.mm.yyyy') -
Unable to find the deleted record in the child table
Hi,
I have two tables and a trigger:
CREATE TABLE parent (a INTEGER, b CHAR(10));
CREATE TABLE child (c CHAR(10), d INTEGER);
CREATE TRIGGER parent_trigger
AFTER INSERT OR DELETE OR UPDATE ON parent
REFERENCING NEW AS newRow
FOR EACH ROW
BEGIN
INSERT INTO child VALUES(:newRow.b, :newRow.a);
END parent_trigger;
Now my point is , after insertion or updation of the records in the parent table, the records are created successfully in child table...
BUT.. on deleting a record the record is deleted successfully from parent table..but the record is not displayed in the child table.
SQL> delete from parent where A=2;
1 row deleted.
SQL> select * from parent;
no rows selected
SQL> set feedback on
SQL> select * from child;
C D
a 1
a 2
3 rows selected.
Please help.What's the value of :NEW variables after deletion? NULL! What gets inserted into your child table? You guess it... :)
-
Can I use APEX directly read/sync with the Oracle Tables ?
We have a Oracle Database to manage the design data.I am trying to setup a web-based front end using APEX to manage & monitor the parts ordering & logisitics.I want to drive the master data directly from the database without any export or data transfer ? Can I directly read or Link an Oracle tables from APEX application.
Also,once this is setup,I am looking for setting up some data entry fields to enter Purchasing & Logistics information.Hope I can achieve this using APEX !
Look forward for the appropriate response.
Thanks,
ShamTony,
Thanks & Appreciate your Quick response.
Glad that I can use the existing Oracle db schema with APEX.I am not sure if there is any information as how I can connect or link my production schema to the APEX ! I was able to import .csv files & use XL data to create some test databases & play with APEX..but,I did try to go thru most of the instructions & guides to find how to use the production oracle tables,but,could not find anything particular...Please send me a link or material info.
I suppose I can then use which ever attribute or table data that is required to build the queries ! I am planning to use the production data to build the ordering & logistics application using APEX.Assume I can create new fields & columns for parts that will be ordered & capture/record the purchasing information like Purchase order numbers/Supplier Info/Target Delivery dates etc...
- Am on very tight schedules to get this application up & running ! Is there any support team or a technical support team that I can call upon if I need any help ?
Thanks,
Sham
Maybe you are looking for
-
Use of mouse scroll wheel in Forms 6i runtime
Is there any way to make the mouse scroll wheel work in Forms 6i runtime? Does it work in some areas and not in others? Ultimately, the user would like to use the scroll wheel to navigate through rows in a block instead of dragging the scrollbar. We
-
Issue maximizing air app to fullscreen on a Mac
My code works fine for PC but on a mac the code doesn't work. Here's the code: package com.wb.thehub.control.commands import com.adobe.cairngorm.commands.ICommand; import com.adobe.cairngorm.control.CairngormEvent; import com.wb.thehub.mo
-
Can Safari Reader articles be saved and read offline?
If a web page article is viewed with Reader in Safari (iOS 5) can the full article be saved on the iPod and be available to read when no WiFi is available? If so, is it saved as .html, where is it saved to, and how do you get back to it to read?
-
Converting byte[] - String
Hi, how do I convert from byte[] to String and vice versa. Is this correct for byte[]->String ByteArrayOutputStream b = new ByteArrayOutputStream(); b.write(bytearray); String s = b.toString(); and this for String->byte? Writer out = new BufferedWrit
-
how to send a 3 minute video via email from the ipad2..I tried but it says it is too long. Is there a way to circumvent this? Or if not, how do I break it up (how ridiculous) so that I can send it?