Query on add button
Hello expert
i have one table having four field named as wardtype, room no, bed no, status.
i want to insert a entry as like
when i insert wardtype "general" roomno "G1" bed capacity "7" status "vacant" then it insert like below
ward type roomno bed no staus
general G1 1 vaccant
general G1 2 vaccant
general G1 3 vaccant
general G1 4 vaccant
general G1 5 vaccant
general G1 6 vaccant
general G1 7 vaccant
how to do this please help............
Hi,
please edit text label with below code
Private Sub DoAddMovie()
Dim oEdit As SAPbouiCOM.EditText
Dim oItem As SAPbouiCOM.Item
Dim Ogid As SAPbouiCOM.ComboBox
Dim oForm As SAPbouiCOM.Form
Dim isFound As Boolean
Dim oUsrTbl As SAPbobsCOM.UserTable
Dim strFind, Name, Shelf, space As String
'isFound = False
oUsrTbl = oCompany.UserTables.Item("EMP") '''yr table name instead of EMP
oForm = SBO_Application.Forms.ActiveForm
oItem = oForm.Items.Item("txtCode")
oEdit = oItem.Specific
strFind = (oEdit.String)
Dim i As Integer
If ((strFind <> "") And (strFind <> Nothing)) Then
For i = 0 To DBDSEMP.Size - 1
If (DBDSEMP.GetValue("Code", i).Trim(" ") = strFind) Then
isFound = True
Exit For
End If
Next i
If Not isFound Then
'Name
Ogid = oForm.Items.Item("txtName").Specific
Name = Ogid.Selected.Description
'Shelf
oItem = oForm.Items.Item("txtShelf")
oEdit = oItem.Specific
Shelf = (oEdit.String) 'cint
'Space
oItem = oForm.Items.Item("txtSpace")
oEdit = oItem.Specific
space = (oEdit.String)
oUsrTbl.Code = strFind
oUsrTbl.Name = strFind
oUsrTbl.UserFields.Fields.Item("U_wardtype ").Value = "general "
oUsrTbl.UserFields.Fields.Item("U_roomno").Value = "g1"
oUsrTbl.UserFields.Fields.Item("U_bedno").Value = 1
oUsrTbl.UserFields.Fields.Item("U_STATUS").Value = "vaccant"
oUsrTbl.Add()
DBDSEMP.Query()
SBO_Application.MessageBox("Employee ID Added")
Else
SBO_Application.MessageBox("Employee ID with this code already exists")
End If
Else
SBO_Application.MessageBox("You must type the Employee ID")
End If
End Subs.Item("U_STATUS").Value = "Unpaid"
End Sub
Thanks
Kevin
Edited by: Kevin Shah on Sep 25, 2009 5:34 PM
Similar Messages
-
Qurery on Add Button of Sales A/R Invoice form
Hello sir
I want to do the Update query on add button of Sales A/R From, to update the satus of my user form
plz suggestIf pVal.ItemUID = "1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.FormMode = SAPbouiCOM.BoFormMode.fm_ADD_MODE And pVal.BeforeAction = False Then
Dim oForm As SAPbouiCOM.Form
oForm = SBO_Application.Forms.Item(FormUID)
If oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
If pVal.ActionSuccess = True Then
Try
' setVisibilityForControlPQ()
SetInitialDataPQ()
Catch ex As Exception
ShowErrMsg("Event Error et_ITEM_PRESSED: " & ex.Message)
Finally
End Try
End If ' action close
End If 'mode close
End If 'else if -
Can we add button in query region along with go and clear
Hi Friends,
i have a requirement as below steps-
1)i have developed search pgae by using query regiion
2) in pgae,first we have search items,go and clear(submit buttons), table region.
3)here go and clear buttons came automatically.
4) i can able to add button in front of the page and end of the page.
4) my requirement is i need to add one more button along with go and clear(here go and clear button are in between search items and table region) .
5)i am not able to add button along with go and clear.
Can any one know how to do this--
Thanks in Advance
vamshiHi Vamshi,
You can not create extra buttons in Standard Query region.
Alternatively you can create your custom region for the search and there you can add a button. If you don't need advanced region, you can create the custom region in place of standard one.
Anoop -
How can I add buttons that do different things to each row of an rpt result
Hi there,
I'm trying to figure out how to add buttons to each row of a report. Here is the scenario:
report query returns a set of data that needs to be "approved". The options are "Append", "Replace", or "Reject" (I want to make the results look like so:)
Person1 today blah, blah blah... Append button Replace button Reject button
Person2 today blah, blah, blah... Append button Replace button Reject button
PersonA today something, blah... Append button Replace button Reject button
and so on.
I'd like to set up the page so that there is an append, replace, reject button for each row returned by the report. So when the "Approver" clicks on the append button, something happens for that row, etc. How does one do this? So far I can only get the buttons to show up in the region. I also thought it might be possible to somehow turn the append, replace, reject text into links that called a plsql proceedure that would handle the action, but I'm not having any success with that idea either.
Edited by: user10361829 on Sep 29, 2009 12:10 PMWhat I've done is make my report query as follows:
select field_a, field_b, field_c, 'Append', 'Replace', 'Reject'
from table_x
where field y = :PX_ID
That gives me the words (append, replace, reject) in the report. Then I go to the report attributes section and make a link out of the columns (append, replace, reject) so far, so good.
Next question is how to make clicking on those links activate an update action on tableN. In the column_link section there is a box marked "Request" that looks like it might be relevant because Request is a term connected to buttons, but I've no idea how to use it. Or, can one use the tabluar form element section of the report attributes page to connect the Append (pseudo column) to an action? I've looked at your example (Sam) with the delete button, but what I really need to see is the Apex menu that sets it up because there are so many levels in the interface it is not intuitive (at least for me). I know exactly what I want it to look like but I'm missing the crucial step to get there... Thanks for your help so far.
Column link section is described below :
Column Link Top
Link Text flashlight
[*Append*][Icon 1][Icon 2][Icon 3][Icon 4][Icon 5]
Link Attributes
Target: *"Page in this application"* Page: *10*
Reset Pagination
Request Clear Cache
Name Value
Item 1 Px_page_item flashlight *#????#* flashlight
Item 2 flashlight flashlight
Item 3 flashlight flashlight
URL
Page Checksum -
Add data to the table in the database with the use of add button
The name of my database is Socrates.
The name of the table in the database is Employees
I want to be able to add data to the database. i am presently working on the add button such that when i enter date into the textfield and press the add button it should automatically register in the table.
The error upon compilation is with this line of code
If (ae.getSource() == jbtnA)// it says that ";" is expected
Below is the entire code
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Mainpage extends JFrame implements ActionListener
JTextField jFirstName = new JTextField(15);
JTextField jSurname = new JTextField(12);
JTextField jCity = new JTextField(10);
JTextField jCountry = new JTextField(12);
JTextField jSSN = new JTextField(8);
JLabel jFirstLab = new JLabel("First Name");
JLabel jSurnameLab = new JLabel("Surname");
JLabel jCityLab = new JLabel("City");
JLabel jCountryLab = new JLabel("Country");
JLabel jSSNLab = new JLabel("Social Security Number (SSN)");
JButton jbtnA = new JButton ("Add");
JButton jbtnPrv = new JButton ("Previous");
JButton jbtnNt = new JButton ("Next");
JButton jbtnDl= new JButton ("Delete");
JButton jbtnSrch = new JButton ("Search");
public Mainpage (String title)
super (title);
Container cont = getContentPane();
JPanel pane1 = new JPanel();
JPanel pane2 = new JPanel();
JPanel pane3 = new JPanel();
pane1.setLayout (new GridLayout (0,1));
pane2.setLayout (new GridLayout(0,1));
pane3.setLayout (new FlowLayout());
pane1.add(jFirstLab);
pane1.add(jSurnameLab);
pane1.add(jCityLab);
pane1.add(jCountryLab);
pane1.add(jSSNLab);
pane2.add(jFirstName);
pane2.add(jSurname);
pane2.add(jCity);
pane2.add(jCountry);
pane2.add(jSSN);
pane3.add(jbtnA);
pane3.add(jbtnPrv);
pane3.add(jbtnNt);
pane3.add(jbtnDl);
pane3.add(jbtnSrch);
cont.add(pane1, BorderLayout.CENTER);
cont.add(pane2, BorderLayout.LINE_END);
cont.add(pane3, BorderLayout.SOUTH);
jFirstName.addActionListener(this);
jSurname.addActionListener(this);
jCity.addActionListener(this);
jCountry.addActionListener(this);
jSSN.addActionListener(this);
jbtnA.addActionListener(this);
jbtnPrv.addActionListener(this);
jbtnNt.addActionListener(this);
jbtnDl.addActionListener(this);
jbtnSrch.addActionListener(this);
validate();
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
pack();
setResizable(false);
public void actionPerformed(ActionEvent ae)
If (ae.getSource() == jbtnA)
fst = jFirstName.getText();
srn = jSurname.getText();
cty = jCity.getText();
cnty = jCountry.getText();
int sn =
Interger.parseInt(jSSN.getText());
String ad = "Insert into Employees
(Firstname,Surname,City,Country,SSN)" +
"values('"fst"','"srn"','"cty"','"cnty"','"sn"')";
Statement stmt = con.createStatment();
int rowcount = stmt.executeUpdate(ad);
JOptionPane.showMessageDialog("Your
details have been registered");
Statement stmt = con.createStatment();
int rowcount = stmt.executeUpdate(ad);
public static void main (String args[])
Mainpage ObjFr = new Mainpage("Please fill this
registration form");
try
Class.forname("sun.jdbc.odbc.JdbcOdbcDriver");
String plato = "jdbc:odbc:socrates";
Connection con =
DriverManager.getConnection(plato);
catch(SQLException ce)
System.out.println(ce);
}i have restructured the code, but the following line of code is giving error:
String plato = jdbc:odbc:socrates;
the entire code is below:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class Mainpage extends JFrame implements ActionListener
JTextField jFirstName = new JTextField(15);
JTextField jSurname = new JTextField(12);
JTextField jCity = new JTextField(10);
JTextField jCountry = new JTextField(12);
JTextField jSSN = new JTextField(8);
JLabel jFirstLab = new JLabel("First Name");
JLabel jSurnameLab = new JLabel("Surname");
JLabel jCityLab = new JLabel("City");
JLabel jCountryLab = new JLabel("Country");
JLabel jSSNLab = new JLabel("Social Security Number (SSN)");
JButton jbtnA = new JButton ("Add");
JButton jbtnPrv = new JButton ("Previous");
JButton jbtnNt = new JButton ("Next");
JButton jbtnDl= new JButton ("Delete");
JButton jbtnSrch = new JButton ("Search");
Statement stmt;
String ad;
public Mainpage (String title)
super (title);
Container cont = getContentPane();
JPanel pane1 = new JPanel();
JPanel pane2 = new JPanel();
JPanel pane3 = new JPanel();
pane1.setLayout (new GridLayout (0,1));
pane2.setLayout (new GridLayout(0,1));
pane3.setLayout (new FlowLayout());
pane1.add(jFirstLab);
pane1.add(jSurnameLab);
pane1.add(jCityLab);
pane1.add(jCountryLab);
pane1.add(jSSNLab);
pane2.add(jFirstName);
pane2.add(jSurname);
pane2.add(jCity);
pane2.add(jCountry);
pane2.add(jSSN);
pane3.add(jbtnA);
pane3.add(jbtnPrv);
pane3.add(jbtnNt);
pane3.add(jbtnDl);
pane3.add(jbtnSrch);
cont.add(pane1, BorderLayout.CENTER);
cont.add(pane2, BorderLayout.LINE_END);
cont.add(pane3, BorderLayout.SOUTH);
jFirstName.addActionListener(this);
jSurname.addActionListener(this);
jCity.addActionListener(this);
jCountry.addActionListener(this);
jSSN.addActionListener(this);
jbtnA.addActionListener(this);
jbtnPrv.addActionListener(this);
jbtnNt.addActionListener(this);
jbtnDl.addActionListener(this);
jbtnSrch.addActionListener(this);
validate();
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
pack();
setResizable(false);
try
Class.forname(sun.jdbc.odbc.JdbcOdbcDriver);
String plato = jdbc:odbc:socrates;
Connection con = DriverManager.getConnection(plato);
stmt = con.createStatment();
catch(SQLException ce)
System.out.println(ce);
catch(ClassNotFoundException ce)
System.out.println(ce);
public void actionPerformed(ActionEvent ae)
try
if(ae.getSource().equals(jbtnA))
fst = jFirstName.getText();
srn = jSurname.getText();
cty = jCity.getText();
cnty = jCountry.getText();
int sn = Interger.parseInt(jSSN.getText());
ad = "Insert into Employees
values('"+fst+"',"+srn+"','"+cty+"','"+cnty+"','"+sn+"')";
stmt.executeUpdate(ad);
JOptionPane.showMessageDialog(this, "Your details have been
registered");
catch(SQLException ce)
System.out.println(ce);
public static void main(String args[])
Mainpage ObjFr = new Mainpage("Please fill this registration form");
} -
How to add button in ALV report (Class method )?
Hello experts,
I have developed one ALV report using classes.
I want to add one more button on the report like already is there named DISPLQUA
How ca i do that here?
Following the code of CLASS definition & implimentation
CLASS lcl_handle_events DEFINITION.
PUBLIC SECTION.
METHODS:
handle_on_user_command FOR EVENT added_function OF cl_salv_events
IMPORTING e_salv_function.
ENDCLASS. "lcl_handle_events DEFINITION
CLASS lcl_handle_events IMPLEMENTATION
CLASS lcl_handle_events IMPLEMENTATION.
METHOD handle_on_user_command.
CASE e_salv_function.
WHEN 'DISPLQUA'.
PERFORM show_quant_record.
WHEN 'DISPQM03'. " Here i want to add button
PERFORM display_quality_notification.
WHEN OTHERS.
ENDCASE.
ENDMETHOD. "handle_on_user_command
ENDCLASS. "lcl_handle_events IMPLEMENTATIONHI Ronny.
Code snippet for reference.
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION.
METHODS :
*--Toolbar control
HANDLE_TOOLBAR FOR EVENT TOOLBAR
OF CL_GUI_ALV_GRID IMPORTING E_OBJECT
E_INTERACTIVE,
ENDCLASS
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*--handle toolbar
METHOD HANDLE_TOOLBAR.
* append a separator to normal toolbar
CLEAR G_TOOLBAR.
G_TOOLBAR-BUTN_TYPE = 3.
APPEND G_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
CLEAR G_TOOLBAR.
G_TOOLBAR-FUNCTION = 'SAVE'.
G_TOOLBAR-ICON = ICON_SYSTEM_SAVE.
G_TOOLBAR-BUTN_TYPE = 0.
G_TOOLBAR-QUICKINFO = 'Save the Customer'(203).
APPEND G_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
ENDMETHOD. "HANDLE_TOOLBAR
Hope this helps.
Gary.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 7, 2008 5:41 PM -
Clicking add button to display the values
requrement is like this
Could anyone give suggestions with some code .
we have lovs using this one we are searching for the value(ex emloyee name) that value is returned to the base page filed like message text input . we have add button, when ever we click that button to display the value(ex employee name ,desigantion this is from another table )on that same page.I could not understand your requirement. Post more details of the requirement with specific details.
Message was edited by:
Srini -
Add button to the transaction SM30
HI
Whether it is possible to add a buton to application tool bar in the transaction SM30.
help reg this.Hi,
Yes, it is possible to add button for the transaction SM30.
This is possible through Menu exit.
Procedure for Menuexit:-
Go to SM30 ->System -> Status
Repository data -> Transaction -> Double click on it
Copy package name
Go to SMOD
Press F4 then a popup will open
Click on information system
Enter package name and press Enter
Then we will get Exit
Put cursor on that exit and press Enter
Go to change mode and save it.
Go to CMOD or alternatively we can use the path tools -> ABAP/4 Workbench -> Utilities -> Enhancements ->Project Management
Specify Project name in the enhancement text box
Click on Create icon on the application toolbar.
Enter description for the project and save it
Click on Enhancement Assignment button on the application toolbar
Give Exit and save it
Go to Components on the application toolbar
Double Click on MENUS001
Write function text which we want to add to menu item and save it with an request number
Double Click on Exit and write code there to display menu item in the screen
Activate the include program and finally activate the project.
Please reward points if helpful. -
Add button to unused space in JTableHeader
I have modified my JTable so that I can have multiple rows of column headers. I did this by extending BasicTableHeaderUI. In my particular instance, the first column of the table will never have more than one row in the header (unlike other implementations of multi-row headers I have seen, my column headers don't automatically fill upwards to take up all usable space in the header). So, I have "unused" space in the header above the first column.
I would like to put some buttons there that are relevant to the table, but so far every effort to do so has failed.
In the SSCCE below I have created a very stripped down version of my TableHeaderUI. It doesn't contain any of the code to create multiple row headers, it just pushes down the standard column headers to create some space. I try adding a button to the rendererPane, but it doesn't show up. There is a commented out line that paints the button which does work in terms of showing the button, but that's probably not the right way to do this (and the button doesn't work anyway).
So, why isn't the button showing up? Am I doing this the right way (i.e. adding the button within the UI)? Thanks in advance for you help.
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Enumeration;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.plaf.basic.BasicTableHeaderUI;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
public class HeaderButtonTable extends JPanel {
public HeaderButtonTable() {
String[] colNames = {"column 1", "column2", "column3"};
Object[][] data = {{"a","b","c"},{"d","e","f"}};
JTable table = new JTable(data, colNames);
table.setPreferredScrollableViewportSize(new Dimension(400,100));
table.setFillsViewportHeight(true);
table.getTableHeader().setUI(new ButtonHeaderUI());
JScrollPane scrollPane = new JScrollPane(table);
add(scrollPane);
public class ButtonHeaderUI extends BasicTableHeaderUI {
public void paint(Graphics g, JComponent c) {
Rectangle clip = g.getClipBounds();
Point left = clip.getLocation();
Point right = new Point( clip.x + clip.width - 1, clip.y );
TableColumnModel cm = header.getColumnModel();
int cMin = header.columnAtPoint(left);
int cMax = header.columnAtPoint(right);
if (cMin == -1) cMin = 0;
if (cMax == -1) cMax = cm.getColumnCount()-1;
TableColumn draggedColumn = header.getDraggedColumn();
int columnWidth;
Rectangle cellRect = header.getHeaderRect(cMin);
TableColumn aColumn;
for(int column = cMin; column <= cMax ; column++) {
aColumn = cm.getColumn(column);
columnWidth = aColumn.getWidth();
cellRect.width = columnWidth;
if (aColumn != draggedColumn) {
paintCell(g, cellRect, column);
cellRect.x += columnWidth;
JButton test = new JButton("test");
test.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
System.out.println("pressed");
test.setBounds(2, 2, 60, 15);
rendererPane.add(test); //why isn't this showing up?
//this line will display the button, but button doesn't work
// rendererPane.paintComponent(g, test, header, 2, 2, 60, 15);
private Component getHeaderRenderer(int columnIndex) {
TableColumn aColumn = header.getColumnModel().getColumn(columnIndex);
TableCellRenderer renderer = aColumn.getHeaderRenderer();
if (renderer == null) renderer = header.getDefaultRenderer();
return renderer.getTableCellRendererComponent(header.getTable(),
aColumn.getHeaderValue(), false, false, -1, columnIndex);
private void paintCell(Graphics g, Rectangle cellRect, int columnIndex) {
Component component = getHeaderRenderer(columnIndex);
rendererPane.paintComponent(g, component, header,
cellRect.x, cellRect.y + 30, cellRect.width,
cellRect.height - 30, true);
public Dimension getPreferredSize(JComponent c) {
long width = 0;
Enumeration enumeration = header.getColumnModel().getColumns();
while (enumeration.hasMoreElements()) {
TableColumn aColumn = (TableColumn)enumeration.nextElement();
width = width + aColumn.getPreferredWidth();
return new Dimension((int)width, 60);
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(new HeaderButtonTable());
frame.pack();
frame.setVisible(true);
}Yes, I've seen similar links/posts about how to activate buttons in the header of a table, but those do it by adding listeners to the renderer. My buttons would be directly in the CellRendererPane that is the container for the table header. I would have thought that by putting the button directly in the Cell RendererPane that it would have nothing to do with the rest of the table header. CellRendererPane extends Container. Is it not possible to put a JButton in a Container? JFrame extends indirectly from Container and you can add buttons to that.
Edited by: Bob.B on Oct 28, 2009 10:57 PM -
Dear Experts,
I have a requirement in SNC system.
Requirement: Add a new button on screen Due List for Purchasing Documents, if we click on the button it has to open a new screen where we should have a file browse filed, browse and upload buttons to upload ASN details from presentation server.
am using,
WebDynpro Component: /SCF/UIWD
WebDynpro Application: /scf/snc_s
I have used following details to add button and acheived to add button alone, but how can I assing action/event, where can I create the screen, where can I write code and how can I assign this to button action.
ApplicationID: ICH
ScreenID: DUELIST
ComponentID: DLRLTLR1
Please help me out, almost from 2 weeks am doing R and D on it.
Thanks in advance
PalluThanks for your inputs Sai, but here the screen design is not static as normal webdynpro, normally we add a button and in OnAction property we create new action and we write code for the corresponding method, but in my case (expecially in SNC) everything I need to do with configurations, the transaction for screeen configuraitons is /N/SCF/SCREENCFG, and the BADI which I used for adding button is /SCF/UIMDL_APPCUST, you can find these details only in SNC (Supply Network and Collaboration) system.
Please try with inputs again.
Thanks again in advance!
Pallu!! -
Problem loading Query Designer Add-in
Hi All,
Can anyone please help me on my below issue.
Whenever user is trying to start a new query in Essbase , he is getting below error message. It will not allow user to build a fresh Essbase pull
Problem loading Query Designer Add-in. Workbook Activate,open & close operations may not be fully propogated
Thanks in advance.
Regards
VishalHi Vishal,
1) Try to remove the addin and then add again.(Before doing this close all the excel process from the task Manager)
2) Check weather essexcln.xll and essxleqd.xla are corrupted. -
How do you add musci to the Iphone? I just installed itunes 11.1.5.5. Now the format in Itunes is changed. when I am trying to add music to my iphone, there is no longer an add button under the Iphone device. Why did they have to change this? Can anyone help, Im tryiong to add music.
Correct. When you purchase devices, they would have stated the OS they needed to work, on the box. This can be overlooked, but it is very important to check when purchasing.
You current OS, is so old, that they technology build into the new devices, is not something your OS understands. It didn't exist when your OS was created, and therefore you need to upgrade the OS to work with the newer technology of these devices.
10.6 software is not downloadable. You must purchase a DVD disc. You can order it from the on-line apple store
- http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard. -
Hi,
I have created an Interactive report on a table. I want to add two buttons in each row: Accept and Reject, so that i can change the status(db column) of the corresponding record on button action.
How can I do so?Hi poojaC,
Try the below code,
i am giving the idea to add buttons..may be this is not the way you want.
step1
-- put this code in report region
select "ROWID",
'<input type="button" value="Accept" onclick="func('||EMPNO||')">' as "Accept",
'<input type="button" value="Reject" onclick="func('||EMPNO||')">' as "Reject",
"EMPNO",
"ENAME",
"JOB",
"MGR",
"HIREDATE",
"SAL",
"COMM",
"DEPTNO"
from "#OWNER#"."EMP"
-- edit the Accept and reject column and change Display type to "standard report column"Step 2 : create one function in page header like
-- here you can execute your process on button action
<script>
function func(id)
alert(id);
</script>Hope this will give you some idea.
Regards,
Jitendra -
Query to add a column in between existing cols of a table?
HI All,
I have two questions.
1. Query to add a column in between existing cols of a table? (not at the end. This is view of an order of output fields in a report)
2. How do I swap the contents of two columns in a table. Suppose in a table tab there are 2 cols , col1,col2 populated with some data.
I need a query(probably) to swap the col1 and col2 values . NOT AS A RESULT SET, BUT IT NEEDS TO GET CHANGED IN THE TABLE.
Please help !> 1. Query to add a column in between existing cols of
a table? (not at the end. This is view of an order of
output fields in a report)
Not really sensible ito DBMS - it does not care how you want to view the data. The sequence and formats of columns are what you/the application need to specify in the SQL's projection clause.
Also keep in mind to achieve this, the DBMS will need to rewrite the entire table to fit this new column in-between existing columns. This is not the best of ideas.
The projection of rows is dealt with SQL statements - not with the physical storage implementation.
> 2. How do I swap the contents of two columns in a
table. Suppose in a table tab there are 2 cols ,
col1,col2 populated with some data.
I need a query(probably) to swap the col1 and col2
values . NOT AS A RESULT SET, BUT IT NEEDS TO GET
CHANGED IN THE TABLE.
This seems to work:
SQL> create table foo_tab( c1 varchar2(10), c2 varchar2(10) );
Table created.
SQL> insert into foo_tab select TO_CHAR(rownum), TO_CHAR(object_id) from user_objects where rownum < 11;
10 rows created.
SQL> commit;
Commit complete.
SQL> select * from foo_tab;
C1 C2
1 55816
2 55817
3 55818
4 55721
5 105357
6 105358
7 105359
8 105360
9 105361
10 60222
10 rows selected.
SQL> update foo_tab set c1=c2, c2=c1;
10 rows updated.
SQL> select * from foo_tab;
C1 C2
55816 1
55817 2
55818 3
55721 4
105357 5
105358 6
105359 7
105360 8
105361 9
60222 10
10 rows selected.
SQL> -
Add button inactive in Match record step in Import manager
Hello,
In the Main table, I want to see the country data as 'US; United States' in country field.
I have made both 'country code' and 'country description' as display fields in the country flat lookup table.
When I load country code and country description from import manager from an excel file, the 'Add' button in Match records step is inactive for both the fields.
How can I do the matching in import manager without sacrificing my requirement of showing country as 'US; United States' in main table ?
Thanks,answer to this question is already available in forum.
Maybe you are looking for
-
Should I delete folders after upgrading?
I'm new to Mac and I just upgraded to 10.4.3. Do I need to delete any folders or anything to keep it running smooth? Did 10.4.3 simply just replace 10.4.2 ? Or are all the folders copied? I'm showing the same amount of disk space, and I still see the
-
Windows 8 driver cannot find HP Officejet Pro L7590 ethernet printer on my new router
I'm changing to a new router and had to change the IP address of my ethernet Officejet Pro L7590 from fixed assigned 192.168.1.7 into fixed assigned 192.168.2.168 (my new provider provided router doesn't support the 192.168.1.xx range). At installati
-
Call on PRI Line are not transfered to IP-AA on CCM
Greetings, Having an issue with H.323 Voice gateway. Incoming calls are not transferred to Auto-Attendant. This happens randomly but I have noticed that the frequency is higher when there are no incoming call no PRI lines. (Check the attachments for
-
Hi, I have just installed Vista Service Pack 2 and discovered I could not open pdf files. A brief error "An Internal Error Has Occurrred" appeared every time I tried to open a pdf or launch Adobe Reader 9. I have managed to overcome this by complet
-
How can I launch App Store?
When I try to access the App Store on Snow Leopard I get a message: "Cannot conect to the App Store". From what I know, Ishould donwload a link or app like stuff through 'Software Update' inSystem Preferences' but when I try the answer I get is I'm u