Update Multiple Rows using Row Selector
Hi,
I want to update multiple rows using a tabular form with row selector, and an item in another region of the page, using an update expression and a button.
The syntax would be like this:
update MY_TABLE set UPDATABLE_COLUMN = :P10_NEW_VALUE where {row selector = true}
What is the syntax for the WHERE clause, anyone knows? In the manual there is no information at all for doing this.
PD. I added the row selector after creating the form, so I don't have any wizard-created MRU processes in the page.
HTMLDB version is 1.6
Thanks.
Hi,
I want to update multiple rows using a tabular form with row selector, and an item in another region of the page, using an update expression and a button.
The syntax would be like this:
update MY_TABLE set UPDATABLE_COLUMN = :P10_NEW_VALUE where {row selector = true}
What is the syntax for the WHERE clause, anyone knows? In the manual there is no information at all for doing this.
PD. I added the row selector after creating the form, so I don't have any wizard-created MRU processes in the page.
HTMLDB version is 1.6
Thanks.
Similar Messages
-
Need to update multiple records using store procedure
Hi i am trying to update multiple records using store procedure but failed to achieve pls help me with this
for example my source is
emp_name sal
abhi 2000
arti 1500
priya 1700
i want to increase salary of emp whose salary is less than 2000 it means rest two salary should get update..using stored procedure only
i have tried following code
create or replace procedure upt_sal(p_sal out emp.sal%type, p_cursor out sys_refcursor)
is
begin
open p_cursor for
select sal into p_sal from emp;
if sal<2000 then
update emp set sal= sal+200;
end i;f
end;
and i have called the procedure using following codes
set serveroutput on
declare
p_sal emp.sal%type;
v_cursor sys_refcursor;
begin
upt_sal(p_sal,v_cursor);
fetch v_cursor into p_sal;
dbms_output.put_line(p_sal);
end;
the program is executing but i should get o/p like this after updating
1700
1900
but i am getting first row only
2000
and record is not upsating...please help me with this
thanksHi Alberto,
thanx for your valuable suggestion. but still i have doubt. the code which i have mentioned above might be simple but what if i have big requirement where i need update the data by using loops and conditional statement.
and i have similar kind of requirement where i need to deal with procedure which returns more than one row
my source is
empno ename salary
111,abhi,300
112,arti,200
111,naveen,600
here i need to write a store procedure which accepts the empno (111) as input para and display ename and salary
here i have written store procedure like this
create or replace procedure show_emp_det(p_empno in emp.empno%type, p_ename out emp.ename%type,p_salary out emp.salary%type, p_cursor out sys_refcursor)
is
begin
open p_cursor for
select ename,salary into p_ename,p_salary from emp where empno=p_empno;
end;
and i have called this by using
declare
p_salary emp.salary%type;
p_ename emp.ename%type
v_cursor sys_refcursor;
begin
show_emp_det(111,p_ename,p_salary,v_cursor);
fetch v_cursor into p_ename,p_salary;
dbms_output.put_line(p_ename);
dbms_output.put_line(p_salary);
end;
here i should get
abhi,300
naveen,600
but i am getting first row only
abhi,300
but i want to fetch both rows...pls help me to find the solution -
Updating multiple tables using JDBC Adapter
Hi,
I am trying to insert/update multiple tables using one message via JDBC adapter. The following is the message being posted. However, only the first statement was executed. Anything wrong?
Thanks in advance!
Hart
<?xml version="1.0" encoding="UTF-8"?>
<ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration"><DeliveryData><DelHeader action="UPDATE_INSERT"><table>DelHeader</table><access><DelNo>0080000230</DelNo><DelType>LF</DelType><XOverwrite>X</XOverwrite><ShipTo>0000000026</ShipTo><SoldTo>0000000026</SoldTo><Priority>00</Priority><DocDate>02/17/2007</DocDate><GText>CIF Test</GText><DelDate>02/20/2007</DelDate><PickDate>02/20/2007</PickDate><ShipPoint>NO02</ShipPoint><PackCount>00000</PackCount></access><key><DelNo>0080000230</DelNo></key></DelHeader>
<DelItem action="INSERT"><table>DelItem</table><access><DelNo>0080000230</DelNo><ItemNo>000010</ItemNo><GText>10# GRAN-GREAT VALUE</GText><Material>G04410G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BL</UOM></access><access><DelNo>0080000230</DelNo><ItemNo>000020</ItemNo><GText>25# GRAN- GREAT VALUE</GText><Material>G04025G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BG</UOM></access></DelItem></DeliveryData></ns0:DeliveryDBUpdate>Hi,
You need 2 STATEMENT level tags,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration">
<b><DeliveryData1></b>
<DelHeader action="UPDATE_INSERT">
<table>DelHeader</table>
<access>
<DelNo>0080000230</DelNo>
<DelType>LF</DelType>
<XOverwrite>X</XOverwrite>
<ShipTo>0000000026</ShipTo>
<SoldTo>0000000026</SoldTo>
<Priority>00</Priority>
<DocDate>02/17/2007</DocDate>
<GText>CIF est</GText>
<DelDate>02/20/2007</DelDate>
<PickDate>02/20/2007</PickDate>
<ShipPoint>NO02</ShipPoint>
<PackCount>00000</PackCount>
</access>
<key>
<DelNo>0080000230</DelNo>
</key>
</DelHeader>
<b><DeliveryData1></b>
<b><DeliveryData2></b>
<DelItem action="INSERT">
<table>DelItem</table>
<access>
<DelNo>0080000230</DelNo>
<ItemNo>000010</ItemNo>
<GText>10# GRAN-GREAT VALUE</GText>
<Material>G04410G611</Material>
<Plant>6005</Plant>
<SLoc>6005</SLoc>
<RefDoc>mmenon32</RefDoc>
<RefItem>00000000</RefItem>
<DelQty>5.000</DelQty>
<UOM>BL</UOM>
</access>
<access>
<DelNo>0080000230</DelNo>
<ItemNo>000020</ItemNo>
<GText>25# GRAN- GREAT VALUE</GText>
<Material>G04025G611</Material>
<Plant>6005</Plant>
<SLoc>6005</SLoc>
<RefDoc>mmenon32</RefDoc>
<RefItem>00000000</RefItem>
<DelQty>5.000</DelQty>
<UOM>BG</UOM>
</access>
</DelItem>
<b></DeliveryData2></b>
</ns0:DeliveryDBUpdate>
Try with such a strcuture and let us know if it works.
Regards
Bhavesh -
Update Multiple records using NW CE WebDyn Pro 7.2 interface ITEMDETAILS
We are trying to use SAP Netweaver CE 7.2 and NetWeaver Design Studio 7.2 with the Web Dynpro application interfaces configured to connect to our MDM 7.1 SP06 repositories to develop web screens that allow our end users the ability to maintain MDM repository data without the use of DataManager.
Our first application was to be a simple one to show the business the benefit of SAP Netweaver. Itu2019s very easy to use the interfaces for SEARCH, RESULTSET, ITEMDETAILS, MATCH and MERGE if you plan to maintain one record at a time. We would like to update many records at the same time.
Using the configuration described previously, I find that I am able to select multiple records at one time using the RESULTSET interface and the Context folder of u201CSelectedRecordsu201D but I am not able to pass multiple records at one time to the context u201CIODatau201D used by the ITEMDETAILS interface and allow my end users to see and update multiple records at one time.
If I can pass multiple records from RESULTSET to ITEMDETAILS for display and update would you please provide me with an example of how I would do this in NetWeaver Design Studio for NW CE 7.2..
If I can NOT pass multiple records from RESULTSET to ITEMDETAILS for display and update, Would I then have to write my own wrapper application to read multiple records selected using the RESULTSET interface and the develop my own UPDATE view to display and update more than one record at a time. This would be time consuming since I would also have to write my own back out procedures and validation of update procedures that already happen within ITEMDETAILS. Do you happen to have any CE application examples that show how this is done for a NW CE MDM repository that I can see? The current documentation u201CHow to Build Web Applications Using MDM Web Dynpro Components. pdfu201D falls short in the area of updating multiple records.
Thank you in AdvanceBugs aside, if it's VERY noisy, that might just be the out-of-sync problem (something I'm very familiar with now).
Search the forum for "aggregate sync" and you should get some clues, if this is indeed the problem.
Short of it is, you need to sync the two devices together. Easiest way seems to be to connect the two devices via S/PDIF and set Clock Source to S/PDIF for the "slave" device (set in Audio Midi).
You can also just set the Clock Source as the "master" device in the drop down, bypassing the need for the S/PDIF cable altogether, but I haven't tried this myself.
Macbook Pro CD / iMac C2D Mac OS X (10.4.8) -
Help Required: Updating Multiple dynamically created rows in database
Hi All,
In my jsp page I am retriving the values from the database and displaying in the jsp page, the columns are studentID and student name. Now for each studentID i am creating two textfields as date of birth and parent name.
my code snippet is as follows
while(rs.next())
<tr>
<td><%=studID%></td>
<td><%=name%></td>
<td><input type="text" name="DOB<%=studID%>"></td>
<td><input type="text" name="PName<%=studID%>"></td>
</tr>
from the above code i am getting dynamically create textfield whose names are
<input type="text" name="DOB10001">
<input type="text" name="PName10001">
and so on now how can i capture all these values and update the corresponding records in the database.
Please help me in this
Thanks in advancewell in that case u can do this
int i=0;
while(rs.next())
<tr>
<td><%=studID%></td>
<td><%=name%></td>
<td><input type="text" name="DOB<%=i%>"><input type="hidden" name="h_DOB<%=i%>" value="<%=studID%>" ></</td>
<td><input type="text" name="PName<%=i%>"></td>
</tr>
<%i++%>
<input type="hidden" name="RecordCount" value="<%=i%>" >
when u submit this for then in the other jsp u can read the data from query string
int li_rec_count = Integer.parseInt(request.getParameter("RecordCount"));
for(int i=0;i<li_rec_count;i++)
String studID = request.getParameter("h_DOB"+i);
String dob = request.getParameter("DOB"+i);
String pName = request.getParameter("pName"+i);
create your sql statment and update for each studID
} -
Update multiple records using checkbox
Hi All,
I have one requirement related to multiple record update using checkbox.
HTML form has 6 columns and many rows.
Now i want to update all 6 columns in the table for selected checkbox.
Can any body give me some idea/code about this.
Thanks in advance.
RaviI did not understand your idea.
multiple columns can be updated as follows...
update table set col1=value,col2=value,col3=value where conditions;
We are using adodb driver in our environment. So I will explain concern to it. Store all the form new values in $var array and you can pass this $var to query execution.
A vague idea
$rs = $conn->Execute($update_sql,$var);
if ($rs===false) die('DB Error: '. $conn->ErrorMsg() ); -
Update Multiple Records Using ASPVBscript
I am trying to display multiple records on a page with a
checkbox for each record, the checked value = Y. Then select
multiple checkboxes and update each record at one time. I am using
MS SQL as my DB. Is there an extention or command that I can use to
accomplish this. Can anyone help.
ThanksYou need to give distinct values to your checkboxes and value
fields. This
can be done inside the DW Repeat Region loop code as it
generates the rows.
You then set another loop for the update. It is quite
straightforward
really.
Have a look at Julian's site, here:
http://www.charon.co.uk/content.aspx?CategoryID=27&ArticleID=41
Also, there are a couple of links at the bottom of the above
page. They use
slightly different approaches and are usefull too.
"StarM3d" <[email protected]> wrote in
message
news:f470in$p4v$[email protected]..
>I am trying to display multiple records on a page with a
checkbox for each
> record, the checked value = Y. Then select multiple
checkboxes and
> update
> each record at one time. I am using MS SQL as my DB. Is
there an
> extention or
> command that I can use to accomplish this. Can anyone
help.
>
> Thanks
>
> -
Need to update multiple columns using another table
I have 2 tables. and i need to update rows of 1 table using another table
Table1
Serial_no. payment_date Payment_amt
101 22/11/2010 150
101 18/03/2011 355
102 15/04/2011 488
103 20/05/2011 178
102 14/06/2011 269
101 28/06/2011 505
Table2
Serial_no Charge_amt Last_paymt_dt Last_paymt_amt
101 255
102 648
103 475
I want to update Last_paymt_dt and Last_paymt_amt of table2 using Table1, I have written following update statement but it gives error that single row subquery return multiple row.
Update Table2
set (Last_paymt_dt,Last_paymt_amt) = (select max(payment_date, payment_amt) from table1
where table1.Serial_no = table2.Serial_no group by payment_amt)
kindly suggest how should i update.SQL> select * from table1
2 /
SERIAL_NO PAYMENT_DA PAYMENT_AMT
101 22/11/2010 150
101 18/03/2011 355
102 15/04/2011 488
103 20/05/2011 178
102 14/06/2011 269
101 28/06/2011 505
6 rows selected.
SQL> select * from table2
2 /
SERIAL_NO CHARGE_AMT LAST_PAYMT LAST_PAYMT_AMT
101 255
102 648
103 475
SQL> update table2
2 set (last_paymt_dt,last_paymt_amt) = (
3 select max(payment_date),
4 max(payment_amt) keep(dense_rank last order by payment_date)
5 from table1
6 where table1.serial_no = table2.serial_no
7 )
8 /
3 rows updated.
SQL> select * from table2
2 /
SERIAL_NO CHARGE_AMT LAST_PAYMT LAST_PAYMT_AMT
101 255 28/06/2011 505
102 648 14/06/2011 269
103 475 20/05/2011 178
SQL> SY. -
Update multiple fields using select query efficiently – 9i
I need to populate a table called prop_charact used for synching data to a legacy system.
Prop_charact has fields that are found in a few other tables (no one field is found in more than one table outside of prop_charact). I want to pull the data from the corresponding fields in the source tables and put it into prop_charact. I only want to populate prop_charact with records that have been updated, but want to pull all fields for those records (whether or not that field has been updated). I am getting the list of updated records from a transaction history table.
After getting that list, I was not sure what to do with it.
I put what I want to do in terms of strictly SQL. I am thinking there are more efficient (less system resources) ways of doing this, but I am not sure what to pursue. I can use PL/SQL, but please keep in mind I am limited to using version 9i. Anyone have any hints about what I should look into using instead of just thes particular SQL statements?
insert into eval.prop_charact (parcelno, propertyid)
select distinct p.parcelno, p.propertyid
from eval.transaction_history tr,
admin.properties p
where tr.propertyid = p.propertyid
and trim(tr.tablename) in ('PROPERTIES', 'PROPERTYCHARACTERISTICS','EQID','NEWCHARACTERISTICS','DIMENSIONS', 'NON_RESIDENTIALS')
and trim(tr.fieldname) in ('BLDGCODE', 'CATCODE', 'UNFINISHED', 'TOPOGRAPHY', 'GARAGETYPE', 'GARAGESPACES', 'OPENSPACES',
'VIEW', 'GENERALCONSTRUCTION', 'YEARBUILT', 'ESTIMATEDYEAR', 'TOTALROOMS', 'TOTALBEDROOMS',
'BASEMENTTYPE', 'NUMBEROFFIREPLACES', 'HEAT', 'CENTRALAIR','CONDITION','SITE_TYPE','TOTALDWELLINGAREA',
'PLOTFRONT','PLOTDEPTH','PLOTSQFT','SHAPE','STORIES','FULLBATHROOMS','PARTBATHROOMS','MULTIPLE_BLDGS')
and tr.trans_date >= to_date('01-01-2010', 'MM/DD/YYYY')
and tr.trans_date < sysdate
order by p.parcelno;
update
select p.BLDGCODE pBLDGCODE, epc.BLDGCODE epcBLDGCODE, p.CATCODE pCATCODE,epc.CATCODE epcCATCODE,
p.UNFINISHED pUNFINISHED, epc.UNFINISHED epcUNFINISHED,
pc.TOPOGRAPHY pcTOPOGRAPHY, epc.TOPOGRAPHY epcTOPOGRAPHY,
pc.GARAGETYPE pcGARAGETYPE, epc.GARAGETYPE epcGARAGETYPE,
pc.GARAGESPACES pcGARAGESPACES, epc.GARAGESPACES epcGARAGESPACES,
pc.OPENSPACES pcOPENSPACES, epc.OPENSPACES epcOPENSPACES, pc.VIEW_ pcVIEW_, epc.VIEW_ epcVIEW_,
pc.GENERALCONSTRUCTION pcGENERALCONSTRUCTION,
epc.GENERALCONSTRUCTION epcGENERALCONSTRUCTION,
pc.YEARBUILT pcYEARBUILT, epc.YEARBUILT epcYEARBUILT,
pc.ESTIMATEDYEAR pcESTIMATEDYEAR, epc.ESTIMATEDYEAR epcESTIMATEDYEAR,
pc.TOTALROOMS pcTOTALROOMS, epc.TOTALROOMS epcTOTALROOMS,
pc.TOTALBEDROOMS pcTOTALBEDROOMS, epc.TOTALBEDROOMS epcTOTALBEDROOMS,
pc.BASEMENTTYPE pcBASEMENTTYPE, epc.BASEMENTTYPE epcBASEMENTTYPE,
pc.NUMBEROFFIREPLACES pcNUMBEROFFIREPLACES, epc.NUMBEROFFIREPLACES epcNUMBEROFFIREPLACES,
pc.HEAT pcHEAT, epc.HEAT epcHEAT, pc.CENTRALAIR pcCENTRALAIR, epc.CENTRALAIR epcCENTRALAIR,
e.CONDITION eCONDITION, epc.CONDITION epcCONDITION,
n.SITE_TYPE nSITE_TYPE, epc.SITE_TYPE epcSITE_TYPE,
d.TOTALDWELLINGAREA dTOTALDWELLINGAREA, epc.TOTALDWELLINGAREA epcTOTALDWELLINGAREA,
d.PLOTFRONT dPLOTFRONT, epc.PLOTFRONT epcPLOTFRONT,
d.PLOTDEPTH dPLOTDEPTH, epc.PLOTDEPTH epcPLOTDEPTH,
d.PLOTSQFT dPLOTSQFT, epc.PLOTSQFT epcPLOTSQFT,d.SHAPE dSHAPE, epc.SHAPE epcSHAPE,
pc.STORIES pcSTORIES, epc.STORIES epcSTORIES,
n.FULLBATHROOMS nFULLBATHROOMS,epc.FULLBATHROOMS epcFULLBATHROOMS,
n.PARTBATHROOMS nPARTBATHROOMS, epc.PARTBATHROOMS epcPARTBATHROOMS,
nr.MULTIPLE_BLDGS nrMULTIPLE_BLDGS, epc.MULTIPLE_BLDGS epcMULTIPLE_BLDGS
from eval.prop_charact epc, admin.properties p, admin.propertycharacteristics pc, admin.eqid e,
admin.dimensions d, eval.newcharacteristics n, EVAL.non_residentials nr
where epc.propertyid = p.propertyid and epc.propertyid = pc.propertyid and epc.propertyid = e.propertyid(+)
and epc.propertyid = d.propertyid(+) and epc.propertyid = n.propertyid(+) and epc.propertyid = nr.propertyid(+)
set epcBLDGCODE= pBLDGCODE, epcCATCODE= pCATCODE, epcUNFINISHED = pUNFINISHED,
epcTOPOGRAPHY = pcTOPOGRAPHY, epcGARAGETYPE = pcGARAGETYPE, epcGARAGESPACES = pcGARAGESPACES,
epcOPENSPACES = pcOPENSPACES, epcVIEW_ = pcVIEW_, epcGENERALCONSTRUCTION = pcGENERALCONSTRUCTION,
epcYEARBUILT = pcYEARBUILT, epcESTIMATEDYEAR = pcESTIMATEDYEAR, epcTOTALROOMS = pcTOTALROOMS,
epcTOTALBEDROOMS = pcTOTALBEDROOMS, epcBASEMENTTYPE = pcBASEMENTTYPE,
epcNUMBEROFFIREPLACES = pcNUMBEROFFIREPLACES, epcHEAT = pcHEAT, epcCENTRALAIR = pcCENTRALAIR,
epcCONDITION = eCONDITION, epcSITE_TYPE = nSITE_TYPE, epcTOTALDWELLINGAREA = dTOTALDWELLINGAREA,
epcPLOTFRONT = dPLOTFRONT, epcPLOTDEPTH = dPLOTDEPTH, epcPLOTSQFT = dPLOTSQFT,
epcSHAPE = dSHAPE, epcSTORIES = pcSTORIES, epcFULLBATHROOMS = nFULLBATHROOMS,
epcPARTBATHROOMS = nPARTBATHROOMS, epcMULTIPLE_BLDGS = nrMULTIPLE_BLDGS;The following example may be of help.
SQL> create table mytable(col1 number(1),
2 col2 date);
Table created.
SQL> insert into mytable values(1,sysdate);
1 row created.
SQL> select * from mytable;
COL1 COL2
1 20-AUG-04
SQL> update mytable
2 set (col1,col2) = (select 2, sysdate-1 from dual);
1 row updated.
SQL> select * from mytable;
COL1 COL2
2 19-AUG-04 -
How to update multiple tables using results from query
I'm a bit rusty on this stuff and am hoping for some help.
Table 1 is:
location_id, location_name
Table 2 is
location_id, employee_id and misc. other columns
Then there are multiple tables with associated data, keys being location_id and employee_id.
There are no established relationships.
Trying to come up with a process to change location_id for all employees assigned to a particular location.
It seems to me that the basics are
select employee_id from Table2 where location_id='xxxxxx'
Then take each employee_id returned and change their location_id in each of the other tables
I'm not clear on how to load the returned employee id's as variables and then loop through them.
ThanksThanks for the welcome. I'll read up on the rules now.
Below is the DDL for a couple of the tables.
Version = 11g
I would query the users table for all users with a certain site_id and then use them to update the site_id in the users table (and other tables)
-- DDL for Table USERS
CREATE TABLE "USERS"
( "USERID" VARCHAR2(8 BYTE),
"PASSWORD" VARCHAR2(50 BYTE),
"FIRST_NAME" VARCHAR2(50 BYTE),
"LAST_NAME" VARCHAR2(50 BYTE),
"SITE_ID" VARCHAR2(5 BYTE),
"ROLE_ID" VARCHAR2(1 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 "SITES_DATA_TS"
CACHE ;
-- DDL for Table EMPLOYEE_PROFILE
CREATE TABLE "EMPLOYEE_PROFILE"
( "EMPLOYEEID" VARCHAR2(9 BYTE),
"PROGRAM" NUMBER,
"REQUIREMENT" NUMBER,
"JOBNUM" VARCHAR2(50 BYTE),
"STATUS" VARCHAR2(50 BYTE),
"PROGRAM_TYPE" VARCHAR2(50 BYTE),
"SITE_ID" VARCHAR2(5 BYTE),
"NUM_QUAL_TEST_ATTEMPTS" NUMBER(7,0)
) 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 "SITES_DATA_TS"
CACHE ; -
How to update multiple records using for loop
Hi I want to update a particular column of few rows in database i had written followin code after that few lines of code and calling action from the task which having commit return ,still it's not updating particular colum.I had debug the code loop is running fine but still changes are not reflecting to database.Let me know if there is any prob with following code snippet.
RealEstatePropertyUnitDetailsVOImpl realEstatePropertyUnitDetailsVO = RealEstatePropertyUnitDetailsVOImpl)realEstateService.getRealEstatePropertyUnitDetailsVO();
for(Row row : realEstatePropertyUnitDetailsVO.getAllRowsInRange())
if("N".equalsIgnoreCase((String)row.getAttribute("RlstdSellYn"))
|| "false".equalsIgnoreCase((String)row.getAttribute("RlstdSellYn")))
row.setAttribute("RlstdAvlblYn", "Y" );
System.out.println("RlsthId "+row.getAttribute("RlstdRlsthId"));
System.out.println("AvlbYN "+row.getAttribute("RlstdAvlblYn"));
System.out.println("RlstdUnitId "+row.getAttribute("RlstdUnitId"));
}Vishwesh,
I'd start with something along the lines of ...
RowSet vo = (RowSet)getRealEstatePropertyUnitDetailsVO();
vo.reset();
while (vo.hasNext())
Row row = vo.next();
row.setAttribute("Attribute", value);
}getAllRowsInRange() may exclude some rows outside the "range". Also, the vo.reset is needed since your View Object currency may not be at the beginning of your RowSet.
Hope that helps.
Will -
Updating multiple fields using a single update statement.
Hi All,
I am a beginner to Oracle. I have used the following Hint in an update query that is executed in Oracle 10G. We recently updated the Oracle to version 11g and when executing the query getting the following Error: ORA-01779: cannot modify a column which maps to a non key-preserved table. PFB the query. Please suggest me some ways that I can do to avoid this error.
UPDATE /*+ bypass_ujvc */
(SELECT t1.STG_DEL_CONDITION, t2.condition
FROM stg_reports_membenft_latest T1 JOIN (select ods_ssn_grp,sys_id, first_value(STG_DEL_CONDITION) over(PARTITION BY ods_ssn_grp,sys_id
ORDER BY STG_DEL_CONDITION DESC) AS
condition from stg_reports_membenft_latest) T2
ON T1.ods_ssn_grp = T2.ods_ssn_grp AND T1.SYS_ID=T2.SYS_ID ) x
SET x.STG_DEL_CONDITION = x.condition;
Thanks and Regards,
Karthik Sivakumar.I used the below query and got the Result.
Thank You all
MERGE INTO stg_reports_membenft_latest x1
USING (SELECT distinct ods_ssn_grp,
sys_id,
First_value(STG_DEL_CONDITION) OVER(partition BY ods_ssn_grp,sys_id
ORDER BY STG_DEL_CONDITION DESC)
AS condition
FROM stg_reports_membenft_latest) x2
ON ( x1.ods_ssn_grp = x2.ods_ssn_grp
AND x1.SYS_ID = x2.sys_id )
WHEN matched THEN
UPDATE SET x1.STG_DEL_CONDITION=x2.condition; -
Update multiple InDesign documents using XML
I am looking for a solution to update multiple files using XML.
We have over 100 resumes in indesign and each resume has about a dozen projects (name, size, cost, location)
I would like to keep all of the projects in a master file "projects.xml" and then basically populate each resume from this file. This would allow me to make one change to a project and have that project update across all the resumes.
This file would be edited and probably rearanged frequently. I have a basic understanding of XML but am not sure how moving the order of projects within the XML file will effect the resumes.
My question is what type of issues would I be faced in working this way and how could I tackle them. Any workflow or advice would be very helpful.
-JustinIn my understanding, the order of different elements in the XML file wouldn't matter - the order is set by the style sheet (XSLT) file.
I can't give any real suggestions though, except to consider a third party plugin which would make any XML solution much easier - XMPie, DesignMerge, StudioID etc. You could then reference a database (Access/Excel/csv) containing columns for name, project1, project2... and set the project info to only display if there is a corresponding entry in the database file. -
Programmatic updating multiple records of a table in ADF
Hi,
I am using Jdeveloper : 10g 10.1.3.3
Problem : I need to update multiple records in DB using ADF feature.
The senario is like user is shown records of item consisting of item name, item code, category code, price etc. then user clicks "change category code" link availabe against each record. In next page user is shown current code and provided a text box to enter new code. Once i get this in my bean i need to update all records as:
update item_info set category_code = :new_code where category_code = :current_code. Means to udate category code in all the records where category_code is :current_code.
I have Entity and View Object for this table.
How do i update multiple records using created view which is entity based?
Have A Nice Time!
Regards,
KevinIn ADF you don't use update statement directly. This is done by the framework.
You have to search for the records which match your condition category_code = :current_code using your VO based on the entity.
Then iterate over the result set and change each row to your need setCategoryCode(newCode);
When you commit the changes they are persist them in the DB.
To see the changes in the UI you have to update the display using PPR or execute the query again.
Timo -
SQL Update a Single Row Multiple Times Using 2 Data Sets
I'm working in tsql and have an issue where I need to do multiple updates to a single row based on multiple conditions.
By Rank_
If the column is NULL I need it to update no matter what the Rank is.
If the Ranks are the same I need it to update in order of T2_ID.
And I need it to use the last updated output.
I've tried using the update statement below but it only does the first update and the rest are ignored. Here is an example of the data sets i'm working w/ and the Desired results. Thanks in advance!
update a
set Middle = case when a.Rank_> b.Rank_ OR a.Middle IS NULL then ISNULL(b.Middle,a.Middle) end,
LName = case when a.Rank_> b.Rank_ OR a.Lname IS NULL then ISNULL(b.LName,a.LName) end,
Rank_ = case when a.Rank_> b.Rank_ then b.Rank_ end
from #temp1 a
inner join #temp2 b on a.fname = b.fname
where b.T2_ID in (select top 100% T2_ID from #temp2 order by T2_ID asc)The Merge clause actually errors because it attempt to update the same record. I think this CTE statement is the closest I've come but I'm still working through it as I'm not too familiar w/ them. It returns multiple rows which I will have to
insert into a temp table to update since the resulting row I need is the last in the table.
;WITH cteRowNumber
AS(
Select DISTINCT
Row_Number() OVER(PARTITION BY a.LName ORDER BY a.LName ASC, a.Rank_ DESC,b.T2ID ASC) AS RowNumber
,a.FName
,a.LName
,b.LName as xLname
,a.MName
,b.MName AS xMName
,a.Rank_
,b.Rank_ AS xRank
,b.T2ID
FROM #temp1 a
inner join #temp2 b
ON a.fname = b.fname
), cteCursor
AS(
Select a.RowNumber,
a.Fname
,a.LName
,a.xLname
,a.MName
,a.xMName
,a.xRank
,a.T2ID
,CASE WHEN a.Rank_ >= a.xRank THEN ISNULL(a.xRank,a.Rank_) else ISNULL(a.Rank_,a.xRank) end AS Alt_Rank_
,CASE WHEN a.Rank_ >= a.xRank THEN ISNULL(a.xMName,a.MName) else ISNULL(a.MName,a.xMName) end AS Alt_MName
,CASE WHEN a.Rank_ >= a.xRank THEN ISNULL(a.xLName,a.lname) else ISNULL(a.LName,a.xlname) end as Alt_Lname
FROM cteRowNumber a
where a.RowNumber = 1
UNION ALL
Select crt.RowNumber
,crt.FName
,crt.LName
,crt.xLname
,crt.MName
,crt.xMName
,crt.xRank
,crt.T2ID
,CASE WHEN Prev.Alt_Rank_ >= crt.xRank THEN ISNULL(crt.xRank,Prev.Alt_Rank_) else ISNULL(Prev.Alt_Rank_,crt.xRank) end AS Alt_Rank
,CASE WHEN Prev.Alt_Rank_ >= crt.xRank THEN ISNULL(crt.xMName,Prev.Alt_MName) else ISNULL(Prev.Alt_MName,crt.xMName) end AS Alt_MName
,CASE WHEN Prev.Alt_Rank_ >= crt.xRank THEN ISNULL(crt.xLName,Prev.Alt_Lname) else ISNULL(Prev.Alt_Lname,crt.xLName) end as Alt_Lname
FROM cteCursor prev
inner join cteRowNumber crt
on prev.fname = crt.fname and prev.RowNumber + 1 = crt.RowNumber
SELECT cte.*
FROM cteCursor cte
Maybe you are looking for
-
How to play youtube on nokia xl
I can not access Youtube as it dislay a msg from google play that this device does not support. Plz if anyone can help.
-
Hardware Requirements to install SAP ECC 5.0/6.0
Hey Gurus, Could you please tell me that what is the best hardware to go for to install SAP ECC 5.0/6.0 so that we can afford the future changes also without buying the new hardwares. Thanks 'n Regards, Ashwani
-
Time Machine Account Settings Question in Airport Utility V6
Hi, I recently upgraded Airport Utility to V6 in which they now have a settings for the builtin Time Capsule to set Secure Shared Disks. The settings are: 1) With Accounts, 2) With a disk password, 3) With a device password. When I
-
Tiger 10.4.6 spinning pinwheel after update
We have had 15 machines all not boot after updating to 10.4.6. They reboot the machine and get the spinning pinwheel and cannot get past this. We cannot even get to single user mode. Has anyone else had this issue and how do we fix it?
-
Ways to implement secure channel scp02
Hi, What are the possible ways of implementing establishing an SCP02 secure channel between the applet and an off-card application. (aside from GP System's Secure Channel class)? thanks in advance for your help.