Inserting statements in reports throgh program
Hello All,
I have a set of unused programs ( nearly 200 ). I need to deactivate all those programs by inserting EXIT as below shown in bold.
I want to write a program where i can give all the program names in the selection screen and i have to enter into those program in write mode and insert the statement EXIT.
COULD YOU PLEASE GIVE ME SOME SUGGESSIONS TO DO THIS.
REPORT y11v2_13_prodsel MESSAGE-ID y11bf_13_addons.
*EXIT.*
INCLUDE y11v2_13_prodsel_d01. "data and table declaration
INCLUDE y11v2_13_prodsel_s01. "selection screen, initialisatio
INCLUDE y11v2_13_prodsel_f01. "form routines
*& Event START-OF-SELECTION
START-OF-SELECTION.
* PERFORM check_eingabe.
PERFORM kondtabellen_lesen.
PERFORM aenderungen_lesen.
PERFORM belege_ermitteln.
PERFORM substitution_pruefen.
PERFORM auftraege_aendern.
PERFORM ausgabe_nachrichten.
GOOOD ANSWERS WILL BE APPRECIATED THROUGH POINTS.
Thanks in advance.
Best Regards,
Sasidhar Reddy Matli.
Hi,
I have a similar requirement in my past experience, that i have to create 400 tcodes for abap queries. User has provided one input file with the sufficient data. So what i did is, i recorded the whole process for one query and wrote one small BDC -CALL TRANSACTION program and update all.
You can also try in the same way first try to do recording for one program and implement one temparory BDC program.
Rgds,
Bujji
Similar Messages
-
Using the Insert statement in a Java program without hardcoding the data
hello.
this is james mcfadden. i have developed a program called Demo.java, which is used with another program called QueryTableModel.java (a program that allows data to be viewed in a JTable). The Demo.java program displays a menu, connects to a database, allows the user to add data into the database and allows the user to view data that is already in the database. I have a problem with the Demo.java program. I have hardcoded the Insert statement in it. How do you use the Insert statement to put data into a database without hardcoding the data?
import java.awt.*;//Contains all of the classes for creating user interfaces and for painting graphics and images
import java.awt.event.*;//Provides interfaces and classes for dealing with different types of events fired by AWT components
import javax.swing.*;//Provides a set of lightweight components that, to the maximum degree possible, work the same on all platforms
import javax.swing.table.*;//Provides classes and interfaces for dealing with javax.swing.JTable
import javax.swing.JOptionPane;//provides a class that makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something
import java.sql.*;//Provides the API for accessing and processing data stored in a data source using the Java programming language
public class Demo extends JFrame{
static String url = "jdbc:odbc:VideoLibrary";//a static variable that allows a connection to be made to a database called VideoLibrary
static Statement stmt;//a static variable that allows a statement to be made once a connection is set up
static Connection con;//a static interface that allows a connection to be made to a database
//global variables
JTextField hostField;//a class that allows a line of text to be changed
JTextField queryField;//a class that allows a line of text to be changed
QueryTableModel qtm;//a class that shows and changes regular two-dimensional tables of cells
JComboBox comboBox;//a class that puts a button or editable field and a drop-down list together
public static void main(String args[]){
int choice=-1;//a variable of type int that is set to -1
do{
choice=getChoice();//invokes the method getChoice()
if(choice!=0){
getSelected(choice);//invokes the method getSelected(choice)
}//end if
//if the user chooses 5, it will cause him or her to exit the system
}while(choice!=5);//end do-while
System.exit(0);//closes down the menu screen
}//end main
public static int getChoice(){
String choice;//a variable of type string
int ch;//a variable of type int
choice = JOptionPane.showInputDialog(null,"1. Maintain product details\n"+"2. Maintain member details\n"+"3. Maintain rental details\n"+"4. View product, member and rental details\n"+"5. Log Off\n\n"+"Enter your choice");//asks the user for some input
ch = Integer.parseInt(choice);//a class that wraps a value of the primitive type int in an object
return ch;//a method that returns an integer value
}//end getChoice
public static void getSelected(int choice){
if(choice==1){
maintainProductDetails();//invokes the method maintainProductDetails()
}//end if
if(choice==2){
maintainMemberDetails();//invokes the method maintainMemberDetails()
}//end if
if(choice==3){
maintainRentalDetails();//invokes the method maintainRentalDetails()
}//end if
if(choice==4){
Demo test = new Demo();//invokes the constructor Demo()
test.setVisible(true);//shows the JTable component by marking it as visible
}//end if
}//end getSelected
public static Connection getConnection(){
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");//used to create a JDBC connection using a database
}//end try
catch(java.lang.ClassNotFoundException e){//causes an exception to be thrown when an application tries to load in a class through its string name
System.err.print("ClassNotFoundException: ");//displays an error message
System.err.println(e.getMessage());//returns the exception that was raised if an error occurred while attempting to load the ClassNotFoundException class
}//end catch
try {
con=DriverManager.getConnection(url,"","");//tries to create a connection with the database using the DriverManager class
}//end try
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());//returns an SQL error message
}//end catch
return con;
}//end getConnection
public static void maintainProductDetails(){
Connection con = getConnection();//creates a connection with the database
String addProduct1, addProduct2, addProduct3, addProduct4, addProduct5, addProduct6, addProduct7, addProduct8, addProduct9, addProduct10;//string variables that represent information about the different types of product data that will be stored in the database
addProduct1 = "insert into Product values (110001, 'The Killers - Sams Town', 5.00, 'G', 'CD', 2006)";
addProduct2 = "insert into Product values (110002, 'Robbie Williams - Rudebox', 5.00, 'G', 'CD', 2006)";
addProduct3 = "insert into Product values (110003, 'Razorlight - Razorlight', 5.00, 'G', 'CD', 2006)";
addProduct4 = "insert into Product values (110004, 'My Chemical Romance - The Black Parade', 5.00, 'G', 'CD', 2006)";
addProduct5 = "insert into Product values (110005, 'Snow Patrol - Eyes Open', 5.00, 'G', 'CD', 2006)";
addProduct6 = "insert into Product values (110006, 'Scissor Sisters - Ta-Dah!', 5.00, 'G', 'CD', 2006)";
addProduct7 = "insert into Product values (110007, 'Lovesounds - Justin Timberlake', 5.00, 'G', 'CD', 2006)";
addProduct8 = "insert into Product values (110008, 'Director - We thrive on big cities', 5.00, 'G', 'CD', 2006)";
addProduct9 = "insert into Product values (110009, 'Roxette - Roxette hits', 5.00, 'G', 'CD', 2006)";
addProduct10 = "insert into Product values (110010, 'Pussy Cat Dolls - PCD', 5.00, 'G', 'CD', 2006)";
try {
stmt = con.createStatement();//Creates a Statement object for sending SQL statements to the database
//statements are allowed to be made once a connection is set up
stmt.executeUpdate(addProduct1);
stmt.executeUpdate(addProduct2);
stmt.executeUpdate(addProduct3);
stmt.executeUpdate(addProduct4);
stmt.executeUpdate(addProduct5);
stmt.executeUpdate(addProduct6);
stmt.executeUpdate(addProduct7);
stmt.executeUpdate(addProduct8);
stmt.executeUpdate(addProduct9);
stmt.executeUpdate(addProduct10);
stmt.close();//closes the Statement object
con.close();//terminates the connection with the database
}//end try
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());//returns an SQL error message
}//end catch
}//end maintainProductDetails
public static void maintainMemberDetails(){
Connection con = getConnection();//creates a connection with the database
String addMember1, addMember2, addMember3, addMember4, addMember5, addMember6, addMember7, addMember8, addMember9, addMember10;//string variables that represent information about the member data that will be stored in the database
addMember1 = "insert into Member values (1234, 'Ann', 'Smyth', 'Upper Killult, Falcarragh, Co. Donegal', '(074)-9135210', '(087)-2030172', #5/11/85#, #5/12/06#)";
addMember2 = "insert into Member values (2345, 'John', 'Murphy', 'Lower Killult, Falcarragh, Co. Donegal', '(074)-9135211', '(087)-2030173', #4/12/85#, #6/13/06#)";
addMember3 = "insert into Member values (1324, 'James', 'McFadden', 'Lower Ardsbeg, Gortahork, Co. Donegal', '(074)-9165314', '(087)-2030171', #4/11/85#, #6/14/06#)";
addMember4 = "insert into Member values (1235, 'Frankie', 'Ferry', 'Ardsmore, Gortahork, Co. Donegal', '(074)-9165325', '(087)-2031234', #6/13/60#, #6/15/06#)";
addMember5 = "insert into Member values (1236, 'Daniel', 'McKimm', 'Ballyness, Falcarragh, Co. Donegal', '(074)-9135212', '(087)-2030184', #5/14/73#, #6/16/06#)";
addMember6 = "insert into Member values (2346, 'Stephen', 'Doohan', 'Ballyness, Falcarragh, Co. Donegal', '(074)-9135213', '(087)-2030185', #6/13/85#, #5/13/06#)";
addMember7 = "insert into Member values (2347, 'James', 'Ferry', 'Meenlaragh, Gortahork, Co.Donegal', '(074)-9165360', '(087)-2031345', #9/12/85#, #5/14/06#)";
addMember8 = "insert into Member values (2348, 'Liam', 'Cannon', 'Derryconner, Gortahork, Co.Donegal', '(074)-9165324', '(087)-2031456', #4/11/86#, #5/15/06#)";
addMember9 = "insert into Member values (2401, 'Ciaran', 'Ferry', 'Brinalack, Gweedore, Co.Donegal', '(074)-9176425', '(087)-2030282', #9/12/85#, #5/16/06#)";
addMember10 = "insert into Member values (2402, 'Ciaran', 'McGee', 'Derrybeg, Gweedore, Co.Donegal', '(074)-9176536', '(087)-2030393', #9/14/85#, #5/18/06#)";
try{
stmt = con.createStatement();//Creates a Statement object for sending SQL statements to the database
//statements are allowed to be made once a connection is set up
stmt.executeUpdate(addMember1);
stmt.executeUpdate(addMember2);
stmt.executeUpdate(addMember3);
stmt.executeUpdate(addMember4);
stmt.executeUpdate(addMember5);
stmt.executeUpdate(addMember6);
stmt.executeUpdate(addMember7);
stmt.executeUpdate(addMember8);
stmt.executeUpdate(addMember9);
stmt.executeUpdate(addMember10);
stmt.close();//closes the Statement object
con.close();//terminates the connection with the database
}//end try
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());//returns an SQL error message
}//end catch
}//end maintainMemberDetails
public static void maintainRentalDetails(){
Connection con = getConnection();//creates a connection with the database
String addRental1, addRental2, addRental3, addRental4, addRental5, addRental6, addRental7, addRental8, addRental9, addRental10;//string variables that represent information about the loan data that will be stored in the database
addRental1 = "insert into Rental values (110001, 'The Killers - Sams Town', 1234, 'Ann', 'Smyth', #9/01/06#, #9/10/06#, 'Yes', 2.00)";
addRental2 = "insert into Rental values (120001, 'Mission Impossible 3', 2345, 'John', 'Murphy', #9/02/06#, #9/09/06#, 'No', 0.00)";
addRental3 = "insert into Rental values (130001, 'Need for Special Carbon', 1324, 'James', 'McFadden', #9/03/06#, #9/12/06#, 'Yes', 2.00)";
addRental4 = "insert into Rental values (110002, 'Robbie Williams - Rudebox', 1235, 'Frankie', 'Ferry', #9/04/06#, #9/11/06#, 'No', 0.00)";
addRental5 = "insert into Rental values (120015, 'Prime', 1236, 'Daniel', 'McKimm', #9/05/06#, #9/14/06#, 'Yes', 2.00)";
addRental6 = "insert into Rental values (130015, 'FIFA 07', 2346, 'Stephen', 'Doohan', #9/06/06#, #9/13/06#, 'No', 0.00)";
addRental7 = "insert into Rental values (110009, 'Roxette - Roxette hits', 2347, 'James', 'Ferry', #9/07/06#, #9/16/06#, 'Yes', 2.00)";
addRental8 = "insert into Rental values (120003, 'The Break Up', 2348, 'Liam', 'Cannon', #9/08/06#, #9/15/06#, 'No', 0.00)";
addRental9 = "insert into Rental values (130027, 'Gears of War', 2401, 'Ciaran', 'Ferry', #9/09/06#, #9/18/06#, 'Yes', 2.00)";
addRental10 = "insert into Rental values (110021, 'Scooter - Mind the Gap', 2402, 'Ciaran', 'McGee', #9/10/06#, #9/17/06#, 'No', 0.00)";
try{
stmt = con.createStatement();//Creates a Statement object for sending SQL statements to the database
//statements are allowed to be made once a connection is set up
stmt.executeUpdate(addRental1);
stmt.executeUpdate(addRental2);
stmt.executeUpdate(addRental3);
stmt.executeUpdate(addRental4);
stmt.executeUpdate(addRental5);
stmt.executeUpdate(addRental6);
stmt.executeUpdate(addRental7);
stmt.executeUpdate(addRental8);
stmt.executeUpdate(addRental9);
stmt.executeUpdate(addRental10);
stmt.close();//closes the Statement object
con.close();//terminates the connection with the database
}//end try
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());//returns an SQL error message
}//end catch
}//end maintainRentalDetails
public Demo(){//a constructor
super("Demo Test Frame");//overrides the constructor
setSize(350, 200);//Resizes this component so that it has width of 350 and height of 200
comboBox = new JComboBox();//invokes the class JComboBox
comboBox.addItem("jdbc:odbc:VideoLibrary");//adds the specified item to the end of the scrolling list
qtm = new QueryTableModel();//invokes the class QueryTableModel
JTable table = new JTable(qtm);//a class that shows and changes regular two-dimensional tables of cells
JScrollPane scrollpane = new JScrollPane(table);//a class that provides a scrollable view of a lightweight component
JPanel p1 = new JPanel();//a class that puts the combo box and query field in a panel
p1.setLayout(new GridLayout(3, 2));//Sets the layout manager for this container
p1.add(comboBox);//Appends the specified component to the end of this container
p1.add(new JLabel("Enter your query: "));//Appends the specified component to the end of this container
p1.add(queryField = new JTextField());//Appends the specified component to the end of this container
p1.add(new JLabel("Click here to send: "));//Appends the specified component to the end of this container
JButton jb = new JButton("Search");//a class that is an implementation of a "push" button
jb.addActionListener(new ActionListener(){//Adds an ActionListener to the button
public void actionPerformed(ActionEvent e){
qtm.setHostURL();//invokes the method setHostURL
qtm.setQuery(queryField.getText().trim());//invokes the method setQuery; and returns the text that is presented by this text component and returns a copy of the string, with leading and trailing whitespaces omitted
} );//end addActionListener
p1.add(jb);//Appends the specified component to the end of this container
getContentPane().add(p1, BorderLayout.NORTH);//Returns the content pane
getContentPane().add(scrollpane, BorderLayout.CENTER);//Returns the content pane
}//end Demo
}//end class Demo
import java.sql.*;//Provides the API for accessing and processing data stored in a data source using the Java programming language
import java.io.*;//Provides for system input and output through data streams, serialization and the file system
import java.util.Vector;//provides a class that implements a growable array of objects
import javax.swing.*;//Provides a set of lightweight components that, to the maximum degree possible, work the same on all platforms
import javax.swing.table.*;//Provides classes and interfaces for dealing with javax.swing.JTable
public class QueryTableModel extends AbstractTableModel{
Vector cache;//a class that constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero
int colCount;//a variable that counts the number of columns in the three tables
String[] headers;//a class that represents character strings and all string literals in this program are implemented as instances of the String class
Connection db;//an interface that allows a connection to be made to a database
Statement statement;//an interface that allows executes the given SQL statement, which returns a single ResultSet object
String currentURL;//a variable that allows the URL to be displayed in a combo box
public QueryTableModel(){//a constructor
cache=new Vector();//constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");//used by opening a JDBC connection using an URL
}//end try
catch(Exception e){
System.out.println("problem loading the driver ");//an error message
}//end catch
}//end QueryTableModel
public String getColumnName(int i){//Returns the designated column's name
return headers;//returns the name of each column in the three table
}//end getColumnName
public int getColumnCount(){//Returns the number of columns in the column model
return colCount;//returns the number of columns in the three tables
}//end getColumnCount
public int getRowCount(){//Returns the number of rows in this table's model
return cache.size();//returns the number of components in the vector
}//end getRowCount
public Object getValueAt(int row, int col){//Returns the cell value at row and column
return ((String[])cache.elementAt(row))[col];//Returns the component at the specified index
}//end getValueAt
public void setHostURL(){//sets the URL for the database
String url = "jdbc:odbc:VideoLibrary";//a variable that allows a connection to be made to a database called VideoLibrary
closeDB();//invokes the method closeDB()
try{
db=DriverManager.getConnection(url,"","");//tries to create a connection with the database using the DriverManager class
statement=db.createStatement();//Creates a Statement object for sending SQL statements to the database
}//end try
catch(Exception e){
System.out.println("Could not initialize the database.");//an error message
e.printStackTrace();//a Throwable method that prints this throwable and it's backtrace to the standard error stream
}//end catch
}//end setHostURL
public void setQuery(String q){//sets the kind of query that is to be sent to the database
cache=new Vector();//constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero
String s="select * from Product";//a variable that causes all the data that is in the product table to be displayed in a JTable, which also means that all the data that is in both the member and rental tables can also be displayed in a JTable
try{
ResultSet rs=statement.executeQuery(q);//an interface that is used to generate a database result set by executing a statement that queries the database
ResultSetMetaData meta=rs.getMetaData();//an interface that is used to get information about the types and properties of the columns in a ResultSet object
colCount=meta.getColumnCount();//Returns the number of columns in this ResultSet object
headers=new String[colCount];//gets the name of each column in the three tables
for(int h=1;h<=colCount;h++){
headers[h-1]=meta.getColumnName(h);//Get the designated column's name
}//end for
while(rs.next()){
String[] record=new String[colCount];//stores the name of each column in the three tables in memory
for(int i=0;i<colCount;i++){
record[i]=rs.getString(i+1);//Retrieves the value of the designated column in the current row of this ResultSet object as a String
}//end for
cache.addElement(record);//Adds the specified component to the end of this vector, increasing its size by one
}//end while
fireTableChanged(null);//Forwards the given notification event to all TableModelListeners that registered themselves as listeners for this table model
}//end try
catch(Exception e){
cache=new Vector();//constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero
e.printStackTrace();//a Throwable method that prints this throwable and it's backtrace to the standard error stream
}//end catch
}//end setQuery
public void initDB(String url){
try{
db=DriverManager.getConnection(url);//tries to create a connection with the database using the DriverManager class
statement=db.createStatement();//Creates a Statement object for sending SQL statements to the database
}//end try
catch(Exception e){
System.out.println("Could not initialize the database.");//an error message
e.printStackTrace();//a Throwable method that prints this throwable and it's backtrace to the standard error stream
}//end catch
}//end initDB
public void closeDB(){
try{
if(statement!=null){
statement.close();//Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed
}//end if
if(db!=null){
db.close();//Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released
}//end if
}//end try
catch(Exception e){
System.out.println("Could not close the current connection.");//an error message
e.printStackTrace();//a Throwable method that prints this throwable and it's backtrace to the standard error stream
}//end catch
}//end closeDB
}//end class QueryTableModelhere's an uncommented version of the code.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.JOptionPane;
import java.sql.*;
public class Demo extends JFrame{
static String url = "jdbc:odbc:VideoLibrary";
static Statement stmt;
static Connection con;
JTextField hostField;
JTextField queryField;
QueryTableModel qtm;
JComboBox comboBox;
public static void main(String args[]){
int choice=-1;
do{
choice=getChoice();
if(choice!=0){
getSelected(choice);
}while(choice!=5);
System.exit(0);
public static int getChoice(){
String choice;
int ch;
choice = JOptionPane.showInputDialog(null,"1. Maintain product details\n"+"2. Maintain member details\n"+"3. Maintain rental details\n"+"4. View product, member and rental details\n"+"5. Log Off\n\n"+"Enter your choice");
ch = Integer.parseInt(choice);
return ch;
public static void getSelected(int choice){
if(choice==1){
maintainProductDetails();
if(choice==2){
maintainMemberDetails();
if(choice==3){
maintainRentalDetails();
if(choice==4){
Demo test = new Demo();
test.setVisible(true);
public static Connection getConnection(){
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch(java.lang.ClassNotFoundException e){
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try {
con=DriverManager.getConnection(url,"","");
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
return con;
public static void maintainProductDetails(){
Connection con = getConnection();
String addProduct1, addProduct2, addProduct3, addProduct4, addProduct5, addProduct6, addProduct7, addProduct8, addProduct9, addProduct10;
addProduct1 = "insert into Product values (110001, 'The Killers - Sams Town', 5.00, 'G', 'CD', 2006)";
addProduct2 = "insert into Product values (110002, 'Robbie Williams - Rudebox', 5.00, 'G', 'CD', 2006)";
addProduct3 = "insert into Product values (110003, 'Razorlight - Razorlight', 5.00, 'G', 'CD', 2006)";
addProduct4 = "insert into Product values (110004, 'My Chemical Romance - The Black Parade', 5.00, 'G', 'CD', 2006)";
addProduct5 = "insert into Product values (110005, 'Snow Patrol - Eyes Open', 5.00, 'G', 'CD', 2006)";
addProduct6 = "insert into Product values (110006, 'Scissor Sisters - Ta-Dah!', 5.00, 'G', 'CD', 2006)";
addProduct7 = "insert into Product values (110007, 'Lovesounds - Justin Timberlake', 5.00, 'G', 'CD', 2006)";
addProduct8 = "insert into Product values (110008, 'Director - We thrive on big cities', 5.00, 'G', 'CD', 2006)";
addProduct9 = "insert into Product values (110009, 'Roxette - Roxette hits', 5.00, 'G', 'CD', 2006)";
addProduct10 = "insert into Product values (110010, '***** Cat Dolls - PCD', 5.00, 'G', 'CD', 2006)";
try {
stmt = con.createStatement();
stmt.executeUpdate(addProduct1);
stmt.executeUpdate(addProduct2);
stmt.executeUpdate(addProduct3);
stmt.executeUpdate(addProduct4);
stmt.executeUpdate(addProduct5);
stmt.executeUpdate(addProduct6);
stmt.executeUpdate(addProduct7);
stmt.executeUpdate(addProduct8);
stmt.executeUpdate(addProduct9);
stmt.executeUpdate(addProduct10);
stmt.close();
con.close();
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
public static void maintainMemberDetails(){
Connection con = getConnection();
String addMember1, addMember2, addMember3, addMember4, addMember5, addMember6, addMember7, addMember8, addMember9, addMember10;
addMember1 = "insert into Member values (1234, 'Ann', 'Smyth', 'Upper Killult, Falcarragh, Co. Donegal', '(074)-9135210', '(087)-2030172', #5/11/85#, #5/12/06#)";
addMember2 = "insert into Member values (2345, 'John', 'Murphy', 'Lower Killult, Falcarragh, Co. Donegal', '(074)-9135211', '(087)-2030173', #4/12/85#, #6/13/06#)";
addMember3 = "insert into Member values (1324, 'James', 'McFadden', 'Lower Ardsbeg, Gortahork, Co. Donegal', '(074)-9165314', '(087)-2030171', #4/11/85#, #6/14/06#)";
addMember4 = "insert into Member values (1235, 'Frankie', 'Ferry', 'Ardsmore, Gortahork, Co. Donegal', '(074)-9165325', '(087)-2031234', #6/13/60#, #6/15/06#)";
addMember5 = "insert into Member values (1236, 'Daniel', 'McKimm', 'Ballyness, Falcarragh, Co. Donegal', '(074)-9135212', '(087)-2030184', #5/14/73#, #6/16/06#)";
addMember6 = "insert into Member values (2346, 'Stephen', 'Doohan', 'Ballyness, Falcarragh, Co. Donegal', '(074)-9135213', '(087)-2030185', #6/13/85#, #5/13/06#)";
addMember7 = "insert into Member values (2347, 'James', 'Ferry', 'Meenlaragh, Gortahork, Co.Donegal', '(074)-9165360', '(087)-2031345', #9/12/85#, #5/14/06#)";
addMember8 = "insert into Member values (2348, 'Liam', 'Cannon', 'Derryconner, Gortahork, Co.Donegal', '(074)-9165324', '(087)-2031456', #4/11/86#, #5/15/06#)";
addMember9 = "insert into Member values (2401, 'Ciaran', 'Ferry', 'Brinalack, Gweedore, Co.Donegal', '(074)-9176425', '(087)-2030282', #9/12/85#, #5/16/06#)";
addMember10 = "insert into Member values (2402, 'Ciaran', 'McGee', 'Derrybeg, Gweedore, Co.Donegal', '(074)-9176536', '(087)-2030393', #9/14/85#, #5/18/06#)";
try{
stmt = con.createStatement();
stmt.executeUpdate(addMember1);
stmt.executeUpdate(addMember2);
stmt.executeUpdate(addMember3);
stmt.executeUpdate(addMember4);
stmt.executeUpdate(addMember5);
stmt.executeUpdate(addMember6);
stmt.executeUpdate(addMember7);
stmt.executeUpdate(addMember8);
stmt.executeUpdate(addMember9);
stmt.executeUpdate(addMember10);
stmt.close();
con.close();
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
public static void maintainRentalDetails(){
Connection con = getConnection();
String addRental1, addRental2, addRental3, addRental4, addRental5, addRental6, addRental7, addRental8, addRental9, addRental10;
addRental1 = "insert into Rental values (110001, 'The Killers - Sams Town', 1234, 'Ann', 'Smyth', #9/01/06#, #9/10/06#, 'Yes', 2.00)";
addRental2 = "insert into Rental values (120001, 'Mission Impossible 3', 2345, 'John', 'Murphy', #9/02/06#, #9/09/06#, 'No', 0.00)";
addRental3 = "insert into Rental values (130001, 'Need for Special Carbon', 1324, 'James', 'McFadden', #9/03/06#, #9/12/06#, 'Yes', 2.00)";
addRental4 = "insert into Rental values (110002, 'Robbie Williams - Rudebox', 1235, 'Frankie', 'Ferry', #9/04/06#, #9/11/06#, 'No', 0.00)";
addRental5 = "insert into Rental values (120015, 'Prime', 1236, 'Daniel', 'McKimm', #9/05/06#, #9/14/06#, 'Yes', 2.00)";
addRental6 = "insert into Rental values (130015, 'FIFA 07', 2346, 'Stephen', 'Doohan', #9/06/06#, #9/13/06#, 'No', 0.00)";
addRental7 = "insert into Rental values (110009, 'Roxette - Roxette hits', 2347, 'James', 'Ferry', #9/07/06#, #9/16/06#, 'Yes', 2.00)";
addRental8 = "insert into Rental values (120003, 'The Break Up', 2348, 'Liam', 'Cannon', #9/08/06#, #9/15/06#, 'No', 0.00)";
addRental9 = "insert into Rental values (130027, 'Gears of War', 2401, 'Ciaran', 'Ferry', #9/09/06#, #9/18/06#, 'Yes', 2.00)";
addRental10 = "insert into Rental values (110021, 'Scooter - Mind the Gap', 2402, 'Ciaran', 'McGee', #9/10/06#, #9/17/06#, 'No', 0.00)";
try{
stmt = con.createStatement();
stmt.executeUpdate(addRental1);
stmt.executeUpdate(addRental2);
stmt.executeUpdate(addRental3);
stmt.executeUpdate(addRental4);
stmt.executeUpdate(addRental5);
stmt.executeUpdate(addRental6);
stmt.executeUpdate(addRental7);
stmt.executeUpdate(addRental8);
stmt.executeUpdate(addRental9);
stmt.executeUpdate(addRental10);
stmt.close();
con.close();
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
public Demo(){
super("Demo Test Frame");
setSize(350, 200);
comboBox = new JComboBox();
comboBox.addItem("jdbc:odbc:VideoLibrary");
qtm = new QueryTableModel();
JTable table = new JTable(qtm);
JScrollPane scrollpane = new JScrollPane(table);
JPanel p1 = new JPanel();
p1.setLayout(new GridLayout(3, 2));
p1.add(comboBox);
p1.add(new JLabel("Enter your query: "));
p1.add(queryField = new JTextField());
p1.add(new JLabel("Click here to send: "));
JButton jb = new JButton("Search");
jb.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
qtm.setHostURL();
qtm.setQuery(queryField.getText().trim());
p1.add(jb);
getContentPane().add(p1, BorderLayout.NORTH);
getContentPane().add(scrollpane, BorderLayout.CENTER);
import java.sql.*;
import java.io.*;
import java.util.Vector;
import javax.swing.*;
import javax.swing.table.*;
public class QueryTableModel extends AbstractTableModel{
Vector cache;
int colCount;
String[] headers;
Connection db;
Statement statement;
String currentURL;
public QueryTableModel(){
cache=new Vector();
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch(Exception e){
System.out.println("problem loading the driver ");
public String getColumnName(int i){
return headers;
public int getColumnCount(){
return colCount;
public int getRowCount(){
return cache.size();
public Object getValueAt(int row, int col){
return ((String[])cache.elementAt(row))[col];
public void setHostURL(){
String url = "jdbc:odbc:VideoLibrary";
closeDB();
try{
db=DriverManager.getConnection(url,"","");
statement=db.createStatement();
catch(Exception e){
System.out.println("Could not initialize the database.");
e.printStackTrace();
public void setQuery(String q){
cache=new Vector();
String s="select * from Product";
try{
ResultSet rs=statement.executeQuery(q);
ResultSetMetaData meta=rs.getMetaData();
colCount=meta.getColumnCount();
headers=new String[colCount];
for(int h=1;h<=colCount;h++){
headers[h-1]=meta.getColumnName(h);
while(rs.next()){
String[] record=new String[colCount];
for(int i=0;i<colCount;i++){
record[i]=rs.getString(i+1);
cache.addElement(record);
fireTableChanged(null);
catch(Exception e){
cache=new Vector();
e.printStackTrace();
public void initDB(String url){
try{
db=DriverManager.getConnection(url);
statement=db.createStatement();
catch(Exception e){
System.out.println("Could not initialize the database.");
e.printStackTrace();
public void closeDB(){
try{
if(statement!=null){
statement.close();
if(db!=null){
db.close();
catch(Exception e){
System.out.println("Could not close the current connection.");
e.printStackTrace(); -
Report with stored proc running multiple stored procedures with insert statement
Hi,
I wonder if this is possible in SSRS ... I use the 2012 version (Data Tools).
I have a report that triggers a stored procedure. See below.
Within this SP there are 2 insert statements getting data from 2 other SP's.
When I make a dataset referring to the main SP below, SSRS does not show me any fields at all.
Is this because it's a SP with insert statements and nested SP's?
At the end of the SP I make a select so it should see all the fields.
The parameters @month and @costcenter are multivalue params. I use a special function to convert the multivalues, selected in the report, into a string to pass it correctly to the query (comma separated).
USE [TestDB]
GO
/****** Object: StoredProcedure [dbo].[_Pink_SP_StandingsRegisterDataset] Script Date: 15-4-2014 13:31:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[_Pink_SP_StandingsRegisterDataset]
@year INT,
@month NVARCHAR(50),
@costcenter NVARCHAR(500),
@GLaccount NVARCHAR(9)
AS
BEGIN
/* Remove existing content*/
DELETE FROM _Pink_TB_StandingsRegister
/* Add records part 1 */
INSERT INTO _Pink_TB_StandingsRegister
EXEC _Pink_SP_StandingsRegister @year, @month, @costcenter, @GLaccount
/* Add records part 2 */
INSERT INTO _Pink_TB_StandingsRegister
Type,
Row,
Year,
Month,
YearDatetable,
MonthDatetable
EXEC _Pink_SP_StandingsRegisterDatetable @year
/* Select all records */
SELECT *
FROM _Pink_TB_StandingsRegister
END
GOHi bijntjede2e,
After testing a similar scenario in my own environment, it works well in Reporting Services. In my test, the stored procedure returns all the fields from _Pink_TB_StandingsRegister table in the dataset. Then I select some values from year, month, costcenter
and Glaccount parameters, it inserts some values in the _Pink_TB_StandingsRegister table. So we can use this stored procedure as the dataset in the report.
In order to solve the problem more efficiently, I need to clarify some information.
Are you pass multiple values parameter to one stored procedure correctly? We can refer to the following thread:
http://social.technet.microsoft.com/Forums/en-US/dbdfa101-cccc-4e9f-aa50-566dc5ebcc27/ssrs-2008-r2-report-dataset-call-a-stored-procedure?forum=sqlrep
What results are you get when executing the stored procedure in SQL Server Management Studio? Is it works well? We should double those stored procedures.
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Insert records from report program into R3 table
Hi
I wanted to insert records from report program into R3 table.
here is my code
data : itab type standard table of zemp initial size 10 with header line.
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
but i am getting the following error
the type of the data base table and work area/internal table "ITAB" are no unicode-converible.
how can I insert records from report program into R3 table
should I have to write move corresponding
pls guide
thanks
manianHi,
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
Do one thing
Data : itab type table of ztable with header line.
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
error will resolve, then try to make structure similar to ZTABLE -
TABLES statement in report program
Hi,
Is there any performance issue in using TABLES statement in report program? Because I have got an review point from QA insisting me to avoid TABLES statement. Is it recommended by SAP to avoid TABLES statement in report program?
Thanks in advance.
Regards,
Balaji Viswanath.Balaji,
If you use TABLE statement it will provide the work area of the given table.
EX: Decalre any fields of table in slection scereen
without declarin g the tabel name in TAble statement.It will give error.
This will give error.
SELECT-OPTIONS : s_matnr LIKE MARA-matnr.
This will work.
TABLES: mara.
SELECT-OPTIONS : s_matnr LIKE MARA-matnr.
It means it will occupy some area.
Don't forget to reward if useful. -
INSERT Statement behind a FORM on a TABLE with REPORT
When I create a form on a table with report, I'm sure an INSERT STATEMENT is genereated in the background somewhere. How can I see this insert statement or how can I get to this INSERT statement? If I can see it, would I be able to modify this INSERT statement?
Please use simple terms.
Thanks.Roel
At first, i was just curious to see where that insert statement is and how it looks like.
Later, I really wanted to see it because I wanted to know how it looks like whne I try to insert a one to many relationship record. Don't know if I'm being too clear on this.
Lets say table A and B have a 1-to-many relationship. When I want to insert records into both A and B, how does the insert work? Maybe if I get an answer to this question, I may understand how the inserts are done on a 1 to many relationship data insert.
Thanks. -
Utilizing XML Publisher Report Bursting Program user-variables
When running the XML Publisher Report Bursting Program against a bursting control file, I see the following in the log:
Bursting propertes.....
{user-variable:cp:territory=US, user-variable:cp:ReportRequestID=4413342, user-variable:cp:language=en, user-variable:cp:responsibility=20678, user-variable.OA_MEDIA=http://hostname:8000/OA_MEDIA, burstng-source=EBS, user-variable:cp:DebugFlag=N, user-variable:cp:parent_request_id=4413342, user-variable:cp:locale=en-US, user-variable:cp:user=USER, user-variable:cp:application_short_name=XDO, user-variable:cp:request_id=4413368, user-variable:cp:org_id=204, user-variable:cp:reportdescription=Report Name, user-variable:cp:Dummy for Data Security=Y}
I would like to reference one or more of these in
1. My bursting control file
2. My template (to be output in final PDF).
I cannot seem to get this to work in my bursting control file by referencing:
${cp:user} (note that it just returns the word 'null' here instead of the value)
nor can I get it to work in my RTF template by referencing:
<?xdoxslt:get_variable($_XDOCTX, ‘cp:user’)?>
Should this work, or I am missing something?
ThanksThanks Ike, it likely would. The thing I keep coming back to is an example in the BIP Developer's Guide that suggests you can set a property and have it made available:
DocumentProcessor dp = new DocumentProcessor (cfgFile, xmlFile, dir);
Properties prop= new Properties();
prop.put("user-variable:ADMIN_EMAIL","[email protected]");
dp.setConfig(prop);
dp.process()
Seems to me that the work going on behind the scenes here (based on log statements alone) suggest the same sort of integration.. but I suppose not.
Thanks -
XML Publisher Report Bursting Program ends in error
We have a report that generates the XML output (ACH notification)
In the after report we have a call to the Bursting program.
The ACH notification completes with the correct output but the bursting ends in error showing
Set Bursting parameters..
Temp. Directory:/tmp
[101211_072452383][][STATEMENT] Oracle XML Parser version ::: Oracle XDK Java 9.0.4.0.0 Production
[101211_072452385][][STATEMENT] setOAProperties called..
Bursting propertes.....
{user-variable:cp:territory=US, user-variable:cp:ReportRequestID=28081235, user-variable:cp:language=en, user-variable:cp:responsibility=50274, user-variable.OA_MEDIA=http://xxx/OA_MEDIA, burstng-source=EBS, user-variable:cp:DebugFlag=Y, user-variable:cp:parent_request_id=28081235, user-variable:cp:locale=en-US, user-variable:cp:user=xxx, user-variable:cp:application_short_name=XDO, user-variable:cp:request_id=28081236, user-variable:cp:org_id=83, user-variable:cp:reportdescription=xxx ACH Payment Nofitication}
Start bursting process..
Bursting process complete..
Generating Bursting Status Report..
--Exception
/tmp/101211_072452427/xdo1_2.pdf (No such file or directory)
java.io.FileNotFoundException: /tmp/101211_072452427/xdo1_2.pdf (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.zipOutputFiles(JCP4XDOBurstingEngine.java:523)
at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.runProgram(JCP4XDOBurstingEngine.java:292)
at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
The temp directory variable in the XML Publisher is /tmp which has all the permissions.
The control file calls the delivery method (email 123 in the example) and uses the following template
<xapi:document key="" output-type="pdf" delivery="123">
<xapi:template type="rtf"
location="XDO://XBOL.ACHPAYNOTIF.en.US/?getSource=true" filter=""/>
</xapi:document>
This template is defined for English language and Territory United States.
I covered everything I could find here and in metalink and still cannot make it work.
Any ideas?Hi;
Similar issue mention at below notes, Please review:
NPE Error While Bursting Using XDOBURSTREP in EBS R12 [ID 754790.1]
Bursting Engine Ends With Java.Lang.Nullpointerexception[Article ID 559443.1]
XDOBURSTREP - XML Publisher Report Bursting Program Fails with InvalidPropertyValueException[Article ID 603424.1]
If its not help I suggest rise SR
Regard
Helios -
XML Report Publisher program is erroring out
Hi All,
I've customized the AR Customer Statements.
I've created a data definition as "ARXSGP" and uploded the sample_output.xml of Statement Generation Program to it. Also I've created a Data template as "ARXSGPO" and attached the data definition "ARXSGP" to it and uploaded the customized rtf file "XXHCC_CLE_F_ARCUSBALSL.rtf" and set the default output type to PDF.
As I donot wish to call the XML Report Publisher program manually every time when I Print the Statements through Print Documents-->Statements.
So I've done the below customization in ARXSGP.rdf file ie; Print Statements Report which is an Oracle Report.
I've added the below code in After Report trigger.
=======================================
FUNCTION AfterReport
RETURN BOOLEAN
IS
BEGIN
Below code added for Customer Statement Case Study
DECLARE
l_req_id NUMBER := 0;
L_XML_LAYOUT BOOLEAN := TRUE;
BEGIN
L_XML_LAYOUT := FND_REQUEST.ADD_LAYOUT (TEMPLATE_APPL_NAME => 'AR', TEMPLATE_CODE => 'ARXSGP', TEMPLATE_LANGUAGE => 'en', TEMPLATE_TERRITORY => 'US', OUTPUT_FORMAT => 'PDF');
IF L_XML_LAYOUT THEN
srw.message(20001, 'Template is picked ');
srw.message(20002,'Concurrent request Id : '||:p_conc_request_id);
l_req_id := FND_REQUEST.SUBMIT_REQUEST('XDO',
'XDOREPPB',
NULL,
NULL,
FALSE,
:p_conc_request_id,
222, -- Receivables
'ARXSGPO', -- Statement Generate
'en-US', -- English
'N',
'RTF',
'PDF');
IF l_req_id > 0 THEN
COMMIT;
ELSE
srw.message(20004, 'Failed to submit request');
END IF;
ELSE -- Not L_XML_LAYOUT
srw.message(20005, 'Template is not picked ');
END IF;
END;
--------------------Code Ends----------------------------
SRW.USER_EXIT('FND SRWEXIT');
RETURN (TRUE);
END;
==============================================
After Printing the Statements through Print Documents-->Statements
Statement Generation Program is being called and later XML Report Publisher program is also being invoked.
But the XML Report Publisher Program is erroring out with below error.
XML Publisher: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
XDOREPPB module: XML Report Publisher
Current system time is 03-SEP-2012 17:42:18
Oracle XML Publisher 5.6.3
java.lang.NumberFormatException: For input string: "ARXSGPO"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:215)
at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
Start of log messages from FND_FILE
End of log messages from FND_FILE
Executing request completion options...
Output file size:
0
------------- 1) PUBLISH -------------
Disabling requested Output Post Processing. Nothing to process. The output of the request is zero byte.
Finished executing request completion options.
Concurrent request completed
Current system time is 03-SEP-2012 17:42:22
Please help out with a solution.
Thanks,
Tech Dfor r12 add one row for parameter "Dummy for Data Security" from desc of XDOREPPB
follow works for me
SQL> set serveroutput on
SQL>
SQL> declare
2 v_request_id number;
3 begin
4
5 begin fnd_global.apps_initialize(0, 20419, 0); end;
6 v_request_id := FND_REQUEST.SUBMIT_REQUEST('XDO',
7 'XDOREPPB',
8 NULL,
9 NULL,
10 FALSE,
11 'N', -- Dummy for Data Security
12 9888637, -- Request
13 0, -- Template Application
14 'XXAND10_1', -- Template
15 'en-US', -- Template Locale
16 'N', -- Debug Flag
17 'RTF', -- Template Type
18 'RTF' -- Output Format
19 );
20
21 dbms_output.put_line(v_request_id);
22 if v_request_id > 0 then
23 dbms_output.put_line('successfully submitted.');
24 commit;
25 else
26 dbms_output.put_line('not submitted.');
27 rollback;
28 end if;
29
30 end;
31 /
9888651
successfully submitted.
PL/SQL procedure successfully completed
SQL> 'Y' for "Dummy for Data Security" also works for me
SQL> declare
2 v_request_id number;
3 begin
4
5 begin fnd_global.apps_initialize(0, 20419, 0); end;
6 v_request_id := FND_REQUEST.SUBMIT_REQUEST('XDO',
7 'XDOREPPB',
8 NULL,
9 NULL,
10 FALSE,
11 'Y', -- Dummy for Data Security
12 9888637, -- Request
13 0, -- Template Application
14 'XXAND10_1', -- Template
15 'en-US', -- Template Locale
16 'N', -- Debug Flag
17 'RTF', -- Template Type
18 'RTF' -- Output Format
19 );
20
21 dbms_output.put_line(v_request_id);
22 if v_request_id > 0 then
23 dbms_output.put_line('successfully submitted.');
24 commit;
25 else
26 dbms_output.put_line('not submitted.');
27 rollback;
28 end if;
29
30 end;
31 /
9888652
successfully submitted.
PL/SQL procedure successfully completed
SQL> -
INSERT statement in Java and MS Access
Hi all,
can anyone please tell me how to insert data to an MS Access table using JSP i tried INSERT statement of java but it is getting errors saying INSERT statement is wrong. I have no idea about MS access insert statement. i am totally tired of this. Please someone help me.Hello,
MS Sql can cause problems where it goes off standard, however I dont think insert is any different.
INSERT INTO table_name (column1, column2) VALUES (variable1, variable2)
Make sure your table and column names are exactly right, Java is case sensitive, so make sure the case is correct also.
The other common error is if you have a required field in the database that is not populated by your program, so, if for instance there was a column3 in the table for the above example, which was a required field, the sql would fail as there is no data being entered for column3. -
Insert statement taking more time
Hi,
Insert happening very slow after sqlldr happening in my program. Please find the below workflow of my program.
1) SQLLDR will be called, it will insert around 4 lakhs records in 'TEMP" table using direct path load.Response time is good here.
2)After, SQLLDR has finished its job, my procedure will be called, there every cursor statement working fine, but when it comes for "INSERT" statement it takes almost 40 mins.
3)Insert statement like this
INSERT /*+ append */ INTO HISTORY_TABLE(<COLUMN1>,<COLUMN2>,..etc) SELECT (<COLUMN1>,.<COLUMN2>...etc) from TEMP_TABLE;
4)select records from temp table which records were inserted during sqlldr(direct=true),before procedure call.
5)I check explain plan for the Insert statement it shows conventional path loading
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
| 0 | INSERT STATEMENT | | 409K| 143M| 6752 (2)|
| 1 | LOAD AS SELECT | HISTORY_TABLE | | | |
| 2 | TABLE ACCESS FULL | TEMP_TABLE | 409K| 143M| 6752 (2)|
6)Since i have no where condition in my insert statement it go for an full table scan.
Kindly advice to impove its performance.
My db is oracle 11g r2(11.2.0.3.0)
OS-Windows server 2008 r2
Tkprof for the sesion:
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 98.10 1860.58 347770 74736 1711253 407077
Fetch 0 0.00 0.00 0 0 0 0
total 1 98.10 1860.58 347770 74736 1711253 407077
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 84 (recursive depth: 1)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 256304 6.61 1299.01
direct path read temp 273 3.47 14.99
log buffer space 22 0.75 3.84
log file switch completion 7 19.48 30.70
log file switch (checkpoint incomplete) 16 8.12 17.15
db file parallel read 2 0.07 0.09
log file switch (private strand flush incomplete)
3 0.32 0.74
buffer busy waits 4 0.00 0.00
undo segment extension 2 0.00 0.00
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.2.0.3
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 128
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL>
SQL> l
1 select
2* sname,pname,pval1,pval2 from sys.aux_stats$
SQL> /
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 11-03-2011 06:38
SYSSTATS_INFO DSTOP 11-03-2011 06:38
SYSSTATS_INFO FLAGS 1
SYSSTATS_MAIN CPUSPEEDNW 1720.20725
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED
SYSSTATS_MAIN MBRC
SNAME PNAME PVAL1 PVAL2
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
Thanks
FaizHi,
Below i apend the both table definitions. Please check
CREATE TABLE HISTORY_TABLE
( DAT_TIM VARCHAR2(19 BYTE),
REC_TYP VARCHAR2(2 BYTE),
AUTH_PPD VARCHAR2(4 BYTE),
LN_TERM VARCHAR2(4 BYTE),
FIID_TERM VARCHAR2(4 BYTE),
TERM_ID VARCHAR2(16 BYTE),
LN_ISSUER VARCHAR2(4 BYTE),
FIID_ISSUER VARCHAR2(20 BYTE),
PAN VARCHAR2(19 BYTE),
MBR_NUM VARCHAR2(3 BYTE),
BRCH_ID VARCHAR2(4 BYTE),
REGN_ID VARCHAR2(4 BYTE),
USER_FLD1X VARCHAR2(2 BYTE),
TYP_CDE VARCHAR2(2 BYTE),
TYP VARCHAR2(4 BYTE),
RTE_STAT VARCHAR2(2 BYTE),
ORIGINATOR CHAR(1 BYTE),
RESPONDER CHAR(1 BYTE),
ENTRY_TIM VARCHAR2(19 BYTE),
EXIT_TIM VARCHAR2(19 BYTE),
RE_ENTRY_TIM VARCHAR2(19 BYTE),
TRAN_DAT VARCHAR2(6 BYTE),
TRAN_TIM VARCHAR2(8 BYTE),
POST_DAT VARCHAR2(6 BYTE),
ACQ_ICHG_SETL_DAT VARCHAR2(6 BYTE),
ISS_ICHG_SETL_DAT VARCHAR2(6 BYTE),
SEQ_NUM VARCHAR2(12 BYTE),
TERM_TYP VARCHAR2(2 BYTE),
TIM_OFST VARCHAR2(5 BYTE),
ACQ_INST_ID_NUM VARCHAR2(11 BYTE),
RCV_INST_ID_NUM VARCHAR2(11 BYTE),
T_CDE VARCHAR2(2 BYTE),
T_FROM VARCHAR2(2 BYTE),
T_TO VARCHAR2(2 BYTE),
FROM_ACCT VARCHAR2(24 BYTE),
USER_FLD1 VARCHAR2(1 BYTE),
TO_ACCT VARCHAR2(19 BYTE),
MULT_ACCT VARCHAR2(1 BYTE),
AMT1 VARCHAR2(19 BYTE),
AMT2 VARCHAR2(19 BYTE),
AMT3 VARCHAR2(19 BYTE),
DEP_BAL_CR VARCHAR2(10 BYTE),
DEP_TYP VARCHAR2(1 BYTE),
RESP_BYTE1 VARCHAR2(3 BYTE),
RESP_BYTE2 VARCHAR2(3 BYTE),
TERM_NAME_LOC VARCHAR2(25 BYTE),
TERM_OWNER_NAME VARCHAR2(40 BYTE),
TERM_CITY VARCHAR2(13 BYTE),
TERM_ST_X VARCHAR2(3 BYTE),
TERM_CNTRY_X VARCHAR2(2 BYTE),
OSEQ_NUM VARCHAR2(12 BYTE),
OTRAN_DAT VARCHAR2(4 BYTE),
OTRAN_TIM VARCHAR2(8 BYTE),
B24_POST_DAT VARCHAR2(4 BYTE),
ORIG_CRNCY_CDE VARCHAR2(3 BYTE),
AUTH_CRNCY_CDE VARCHAR2(3 BYTE),
AUTH_CONV_RATE VARCHAR2(8 BYTE),
SETL_CRNCY_CDE VARCHAR2(3 BYTE),
SETL_CONV_RATE VARCHAR2(8 BYTE),
CONV_DAT_TIM VARCHAR2(19 BYTE),
RVSL_RSN VARCHAR2(2 BYTE),
PIN_OFST VARCHAR2(16 BYTE),
SHRG_GRP VARCHAR2(1 BYTE),
DEST_ORDER VARCHAR2(1 BYTE),
AUTH_ID_RESP VARCHAR2(6 BYTE),
IMP_IND VARCHAR2(1 BYTE),
AVAIL_IMP VARCHAR2(2 BYTE),
LEDG_IMP VARCHAR2(2 BYTE),
HLD_AMT_IMP VARCHAR2(2 BYTE),
CAF_REFR_IND VARCHAR2(1 BYTE),
USER_FLD3 VARCHAR2(1 BYTE),
DEP_SETL_IMP_FLG VARCHAR2(1 BYTE),
ADJ_SETL_IMP_FLG VARCHAR2(1 BYTE),
PBF1 VARCHAR2(1 BYTE),
PBF2 VARCHAR2(1 BYTE),
PBF3 VARCHAR2(1 BYTE),
PBF4 VARCHAR2(1 BYTE),
USER_FLD4 VARCHAR2(16 BYTE),
FRWD_INST_ID_NUM VARCHAR2(11 BYTE),
CRD_ACCPT_ID_NUM VARCHAR2(40 BYTE),
CRD_ISS_ID_NUM VARCHAR2(11 BYTE),
USER_FLD6 VARCHAR2(1 BYTE),
FILE_NAME VARCHAR2(100 BYTE),
ERR_FLAG CHAR(1 BYTE),
AMT2_ACTUAL VARCHAR2(20 BYTE),
ID_COL NUMBER(23,0),
RVSL_FLAG CHAR(1 BYTE),
SWRE_ID VARCHAR2(20 BYTE),
GAC_ID VARCHAR2(20 BYTE),
INS_USER NUMBER(5,0),
PART_CODE NUMBER(3,0),
ISS_RECON NUMBER(1,0),
ACQ_RECON NUMBER(1,0),
CROSS_BRANCH CHAR(1 BYTE),
CONSORTIUM_CODE NUMBER(3,0),
FROM_HOST VARCHAR2(1 BYTE),
FROM_HOST_ACQ VARCHAR2(1 BYTE),
AUDIT_NUM VARCHAR2(12 BYTE),
CAPTURE_CODE VARCHAR2(1 BYTE),
RESP_DAT_TIME VARCHAR2(19 BYTE),
PAN_SEQ_NUM NUMBER(1,0),
SERVICE_CODE VARCHAR2(3 BYTE),
ISS_BIN VARCHAR2(6 BYTE),
POS_DATA VARCHAR2(12 BYTE),
SECURITY_DATA VARCHAR2(8 BYTE),
CASHBACK_AMT VARCHAR2(15 BYTE),
REPLACEMENT_AMOUNT VARCHAR2(15 BYTE),
SETTL_AMT VARCHAR2(16 BYTE),
TRAN_FEE VARCHAR2(15 BYTE),
SETL_FEE VARCHAR2(15 BYTE),
MERC_CODE VARCHAR2(4 BYTE),
NTWORK_DATA VARCHAR2(12 BYTE),
PRIVATE_DATA_C_100 VARCHAR2(100 BYTE),
PAYMENT_INFO VARCHAR2(50 BYTE),
SURCHARGE_FEE VARCHAR2(15 BYTE),
SURC_BILL_AMT VARCHAR2(19 BYTE),
PROCESSING_CODE VARCHAR2(7 BYTE),
FRWD_CNTRY_CODE VARCHAR2(3 BYTE),
NTWORK_CODE VARCHAR2(2 BYTE),
FUNCTION_CODE VARCHAR2(3 BYTE),
REASON_CODE VARCHAR2(4 BYTE),
FEES VARCHAR2(10 BYTE),
SUR_CHARGE VARCHAR2(10 BYTE),
MESSAGE_TYPE VARCHAR2(4 BYTE),
APPROVE_STATUS VARCHAR2(10 BYTE),
CPS_TRAN_ID VARCHAR2(20 BYTE),
BANKTYPE_CODE VARCHAR2(5 BYTE),
RRB_BIN_CODE VARCHAR2(7 BYTE),
T_TYPE VARCHAR2(5 BYTE),
FEE_CRNCY VARCHAR2(25 BYTE),
FEE_INDICATOR VARCHAR2(1 BYTE),
FEE_TYPE VARCHAR2(84 BYTE),
CREDIT_BANK_CODE VARCHAR2(11 BYTE),
CREDIT_BR_CODE VARCHAR2(8 BYTE),
DEBIT_BANK_CODE VARCHAR2(11 BYTE),
ACTION_CODE VARCHAR2(3 BYTE),
ZEROS VARCHAR2(6 BYTE),
OTRACE_AUDIT_NO VARCHAR2(6 BYTE),
OFEE_TYPE1 VARCHAR2(2 BYTE),
OFEE_CRNCY1 VARCHAR2(3 BYTE),
OFEE_AMNT VARCHAR2(16 BYTE),
OFEE_INDICATOR VARCHAR2(1 BYTE),
SPACES VARCHAR2(2 BYTE),
ACQ_BANK_CODE VARCHAR2(6 BYTE),
CASHAT_POS VARCHAR2(16 BYTE),
LTS_STATUS VARCHAR2(30 BYTE),
APP_CODE VARCHAR2(6 BYTE),
CARD_ACCEPTID VARCHAR2(15 BYTE),
RESPONSE_CODE VARCHAR2(15 BYTE),
RES_RECVD_HOST VARCHAR2(1 BYTE),
DEVICE_ID VARCHAR2(16 BYTE),
RECORD_TYPE VARCHAR2(1 BYTE),
RRT_DEBIT_BANK_CODE VARCHAR2(11 BYTE),
ORIG_TYP VARCHAR2(6 BYTE),
DEVICE_TYPE VARCHAR2(3 BYTE),
ORGTRAN_CODE VARCHAR2(4 BYTE),
BILL_CRNCY VARCHAR2(3 BYTE),
BILL_AMNT VARCHAR2(19 BYTE),
OTRAN_AMNT VARCHAR2(19 BYTE),
INS_DATE DATE,
RECON_FLAG VARCHAR2(2 BYTE),
TRAN_ID VARCHAR2(25 BYTE)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX ON HISTORY_TABLE (TYP, DEVICE_ID, FROM_ACCT, AMT1, NTWORK_CODE, ISS_BIN, POST_DAT, RESP_BYTE1, DEVICE_TYPE, T_CDE, PRIVATE_DATA_C_100, REASON_CODE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX1 ON HISTORY_TABLE (TO_NUMBER(AMT1))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX_FN ON HISTORY_TABLE (SUBSTR(DEVICE_ID,4))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX_IDX ON HISTORY_TABLE (T_CDE, PRIVATE_DATA_C_100, ISS_BIN)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX_TST ON HISTORY_TABLE (TYP, POST_DAT, RESP_BYTE1, DEVICE_TYPE, AMT1)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX_TST1 ON HISTORY_TABLE (DEVICE_TYPE, TO_NUMBER(AMT1))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IDX_ALLSWT_PAN ON HISTORY_TABLE (PAN)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
Table Definition for TEMP Table:
CREATE TABLE REC_TLF_TEMP
( DAT_TIM VARCHAR2(19 BYTE),
REC_TYP VARCHAR2(2 BYTE),
AUTH_PPD VARCHAR2(4 BYTE),
LN_TERM VARCHAR2(4 BYTE),
FIID_TERM VARCHAR2(4 BYTE),
TERM_ID VARCHAR2(16 BYTE),
LN_ISSUER VARCHAR2(4 BYTE),
FIID_ISSUER VARCHAR2(20 BYTE),
PAN VARCHAR2(19 BYTE),
MBR_NUM VARCHAR2(3 BYTE),
BRCH_ID VARCHAR2(4 BYTE),
REGN_ID VARCHAR2(4 BYTE),
USER_FLD1X VARCHAR2(2 BYTE),
TYP_CDE VARCHAR2(2 BYTE),
TYP VARCHAR2(4 BYTE),
RTE_STAT VARCHAR2(2 BYTE),
ORIGINATOR CHAR(1 BYTE),
RESPONDER CHAR(1 BYTE),
ENTRY_TIM VARCHAR2(19 BYTE),
EXIT_TIM VARCHAR2(19 BYTE),
RE_ENTRY_TIM VARCHAR2(19 BYTE),
TRAN_DAT VARCHAR2(6 BYTE),
TRAN_TIM VARCHAR2(8 BYTE),
POST_DAT VARCHAR2(6 BYTE),
ACQ_ICHG_SETL_DAT VARCHAR2(6 BYTE),
ISS_ICHG_SETL_DAT VARCHAR2(6 BYTE),
SEQ_NUM VARCHAR2(12 BYTE),
TERM_TYP VARCHAR2(2 BYTE),
TIM_OFST VARCHAR2(5 BYTE),
ACQ_INST_ID_NUM VARCHAR2(11 BYTE),
RCV_INST_ID_NUM VARCHAR2(11 BYTE),
T_CDE VARCHAR2(2 BYTE),
T_FROM VARCHAR2(2 BYTE),
T_TO VARCHAR2(2 BYTE),
FROM_ACCT VARCHAR2(24 BYTE),
USER_FLD1 VARCHAR2(1 BYTE),
TO_ACCT VARCHAR2(19 BYTE),
MULT_ACCT VARCHAR2(1 BYTE),
AMT1 VARCHAR2(19 BYTE),
AMT2 VARCHAR2(19 BYTE),
AMT3 VARCHAR2(19 BYTE),
DEP_BAL_CR VARCHAR2(10 BYTE),
DEP_TYP VARCHAR2(1 BYTE),
RESP_BYTE1 VARCHAR2(3 BYTE),
RESP_BYTE2 VARCHAR2(3 BYTE),
TERM_NAME_LOC VARCHAR2(25 BYTE),
TERM_OWNER_NAME VARCHAR2(40 BYTE),
TERM_CITY VARCHAR2(13 BYTE),
TERM_ST_X VARCHAR2(3 BYTE),
TERM_CNTRY_X VARCHAR2(2 BYTE),
OSEQ_NUM VARCHAR2(12 BYTE),
OTRAN_DAT VARCHAR2(4 BYTE),
OTRAN_TIM VARCHAR2(8 BYTE),
B24_POST_DAT VARCHAR2(4 BYTE),
ORIG_CRNCY_CDE VARCHAR2(3 BYTE),
AUTH_CRNCY_CDE VARCHAR2(3 BYTE),
AUTH_CONV_RATE VARCHAR2(8 BYTE),
SETL_CRNCY_CDE VARCHAR2(3 BYTE),
SETL_CONV_RATE VARCHAR2(8 BYTE),
CONV_DAT_TIM VARCHAR2(19 BYTE),
RVSL_RSN VARCHAR2(2 BYTE),
PIN_OFST VARCHAR2(16 BYTE),
SHRG_GRP VARCHAR2(1 BYTE),
DEST_ORDER VARCHAR2(1 BYTE),
AUTH_ID_RESP VARCHAR2(6 BYTE),
IMP_IND VARCHAR2(1 BYTE),
AVAIL_IMP VARCHAR2(2 BYTE),
LEDG_IMP VARCHAR2(2 BYTE),
HLD_AMT_IMP VARCHAR2(2 BYTE),
CAF_REFR_IND VARCHAR2(1 BYTE),
USER_FLD3 VARCHAR2(1 BYTE),
DEP_SETL_IMP_FLG VARCHAR2(1 BYTE),
ADJ_SETL_IMP_FLG VARCHAR2(1 BYTE),
PBF1 VARCHAR2(1 BYTE),
PBF2 VARCHAR2(1 BYTE),
PBF3 VARCHAR2(1 BYTE),
PBF4 VARCHAR2(1 BYTE),
USER_FLD4 VARCHAR2(16 BYTE),
FRWD_INST_ID_NUM VARCHAR2(11 BYTE),
CRD_ACCPT_ID_NUM VARCHAR2(40 BYTE),
CRD_ISS_ID_NUM VARCHAR2(11 BYTE),
USER_FLD6 VARCHAR2(1 BYTE),
FILE_NAME VARCHAR2(100 BYTE),
ERR_FLAG CHAR(1 BYTE),
AMT2_ACTUAL VARCHAR2(20 BYTE),
ID_COL NUMBER(23,0),
RVSL_FLAG CHAR(1 BYTE),
SWRE_ID VARCHAR2(20 BYTE),
GAC_ID VARCHAR2(20 BYTE),
INS_USER NUMBER(5,0),
PART_CODE NUMBER(3,0),
ISS_RECON NUMBER(1,0),
ACQ_RECON NUMBER(1,0),
CROSS_BRANCH CHAR(1 BYTE),
CONSORTIUM_CODE NUMBER(3,0),
FROM_HOST VARCHAR2(1 BYTE),
FROM_HOST_ACQ VARCHAR2(1 BYTE),
AUDIT_NUM VARCHAR2(12 BYTE),
CAPTURE_CODE VARCHAR2(1 BYTE),
RESP_DAT_TIME VARCHAR2(19 BYTE),
PAN_SEQ_NUM NUMBER(1,0),
SERVICE_CODE VARCHAR2(3 BYTE),
ISS_BIN VARCHAR2(6 BYTE),
POS_DATA VARCHAR2(12 BYTE),
SECURITY_DATA VARCHAR2(8 BYTE),
CASHBACK_AMT VARCHAR2(15 BYTE),
REPLACEMENT_AMOUNT VARCHAR2(15 BYTE),
SETTL_AMT VARCHAR2(16 BYTE),
TRAN_FEE VARCHAR2(15 BYTE),
SETL_FEE VARCHAR2(15 BYTE),
MERC_CODE VARCHAR2(4 BYTE),
NTWORK_DATA VARCHAR2(12 BYTE),
PRIVATE_DATA_C_100 VARCHAR2(100 BYTE),
PAYMENT_INFO VARCHAR2(50 BYTE),
SURCHARGE_FEE VARCHAR2(15 BYTE),
SURC_BILL_AMT VARCHAR2(19 BYTE),
PROCESSING_CODE VARCHAR2(7 BYTE),
FRWD_CNTRY_CODE VARCHAR2(3 BYTE),
NTWORK_CODE VARCHAR2(2 BYTE),
FUNCTION_CODE VARCHAR2(3 BYTE),
REASON_CODE VARCHAR2(4 BYTE),
FEES VARCHAR2(10 BYTE),
SUR_CHARGE VARCHAR2(10 BYTE),
MESSAGE_TYPE VARCHAR2(4 BYTE),
APPROVE_STATUS VARCHAR2(10 BYTE),
CPS_TRAN_ID VARCHAR2(20 BYTE),
BANKTYPE_CODE VARCHAR2(5 BYTE),
RRB_BIN_CODE VARCHAR2(7 BYTE),
T_TYPE VARCHAR2(5 BYTE),
FEE_CRNCY VARCHAR2(25 BYTE),
FEE_INDICATOR VARCHAR2(1 BYTE),
FEE_TYPE VARCHAR2(84 BYTE),
CREDIT_BANK_CODE VARCHAR2(11 BYTE),
CREDIT_BR_CODE VARCHAR2(8 BYTE),
DEBIT_BANK_CODE VARCHAR2(11 BYTE),
ACTION_CODE VARCHAR2(3 BYTE),
ZEROS VARCHAR2(6 BYTE),
OTRACE_AUDIT_NO VARCHAR2(6 BYTE),
OFEE_TYPE1 VARCHAR2(2 BYTE),
OFEE_CRNCY1 VARCHAR2(3 BYTE),
OFEE_AMNT VARCHAR2(16 BYTE),
OFEE_INDICATOR VARCHAR2(1 BYTE),
SPACES VARCHAR2(2 BYTE),
ACQ_BANK_CODE VARCHAR2(6 BYTE),
CASHAT_POS VARCHAR2(16 BYTE),
LTS_STATUS VARCHAR2(30 BYTE),
APP_CODE VARCHAR2(6 BYTE),
CARD_ACCEPTID VARCHAR2(15 BYTE),
RESPONSE_CODE VARCHAR2(15 BYTE),
RES_RECVD_HOST VARCHAR2(1 BYTE),
DEVICE_ID VARCHAR2(16 BYTE),
RECORD_TYPE VARCHAR2(1 BYTE),
RRT_DEBIT_BANK_CODE VARCHAR2(11 BYTE),
ORIG_TYP VARCHAR2(6 BYTE),
DEVICE_TYPE VARCHAR2(3 BYTE),
ORGTRAN_CODE VARCHAR2(4 BYTE),
BILL_CRNCY VARCHAR2(3 BYTE),
TRAN_ID VARCHAR2(25 BYTE),
RECON_FLAG VARCHAR2(2 BYTE),
BILL_AMNT VARCHAR2(19 BYTE),
OTRAN_AMNT VARCHAR2(19 BYTE),
INS_DATE DATE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX CMS_TLF_TEMP_INDEX3 ON REC_TLF_TEMP (TO_NUMBER(PAN))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_TLF_TEMP_INDEX4 ON REC_TLF_TEMP (TO_NUMBER(AUDIT_NUM))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IDX_REC_TEMP_CDE ON REC_TLF_TEMP (T_CDE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX IDX_TLF_DEVICEID ON REC_TLF_TEMP (DEVICE_ID)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IDX_TLF_PRIVATE ON REC_TLF_TEMP (PRIVATE_DATA_C_100)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX IDX_TLF_TEMP_BYTE1 ON REC_TLF_TEMP (PRIVATE_DATA_C_100, ISS_BIN, NTWORK_CODE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX IDX_TLF_TEMP_TST ON REC_TLF_TEMP (RESP_BYTE1)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IND_TLFTEMP_RVSLFLG ON REC_TLF_TEMP (RVSL_FLAG)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IND_TLFTEMP_TRMID_TCD ON REC_TLF_TEMP (TERM_ID, T_CDE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IND_TLFTMP_NWCDE ON REC_TLF_TEMP (NTWORK_CODE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX REC_TLF_TEMP_INDEX ON REC_TLF_TEMP (PAN, SEQ_NUM, AUDIT_NUM)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX TEMPREVLSET ON REC_TLF_TEMP (SEQ_NUM, TYP, REC_TYP, PAN)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
It shows that no triggers for both the tables.
Confirm that no where condition being used in the SQL.
Thanks
Faiz -
How to tune the Insert statement?
Hi ,
I am using 10.2.0.4.0 version of oracle.
i am having one insert statement , which comes almost all the time in the TOP of my AWR elapsed time section.
And its somewhat similar to as below.
Query:
INSERT INTO a (InvoicePK, CheckPK)
SELECT DISTINCT ih.InvoicePK, cd.CheckPK
FROM at,
cd,
ih,
rd
WHERE at.AttachmentPK = :1
AND cd.CheckPK = at.CheckPK
AND at.AttachmentPK = rd.AttachPK
AND ih.PAYPK = cd.PAYEEPAYPK
AND ih.PayerNS = cd.PayerNS
AND ih.PayerPayId = cd.PayerPayId
AND ih.UpperInvoiceNum = rd.UPPERINVNUM
AND ih.InvoiceStatusCD NOT IN ('REJ', 'DNY');
Below is the plan for the 'Select ' statement i.e. used in the insert statement.
Execution Plan:
Plan hash value: 2232002808
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 193 | 9 (23)| 00:00:01 | | |
| 1 | HASH UNIQUE | | 1 | 193 | 9 (23)| 00:00:01 | | |
|* 2 | HASH JOIN | | 1 | 193 | 8 (13)| 00:00:01 | | |
| 3 | NESTED LOOPS | | 10 | 1740 | 4 (0)| 00:00:01 | | |
| 4 | NESTED LOOPS | | 1 | 85 | 3 (0)| 00:00:01 | | |
| 5 | TABLE ACCESS BY INDEX ROWID | at | 1 | 16 | 2 (0)| 00:00:01 | | |
|* 6 | INDEX UNIQUE SCAN | atpk1 | 1 | | 1 (0)| 00:00:01 | | |
| 7 | TABLE ACCESS BY INDEX ROWID | cd | 7359K| 484M| 1 (0)| 00:00:01 | | |
|* 8 | INDEX UNIQUE SCAN | cdpk1 | 1 | | 1 (0)| 00:00:01 | | |
|* 9 | TABLE ACCESS BY GLOBAL INDEX ROWID| ih | 10 | 890 | 2 (0)| 00:00:01 | ROWID | ROWID |
|* 10 | INDEX RANGE SCAN | IH_PAYPK_PAYERNS_PAYID | 5 | | 1 (0)| 00:00:01 | | |
| 11 | TABLE ACCESS BY INDEX ROWID | rd | 9 | 171 | 3 (0)| 00:00:01 | | |
|* 12 | INDEX RANGE SCAN | IDX_rd | 9 | | 2 (0)| 00:00:01 | | |
Predicate Information (identified by operation id):
2 - access("IH"."UPPERINVOICENUM"="RD"."UPPERINVNUM")
6 - access("AT"."ATTACHMENTPK"=7794833983)
8 - access("CD"."CHECKPK"="AT"."CHECKPK")
9 - filter("IH"."INVOICESTATUSCD"<>'REJ' AND "IH"."INVOICESTATUSCD"<>'DNY')
10 - access("IH"."PAYPK"="CD"."PAYEEPAYPK" AND "IH"."PAYERNS"="CD"."PAYERNS" AND "IH"."PAYERPAYID"="CD"."PAYERPAYID")
12 - access("RD"."ATTACHPK"=7794833983)
Statistics
1 recursive calls
0 db block gets
71 consistent gets
0 physical reads
0 redo size
316 bytes sent via SQL*Net to client
240 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
3 rows processed
The 'select' Statement executes with in seconds resulting 3 distinct records, but the insert statement takes ~20sec(Elaps time per execution
as shown in AWR report) for one time execution, so what must be the reason , and how should i proceed to resolve this performance issue?You can do as follows:
- Enable trace
- execute the insert statement
- use tkprof (and put the results here) to see where's its taking long
Also, while insert is being executed, what are the wait events you see ?
I dont think there is problem with plan. -
Running .sql file or insert statements
I have a large .sql file compiled from SQL developer from a SQL Server database. Whatever I do, I cannot get the rows to be permanently committed to the oracle db. I tried copying the text directly from the file and running it as a script on the Oracle server which seemed to work but the rows did not actually commit, they weren't available in the program and when I restarted the SQL Developer program they disappeared.
I also tried using SQL Plus and received the same results. I even tried copying just a single insert statement in with no success.
A second problem I have is when copying the entire file over, somewhere around line 500 it starts asking for substation variables, which I have no idea what they are or why it's asking for them.
Thanks for any help :)Daft question, but have you got "commit" in your script?
Also, you'll need to "set define off" at the beginning of your script - & is the default prompt for SQLPLUS to ask for a variable, so if you're trying to insert "You & Me", it'll prompt you for a value for Me, unless you've got set define off. -
Nds Insert statement little problem
DB version XE 10g
Hello
I have little problem with my insert statement.
In my code, are many examples, but plz focus on V2 and V3 part.
As you can see V2 and V3 are not working
I get following errors
V2
Error report:
ORA-00984: column not allowed here
ORA-06512: AT line 28
00984. 00000 - "column not allowed here"
V3
Error report:
ORA-00917: missing comma
ORA-06512: AT line 33
00917. 00000 - "missing comma"
I really have no idea, why i'm getting these errors...
DROP TABLE FILMYARNOLD;
CREATE TABLE FILMYARNOLD
FIL_ID VARCHAR2 (329),
FIL_NAME VARCHAR2 (592),
FIL_YEAR VARCHAR2 (294),
FIL_ACTOR VARCHAR2 (392),
FIL_TEXTT VARCHAR2 (2596)
SET SERVEROUTPUT ON
DECLARE
TYPE FIL_TABLE IS TABLE OF VARCHAR2 (256);
vfilmiczki FIL_TABLE := fil_table();
statement VARCHAR2 (2048);
BEGIN
vfilmiczki.EXTEND;
vfilmiczki(1) := '77804';
vfilmiczki.EXTEND;
vfilmiczki(2) := 'Predator';
vfilmiczki.EXTEND;
vfilmiczki(3) := '1984';
vfilmiczki.EXTEND;
vfilmiczki(4) := 'Arnold';
vfilmiczki.EXTEND;
vfilmiczki(5) := 'get to the choppa';
/*statement := 'INSERT INTO FILMYARNOLD (FIL_ID, FIL_NAME, FIL_YEAR, FIL_ACTOR, FIL_TEXTT) VALUES ( ';
statement := statement|| '''chlip'',''lol'',''lol'',''chlip''';--
statement := statement||',''hmm'')';*/
-------V1------------working-----------------
--statement := 'INSERT INTO FILMYARNOLD (FIL_ID) VALUES ( ';
--statement := statement||vfilmiczki(1)||' )';
--EXECUTE IMMEDIATE statement;
--------V2-------------------- not working -----------------------------------------
--statement := 'INSERT INTO FILMYARNOLD (FIL_ID, FIL_NAME) VALUES ( ';
--statement := statement||vfilmiczki(1)||','||vfilmiczki(2)||' )';
--EXECUTE IMMEDIATE statement;
----V3------------ not working ------------
statement := 'INSERT INTO FILMYARNOLD (FIL_ID, FIL_NAME, FIL_YEAR, FIL_ACTOR, FIL_TEXTT) VALUES ( ';
statement := statement||vfilmiczki(1)||','||vfilmiczki(2)||','||vfilmiczki(3)||','||vfilmiczki(4)||','||vfilmiczki(5)||' )';
EXECUTE IMMEDIATE statement;
/* statement := 'INSERT INTO FILMYARNOLD VALUES (:jeden, :dwa, :trzy, :cztery, :piec)';
EXECUTE IMMEDIATE statement
USING vfilmiczki(1)
, vfilmiczki(2)
, vfilmiczki(3)
, vfilmiczki(4)
, vfilmiczki(5); */
statement := 'INSERT INTO FILMYARNOLD VALUES ('; --(:jeden, :dwa, :trzy, :cztery, :piec)';
FOR i IN 1..vfilmiczki.COUNT
LOOP
IF i = vfilmiczki.LAST THEN
statement := statement||vfilmiczki(i)||' )';
ELSE
statement := statement||vfilmiczki(i)||', ';
END IF;
--DBMS_OUTPUT.PUT_LINE (vfilmiczki(i));
END LOOP;
EXECUTE IMMEDIATE statement;
--INSERT INTO FILMYARNOLD
--VALUES (vfilmiczki(vfilmiczki.FIRST),vfilmiczki(2),vfilmiczki(3),
--vfilmiczki(4), vfilmiczki(5));
--DBMS_OUTPUT.PUT_LINE ('*****************');
--DBMS_OUTPUT.PUT_LINE (vfilmiczki((vfilmiczki.LAST)));
END;
/Im waiting for your replys
greetingsHi,
change V2 to:
STATEMENT := 'INSERT INTO FILMYARNOLD (FIL_ID, FIL_NAME) VALUES ( ';
STATEMENT := STATEMENT||VFILMICZKI(1)||','''||VFILMICZKI(2)||''' )';
EXECUTE IMMEDIATE statement;and V3 to:
----V3------------ not working ------------
STATEMENT := 'INSERT INTO FILMYARNOLD (FIL_ID, FIL_NAME, FIL_YEAR, FIL_ACTOR, FIL_TEXTT) VALUES ( ';
STATEMENT := STATEMENT||VFILMICZKI(1)||','''||VFILMICZKI(2)||''','||VFILMICZKI(3)
||','''||VFILMICZKI(4)||''','''||VFILMICZKI(5)||''' )';
EXECUTE IMMEDIATE statement;EXECUTE IMMEDIATE statement;One general remark: INSERT can be used directly in PL/SQL, you don't need to bother with dynamic SQL,
and the direct SQL will be probably more efficient than dynamic SQL.
Try this:
SET SERVEROUTPUT ON
DECLARE
TYPE FIL_TABLE IS TABLE OF VARCHAR2 (256);
vfilmiczki FIL_TABLE := fil_table();
statement VARCHAR2 (2048);
BEGIN
vfilmiczki.EXTEND;
vfilmiczki(1) := '77804';
vfilmiczki.EXTEND;
vfilmiczki(2) := 'Predator';
vfilmiczki.EXTEND;
vfilmiczki(3) := '1984';
vfilmiczki.EXTEND;
vfilmiczki(4) := 'Arnold';
vfilmiczki.EXTEND;
vfilmiczki(5) := 'get to the choppa';
-------V1------------working-----------------
INSERT INTO FILMYARNOLD (FIL_ID) VALUES ( VFILMICZKI(1) );
--------V2-------------------- not working -----------------------------------------
INSERT INTO FILMYARNOLD (FIL_ID, FIL_NAME) VALUES ( VFILMICZKI(1),VFILMICZKI(2));
----V3------------ not working ------------
INSERT INTO FILMYARNOLD (FIL_ID, FIL_NAME, FIL_YEAR, FIL_ACTOR, FIL_TEXTT)
VALUES ( VFILMICZKI(1), VFILMICZKI(2), VFILMICZKI(3), VFILMICZKI(4), VFILMICZKI(5));
END;
/ -
Hi all
I had problem in insert statement.
I know the column of the table, tablename and the value to be insert.
My code:
Data: column(20) type c. -
>refer to the tablecolumn
Data: tablename(20) type c. -
>refer to table name
Data: value(20) type c. -
>value to be insert to the column in the table
column = 'Admino'.
tablename = 'Student'.
value = '123456'.
<b>insert <column> into <tablename> values <value>.</b>
i know there something wrong with my insert statement. How to do it in abap insert code where i can put in all the parameter in the insert statement.
Anycode or sample to show. Many thank.From f1 help....
EXTRACT
Basic form
EXTRACT fg.
Effect
Writes all fields of the field group fg (FIELD-GROUPS) as an entry in asequential dataset. If you have defined a field group HEADER,its fields precede each entry as a sort key. Afterwards, you canuse SORT and LOOP ... ENDLOOP to sort or process the datasetrespectively. No further EXTRACT statements are possible afterthis.
Notes
General:
As soon as you have extracted a dataset using EXTRACT, you canno longer extend the field group using INSERT. In particular, you cannot change the HEADERfield group at all after the first EXTRACT (regardless of thefield group to which it applied).
Large extract datasets are not stored in main memory. Instead, theyare kept in an external auxiliary file. You can set the directory inwhich this file is created using the SAP profile parameterDIR_EXTRACT. The default directory is the SAP data directory(SAP profile parameter DIR_DATA).
Notes
Runtime errors:
EXTRACT_AFTER_SORT/LOOP: EXTRACT after SORT, orLOOP. EXTRACT_BUFFER_NO_ROLL: Unable to create the required main
EXTRACT_FIELD_TOO_LARGE: Occupied length of a field is toolarge.
EXTRACT_HEADER_NOT_UNIQUE: Field group HEADER wasmodified after an EXTRACT statement.
EXTRACT_OPEN_EXTRACTFILE_OPEN:
Error opening the external extract dataset file.
EXTRACT_RESOURCEHANDLER_FAILED: Error deleting the externalextract dataset file.
EXTRACT_TOO_LARGE: Total length of the entry for extraction(including HEADER fields) is too large.
Additional help
Filling anExtract with Data
Extracts
Since internal tables have fixed line structures, they are not suited to handle data sets with varying structures. Instead, you can use extract datasets for this purpose.
An extract is a sequential dataset in the memory area of the program. You can only address the entries in the dataset within a special loop. The index or key access permitted with internal tables is not allowed. You may only create one extract in any ABAP program. The size of an extract dataset is, in principle, unlimited. Extracts larger than 500KB are stored in operating system files. The practical size of an extract is up to 2GB, as long as there is enough space in the filesystem.
An extract dataset consists of a sequence of records of a pre-defined structure. However, the structure need not be identical for all records. In one extract dataset, you can store records of different length and structure one after the other. You need not create an individual dataset for each different structure you want to store. This fact reduces the maintenance effort considerably.
In contrast to internal tables, the system partly compresses extract datasets when storing them. This reduces the storage space required. In addition, you need not specify the structure of an extract dataset at the beginning of the program, but you can determine it dynamically during the flow of the program.
You can use control level processing with extracts just as you can with internal tables. The internal administration for extract datasets is optimized so that it is quicker to use an extract for control level processing than an internal table.
Procedure for creating an extract:
Define the record types that you want to use in your extract by declaring them as field groups. The structure is defined by including fields in each field group.
Defining an Extract
Fill the extract line by line by extracting the required data.
Filling an Extract with Data
Once you have filled the extract, you can sort it and process it in a loop. At this stage, you can no longer change the contents of the extract.
Processing Extracts
INSERT Statement
The INSERT statement is used to insert values into a single database table.
<insert statement> ::= INSERT INTO <table name> <insert column list> <insert source>.
<insert source> ::= VALUES '(' <value> ( ',' <value> )* ')'
| <query specification>.
<value> ::= <value expression>
| <dynamic parameter specification>
| NULL.
<insert column list> ::= '(' <column name> ( ',' <column name> )* ')'.
In Open SQL the <insert column list> is not optional.
You cannot specify string literals as values for CLOB columns. Hex literals are not supported in Open SQL.
Examples
INSERT INTO employees (employee_id, employee_name)
VALUES (4711, 'John Smith')
Inserting Values. A new row is inserted into the table employees with the values 4711 and 'John Smith' for the columns employee_id and employee_name respectively.
INSERT INTO well_paid_employees (employee_id, salary)
SELECT employee_id, salary
FROM employees
WHERE salary > ?
Inserting the Result of a Query. The employee_idand the salaryof all employees from table employeeswith a salary exceeding a certain value are inserted into the table well_paid_employees.
Please reward points if helpful.
Maybe you are looking for
-
My new purchases will not sync into my playlist and get and will not show up on my iphone playlist of the same name, and I just tried to sync a new cd into my library and it is not showing up on my iphone.
-
??
-
Unable to create a photo calendar from iPhoto
Hi, I'm trying to create a photo calendar for the first time and it just will not work for me. I've watched the tutorial and followed instructions but something is broken. I select an event with a dozen or so pictures, then hit the calendar button. T
-
Regarding Adapter Module in XI..
Guys, Anybody let me know the step of step procedure of implmenting custom adapter module in XI... So that i can implement by following steps.. Somu.
-
Hello Everyone, I insert data in form page. And, process encrypts these data to database. I can see data in İntreactive Report. But, when I clicked 'update' buton in intreactive report for a row, data is directed to form page's items as encrypted. Ho