Insert table in between two rows of the table in Web dynpro abap.
Hi All,
I have a requirment like this,
while click on a hide/show button from the first row and last column of the table, want to display a table(or add some rows to insert data) in between the rows of the table and insert data in the new table .
please help me wheather it is possible or not?
Thanks,
Raju.
hi raju....
if you want to insert rows.... then read the index of the row clicked and then read the node that is bound to the table and insert an empty row at that index and bind it back again....
if you want another table then make use of table popin.
--regards,
alex b justin
Similar Messages
-
I need to retrieve the a set of rows in between two rows from a table.
consider employees table and primary key employee_id.
With out using EMPLOYEE_ID column in the where clause or between clause, I need to get the records between 104 and 116 or a set of records between two rows.
Can any one help me in this... i know this is simple but am just a fresher to oracle development... help me grow....
Thanks,
Arunya at last i got the out put... thank guys for thinking with me....
SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id)
WHERE ROWNUM <=8
MINUS
SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id) WHERE ROWNUM <= 4 -
Difference between two rows of a table.
Hi All,
I have a requirement where I need to calculate the difference of a column, but the values are in two rows.
Its exactly like this, I am having a table where in I have stored incidents with their status and their modified dates
example:
Incident_Id : Status : Modified_Date(in seconds from a specific date)
1 : 1 : 9080890
1 : 2 : 9080999
1 : 3 : 9081900
2 : 1 : 10000900
2 : 2 : 10001000
2 : 3 : 10002000
Now the requirement is I have to show the time spent by each incident in each status.
ie for status 1 I need the difference between modified date of status 2 and modified date of status 1 likewise
for status 2 need the difference between modified date of status 3 and modified date of status 2 and so on.
the actual result I need is like this
Incident_Id : Status : Timespent
1: 1: (modified_date(status2) - modified_date(status1))
Please help me to write the query for this.
Regards,
Tauceefif only you have incremental status (example = 1,2,3, ... )
WITH t (Incident_Id ,Status , Modified_Date) AS (
SELECT 1 , 1 , 9080890 FROM dual UNION ALL
SELECT 1 , 2 , 9080999 FROM dual UNION ALL
SELECT 1 , 3 , 9081900 FROM dual UNION ALL
SELECT 2 , 1 , 10000900 FROM dual UNION ALL
SELECT 2 , 2 , 10001000 FROM dual UNION ALL
SELECT 2 , 3 , 10002000 FROM dual )
SELECT t1.Incident_Id, t1.Status, t1.Modified_Date , t2.Modified_Date-t1.Modified_Date
FROM t t1
LEFT JOIN t t2
ON t2.Incident_Id = t1.Incident_Id
AND t2.status = t1.status+1
ORDER BY 1,2or
there is no need to know what is the next status number :
WITH t (Incident_Id ,Status , Modified_Date) AS (
SELECT 1 , 1 , 9080890 FROM dual UNION ALL
SELECT 1 , 2 , 9080999 FROM dual UNION ALL
SELECT 1 , 3 , 9081900 FROM dual UNION ALL
SELECT 2 , 1 , 10000900 FROM dual UNION ALL
SELECT 2 , 2 , 10001000 FROM dual UNION ALL
SELECT 2 , 3 , 10002000 FROM dual )
SELECT t1.Incident_Id,
t1.Status,
t1.Modified_Date ,
(LEAD(t1.Modified_Date) OVER (PARTITION BY t1.Incident_Id ORDER BY t1.status)) - t1.Modified_Date
FROM t t1Edited by: Ramin Hashimzadeh on May 15, 2013 1:32 PM -
How to do the feild validations in web dynpro abap
dear all,
how to do the feild validations for the screen in web dynpro abap.
thanks,
jyothi.hi jyothi,
There are diffrent ways of doing validations for fields of screen in webdynpro abap depending on the requirements.
I am giving simplest way of doing this validation(it may fullfil your requirement also)
For e.g you want that without entering value in particular field user should not proceed to submit the data in screen.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
DATA lo_api_controller TYPE REF TO if_wd_controller.
lo_api_controller ?= wd_this->wd_get_api( ).
lo_message_manager = lo_api_controller->get_message_manager( ).
DATA var1 type string.
DATA: node TYPE REF TO if_wd_context_node.
node = wd_context->get_child_node( 'DATA' ).
node->get_attribute( EXPORTING name = ' VALUE'
IMPORTING value = var1 ).
IF var1 IS INITIAL.
CALL METHOD lo_message_manager->report_error_message
EXPORTING
message_text = 'Please enter the value'.
EXIT.
ENDIF.
Now in above code VALUE is the attribute with whome your input field is bound .So if user doesnt enter any value into it he will get above msg (u have to use message are ui element to use this method)
If you have any other doubt feel free to ask.
regards
Panky -
Error configuring the Web Dynpro ABAP
Hi,
I am configuring the web dynpro ABAP which is giving an error that is mentioned below when i try to logon to the system.
I have followed the note 1088717 for activating the services for Web Dynpro ABAP in SICF .
i have even followed the note 434918 for configuring the fully qualified host names for BSP.
Please let me know what might be the error.
Error when processing your request
What has happened?
The URL http://cgslsvr3:8020/sap/bc/webdynpro was not called due to an error.
Note
The following error text was processed in the system CGD : WebDynpro Exception: Application // Does Not Exist
The error occurred on the application server cgslsvr3_CGD_20 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: RAISE of program CX_WD_GENERAL=================CP
Method: HANDLE_REQUEST of program CL_WDR_UCF====================CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
Module: %_HTTP_START of program SAPMHTTP
What can I do?
If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CGD in transaction ST22.
If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server cgslsvr3_CGD_20 in transaction SM21.
If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server cgslsvr3_CGD_20 . In some situations, you may also need to analyze the trace files of other work processes.
If you do not yet have a user ID, contact your system administrator.
Error code: ICF-IE-http -c: 110 -u: BASIS -l: E -s: CGD -i: cgslsvr3_CGD_20 -w: 0 -d: 20080401 -t: 144740 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
HTTP 500 - Internal Server Error
Your SAP Internet Communication Framework TeamHi,
than you have to add in the hostfile at c/windows/system32/drivers/etc
your mapping with the ip address of the server, add a line like:
XXX.XXX.XXX.XXX servername
but it seems the server is found, so really check in sicf:
/default_host/sap/bc/webdynpro/namespace/application_name
this should be active as well
grtz,
Koen -
Add new row in table between two rows - OATableBean
Hi,
I have a requirement where I need to add a new row between two rows. Lets say I have a table with 5 rows. I am envisioning having an icon (table switcher) on the row #1, which when clicked will insert/create a new row between rows #1 and #2 like #1.5, something that can be achieved in core forms. In core forms, when we click the add button, it immediately creates a new row before the current row ( and pushes other rows down). Is that possible with OATableBean. Please let me know if you have any ideas.
Thanks,
Ravi.Hi,
I used following code to insert the row in the end
public void createNewRow()
XXEGASRLinesVOImpl vo =getXXEGASRLinesVO1();
Row row1 ;
int i;
Row row[] = vo.getAllRowsInRange();
row1 = vo.createRow(); //vo.createRowSet("10");
vo.insertRowAtRangeIndex(row.length,row1);//.insertRow();
row1.setNewRowState(Row.STATUS_INITIALIZED);
Check if it works for you, you have to modify it to meet your requirement.
Regards,
Reetesh Sharma -
SUM two ROWS in the SAME Table
Hi,
I have a problem with this issue. I want to sum two rows from the same table, but I don´t know how to do that. I tried to do it with CTE, but always I get the same error "Ambiguous". I would like to ask you, if there is other manner to get that
data (sum two rows) and if it is possible to see examples about it.
Thank you in advanceHi Vaibhav,
I leave you my scrip:
USE Modelling
GO
--TABLE Aer_Lingus_Income_Statement
IF OBJECT_ID('Aer_Lingus_Income_Statement') IS NOT NULL
DROP TABLE Aer_Lingus_Income_Statement
GO
CREATE TABLE Aer_Lingus_Income_Statement
ID [nvarchar](255) NOT NULL,
Name_Account [nvarchar](255) NULL,
Company [nvarchar](255) NULL,
Level0_Account [nvarchar](255) NULL,
Level1_Account [nvarchar](255) NULL,
Level2_Account [nvarchar](255) NULL,
Level3_Account [nvarchar](255) NULL,
Level4_Account [nvarchar](255) NULL,
Level5_Account [nvarchar](255) NULL,
Level6_Account [nvarchar](255) NULL,
Level7_Account [nvarchar](255) NULL,
Level8_Account [nvarchar](255) NULL,
Year_2006 decimal (15,2) null,
Year_2007 decimal (15,2) null,
Year_2008 decimal (15,2) null,
Year_2009 decimal (15,2) null,
Year_2010 decimal (15,2) null,
Year_2011 decimal (15,2) null,
Year_2012 decimal (15,2) null,
Year_2013 decimal (15,2) null,
GO
ALTER TABLE Aer_Lingus_Income_Statement
ADD CONSTRAINT PK_Aer_Lingus_Income_Statement PRIMARY KEY (ID)
GO
INSERT INTO Aer_Lingus_Income_Statement
SELECT *
FROM Aer_Lingus_data_Income
IF OBJECT_ID('Aer_Lingus_Income_Statement_Historic') IS NOT NULL
DROP VIEW Aer_Lingus_Income_Statement_Historic
GO
CREATE VIEW Aer_Lingus_Income_Statement_Historic
as
Select Level0_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Level0_Account ='Revenue'
Group by Level0_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account= 'Passenger revenue' and Level0_Account ='Revenue'
Group by Name_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account= 'Ancillary revenue' and Level0_Account ='Revenue'
Group by Name_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account= 'Other revenue' and Level0_Account ='Revenue'
Group by Name_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account= 'Cargo revenue' and Level0_Account ='Revenue'
Group by Name_Account
UNION ALL
Select Level0_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Level0_Account ='Operating expenses'
Group by Level0_Account
UNION ALL
Select Level1_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Level1_Account ='Staff costs' and Level0_Account ='Operating expenses'
Group by Level1_Account
UNION ALL
Select Level1_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Level1_Account ='Depreciation, amortisation and impairment' and Level0_Account ='Operating expenses'
Group by Level1_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account ='Aircraft operating lease costs' and Level0_Account ='Operating expenses'
Group by Name_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account ='Fuel and oil costs' and Level0_Account ='Operating expenses'
Group by Name_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account ='Maintenance expenses' and Level0_Account ='Operating expenses'
Group by Name_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account ='Airport charges' and Level0_Account ='Operating expenses'
Group by Name_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account ='En-route charges' and Level0_Account ='Operating expenses'
Group by Name_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account ='Distribution costs' and Level0_Account ='Operating expenses'
Group by Name_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account ='Ground operations, catering and other operating costs' and Level0_Account ='Operating expenses'
Group by Name_Account
UNION ALL
Select Level1_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Level1_Account ='Other (gains)/losses - net' and Level0_Account ='Operating expenses'
Group by Level1_Account
UNION ALL
Select Name_Account , sum(Year_2006) as Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
Where Name_Account ='Employee profit share' and Level0_Account ='Operating expenses'
Group by Name_Account
GO
WITH sumasRevenue
AS (
SELECT Name_Account, ID
, sum(Year_2006) AS Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
WHERE Level0_Account = 'Revenue'
GROUP BY Name_Account, ID
WITH ROLLUP
, total
AS (
SELECT Y2006,Y2007 ,Y2008,Y2009 ,Y2010 ,Y2011 ,Y2012 ,Y2013
FROM sumasRevenue
WHERE Name_Account IS NULL
sumasOperatingExpensive
AS (
SELECT Name_Account, ID
, sum(Year_2006) AS Y2006, sum (Year_2007) as Y2007, sum (Year_2008) as Y2008, sum (Year_2009) as Y2009, sum (Year_2010) as Y2010,
sum (Year_2011) as Y2011, sum (Year_2012) as Y2012, sum (Year_2013) as Y2013
FROM Aer_Lingus_data_Income
WHERE Level0_Account = 'Operating expenses'
GROUP BY Name_Account, ID
WITH ROLLUP
, total1
AS (
SELECT Y2006,Y2007 ,Y2008,Y2009 ,Y2010 ,Y2011 ,Y2012 ,Y2013
FROM sumasOperatingExpensive
WHERE Name_Account IS NULL
SELECT distinct ID , s.Name_Account,
(s.Y2006* 1.0 - t.Y2006) AS [V2006] ,(s.Y2007* 1.0 -T.Y2007 ) as [V2007] , (s.Y2008* 1.0 /T.Y2008 ) as [V2008],(s.Y2009* 1.0 /T.Y2009 ) as [V2009],
(s.Y2010* 1.0 /T.Y2010 ) as [V2010],(s.Y2011* 1.0 /T.Y2011 ) as [V2011],(s.Y2012* 1.0 /T.Y2012 ) as [V2012],(s.Y2013* 1.0 /T.Y2013 ) as [V2013]
FROM sumasRevenue AS s , sumasOperatingExpensive AS t
Where ID IS NOT NULL
UNION ALL
SELECT distinct ID,COALESCE(s.Name_Account,'NON CURRENT ASSETS') AS Name_Account ,
sum (s.Y2006* 1.0 / t.Y2006) as V2006,sum (s.Y2007* 1.0 / t.Y2007) as V2007,sum (s.Y2008* 1.0/ t.Y2008) as V2008,sum (s.Y2009* 1.0/ t.Y2009) as V2009,sum (s.Y2010* 1.0/ t.Y2010) as V2010,
sum (s.Y2011* 1.0 / t.Y2011) as V2011,sum (s.Y2012* 1.0/ t.Y2012) as V2012,sum (s.Y2013* 1.0/ t.Y2013) as V2013
FROM sumasRevenue as s , sumasOperatingExpensive as t
Where ID IS NULL and Name_Account IS NULL
GROUP BY Name_Account, ID
WITH ROLLUP
select *
from Aer_Lingus_Income_Statement_Historic
Thank you in advance -
Calculate the variance between two row
Post Author: jane
CA Forum: WebIntelligence Reporting
Hi,
I'm new to BO and wondering whether there is a way to calculate the variance between two rows. I'm working on a report which requires to display the change of two day's data. For instance, I have a table in a format as
Date
Sales Amount
3/12/2008
2300.00
2/12/2008
1280.00
Changed
1020.00
I'd like to display the "Changed" column. Is there a way to do that in BO InfoView? In Excel, you can use the formular by identify the two cells.
Thanks!Post Author: Vinl
CA Forum: WebIntelligence Reporting
I am having the same problem and am steping outside of the box and cannot progress.
Seems to me that you are kind of saying that the only way to get around this is to create an individual object in Designer? I cannot find a way of cementing values as a variable in order for a variance to be created.
I am trying to do it at column level mind you, which should not make that much difference....
Simple SQL database. I have created an object called "Year" which takes a date and converts it to a year. I then have another object created "Total sales", put the 2 in a table get the right results...try and create a year on year variance from that...no chance...
Used to work ok...? -
Dont want to show the divided line between two rows in a Grid.
Hello Friends,
I want a Grid in which I want multiple rows but i dont want to show the divided line between two rows.
It is just like a grid on Territories form(Administrator->SetUp->General->Territories)
Thanks.Mithun,
The component you're talking about is not a grid, and that component is not exposed by the UI API so you cannot use it.
Regards,
Vítor Vieira -
JTable insert a row after the table is displayed.
I'm using the SunOneStudio and when I define the columns and rows for the table. My problem is that I need to have a ADD button and to be able to insert a Row to this predefined table.
I know it's pretty basic, but I'm stack in here.
THANKS A LOT FOR YOUR HELP ..This thead should get you started:
http://forum.java.sun.com/thread.jsp?forum=31&thread=314155 -
Insert Multiple rows into the table from that table data
Hi All,
I have a requirement like to insert mulitple rows into the table from that table data only(I need to replicate the data).
In this table primary key is composite primary key with all foreign keys.primary key also including the Date foreign key.I need to change that date at the of insertion.
INSERT
INTO myschema.Fact_page_performance
time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available ,
date_sk
VALUES
(SELECT time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available
FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
WHERE date_sk=20090509,20090510
But it is giving the error like missing Expression.
Could anyone please help to me.
Thanks and Regards
Swetha.You can have either VALUES or SELECT not both
INSERT
INTO myschema.Fact_page_performance
time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available ,
date_sk
SELECT time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available
FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
WHERE date_sk=20090509,20090510; -
Updating one row updates every row in the table
I'm having a weird problem in which I insert a row into a table, select that row, and update its columns, and all the rows in the table end up with those columns all set to the new value. Like this:
A B C
1 4 7
2 3 8
9 6 7
Statement s1 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
s1.execute("INSERT INTO table (A) VALUES (5)");
Statement s2 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
RecordSet rs = s2.executeQuery("SELECT * FROM table WHERE A=5");
if (rs.next()) {
rs.updateInt("B", 4);
rs.updateInt("C", 6);
rs.updateRow();
A B C
1 4 6
2 4 6
9 4 6
5 4 6I'm using Mac OS X 10.4.9, OpenBase Solo 10.0.5, and Java 1.5. I hope someone has experienced this before because it has me befuddled.
Here is the actual code from my program:
Statement st;
ResultSet rs;
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
rs = st.executeQuery("SELECT * FROM characters WHERE UniqueID=\""+uid+"\"");
if (rs.next()) {
JOptionPane.showMessageDialog(this, "The Unique ID \""+uid+"\" is already taken by "+com.kreative.mccm.Character.flName(rs)+".", "", JOptionPane.ERROR_MESSAGE);
return false;
rs = st.executeQuery("SELECT * FROM characters WHERE CodePoint="+cp);
if (rs.next()) {
JOptionPane.showMessageDialog(this, "The code point "+h(cp,4)+" is already taken by "+com.kreative.mccm.Character.flName(rs)+".", "", JOptionPane.ERROR_MESSAGE);
return false;
st.close();
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
st.execute("INSERT INTO characters (UniqueID, CodePoint) VALUES (\""+uid+"\", "+cp+")");
st.close();
this.uid = uid;
this.cp = cp;
this.ch.setUniqueIDString(uid);
this.ch.codePoint = cp;
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
rs = st.executeQuery("SELECT * FROM characters WHERE UniqueID=\""+ch.getUniqueIDString()+"\"");
if (rs.next()) {
ch.writeResultSet(rs, false, false); /* (this does the updates) */
rs.updateRow();
charSaveChanges.setEnabled(false);
} else {
throw new SQLException();
rs.close();
st.close();OpenBase powers Apple's online store, so I wouldn't think that's the problem. I'm placing all the blame on the JDBC driver.
Funnily, I started updating ResultSets that way because executing UPDATE statements directly gave me this problem before. Doing it this way made the problem go away, until now.
I tried replacing the INSERT with two fields with one with all the fields, and now it throws a SQL error that is most definitely bogus:
java.sql.SQLException: SQL ERROR - [position 569, near '' in ', 0, 0, 0, ''] insert error: comma expected but not found in data.
SQL: INSERT INTO characters (UniqueID, CodePoint, NameFirst, NameMiddle, NameLast, NameMaiden, NameCommFirst,
NameCommMiddle, NameCommLast, NameCommFull, Title, Classification, Subclassification, Considerable, SexString,
TransitionString, GenderString, OrientationString, TitleString, PronounString, SGO, BirthDay, BirthMonth, BirthYear,
Generation, FirstOfSet, ParentBio, Parent1, Parent2, Parent3, ParentBioType, Parent1Type, Parent2Type, Parent3Type)
VALUES ('bomb', 123, 'Ziggy', 'Boogy', 'Doog', '', '', '', '', '', '', -1, -1, 1, '', '', '', '', '', '', 0, 0, 0, 0, 0, '', '', '', '', '', 0, 0, 0, 0)Bogus because there are the same number of data items as field names, and position 569 is a comma.
At this point I have to ask myself why I ever chose OpenBase in the first place. (That's right, I had a RealBasic plugin for it. shudders) I'm sure OpenBase itself is fine, but its JDBC driver is trash. MySQL here I come.
(Message was edited to prevent looooong horizontal scrolling) -
Display all the rows in the table with Varray
I created two Varrays
CREATE TYPE phone_varray AS VARRAY(3) OF NUMBER(10);
CREATE TYPE email_varray AS VARRAY(3) OF varchar2(30);
CREATE TABLE ee
(id number(2),
phone phone_varray);
now i inserted some rows into ee table and displayed it as:
SELECT e1.id,e2.COLUMN_VALUE"PHONE NO" FROM ee e1,TABLE(e1.phone) e2;
ID PHONE NO
1 1111111111
1 2222222222
1 3333333333
1 1111111111
1 2222222222
1 4444444444
4 1111
4 2222
4 33334
5 1111
5 2222
5 33334
Then i altered the table with email_varray
desc ee;
Name Null? Type
ID NUMBER(2)
PHONE PHONE_VARRAY
EMAIL EMAIL_VARRAY
I updated some rows:
update ee e1 set email=email_varray('aasda') where id=4;
and when i try to display the table data by:
SELECT id,e2.*,e3.* from ee e1,TABLE(e1.phone) e2,TABLE(e1.email) e3;
it only displays the rows that contain all the details like
ID COLUMN_VALUE COLUMN_VALUE
4 1111 aasda
4 2222 aasda
4 33334 aasda
and not all the rows that are in the table which have id and phone and email as NULL
need help to display all the rows in the table.will this work for you ?
SELECT e1.id,e2.COLUMN_VALUE as PHONE_NO, null as email FROM ee e1,TABLE(e1.phone) e2
union
SELECT e1.id,null,e3.column_value as email from ee e1, TABLE(e1.email) e3; -
In Web Dynpro ABAP, Can we merge two cells of a row in a table ?
In Web Dynpro ABAP, Can we merge two cells of a row in a table ?
Hallo Jagannatha,
the new table feature is available in SAP NetWeaver 7.0 EhP2 (SAP ERP 6.0 EhP5, SAP Business Suite 7i2010) named 'TableMultiEditorCell'. See [SAP Online Help|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9b/46bb0d339b42cc8d30636ca0c9f5b6/frameset.htm] for more details ...
"This UI element is a table cell variant that enables several UI elements to be placed in one table cell. This type of cell can be used for "one click actions". ...
Regards, Bertram -
Inserting a clip between two clips
I'm trying to insert a clip between two clips yet still having everything from all V/A 1,2,3,4,etc. layers to move along with whatever clip is moved down the line. Everyone keep saying: Use the ctrl key! but all that does is indeed move some of it down but it cuts bits of the video in the process. I'm not sure how to solve this. I simply want to drag and drop an item between two clips and not cut or mess up any additional V layers.
You can load a title into the Source Monitor by dragging it there from the Project Panel. But you can also use the insert command directly from the Project panel, via either the context menu or the same shortcut.
Be aware that if the sequence has In/Out points set, then the Insert & Overwrite commands will insert the selected source into that range. This is known as 3-point or 4-point editing (depending on whether you have both in & out points set in both the source and the sequence). If In/Out points are not set in the sequence, then the source is inserted at the playhead's position in the Timeline.
Also, source patching controls which tracks the clip is placed on. If you're not familiar with source patching, this tutorial video is worth watching.
Maybe you are looking for
-
//This code is of login button protected void Button1_Click1(object sender, EventArgs e) SqlDataReader dr; SqlConnection conn = new SqlConnection(GetConnectionString()); string sql = "SELECT PASSWORD FROM ACCOUNT WHERE EMAILID
-
Testing SAP PI 7.0 WSDL with SOAPUI
Hello everybody. I'm trying to call an async web service in SAP PI 7.0 with the help of SOAPUI (got the WSDL with the define Web Service in the integration builder) I get the following error: ERROR:java.net.SocketException: Software caused connection
-
How to change DB name and SID in RAC environment?
I have 2 node RAC on Red Hat Linux, EL 4, upd. 4. It's using ASM and it is working great. However, after 2 years of faithful service I was asked to change DB name and SID. In non-RAC environment, that is easy. Rename a few files, change init.ora and
-
Hi all, I want to implement Undo Redo functionality in my application.For example , I have a JFrame with a button in it. On clicking the button i am importing a image in to it,and performing some action like resizing the image and dragging it within
-
Hi Every one, I want to know that whether the statutory reports and returns to be submitted in india is available in India or we have to customize and develop one. I am not that aware of Forms...I have just gone to PE51 and tried to create a remunera