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
thanks
Hi 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
Similar Messages
-
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) -
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. -
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 -
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 -
Updating multiple records without having to use a cursor
I am trying to update multiple records in a table.
Eg
Table A -20 records
Table B -10 records.
Would like to update Table B with the updated records in Table A for those records which the primary key matches
and I dont want to use cursors. Is this possible??
Thanx in Advance.Please refer to the test below, it should give you the general idea,SQL> desc tableA;
Name Null? Type
SEQ NUMBER
INV VARCHAR2(20)
AMT NUMBER(12,2)
AMT2 NUMBER(12,2)
SQL> desc tableB;
Name Null? Type
SEQ NUMBER
INV VARCHAR2(20)
AMT NUMBER(12,2)
AMT2 NUMBER(12,2)
SQL> select count(*) from tableA;
COUNT(*)
6
SQL> select count(*) from tableB;
COUNT(*)
12
SQL> UPDATE tableB b
2 SET b.inv = NVL((SELECT a.inv from tableA a WHERE a.seq = b.seq), b.inv),
3 b.amt = NVL((SELECT a.amt from tableA a WHERE a.seq = b.seq), b.amt),
4 b.amt2 = NVL((SELECT a.amt2 from tableA a WHERE a.seq = b.seq), b.amt2)
5 /
12 rows updated.
*** Please note that this is DIFFERENT from what you asked, here tableB is having more rows, which is fine. We **may not be** able update tableA in this example by reversing the table names, because the join may bring more rows than UPDATE statement needs. ***Thx,
Sri -
I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add or change info), it overwrites part of the record following it. I am using labview 6.0. I need to be able to insert information into the middle of a file without disturbing the data before and after
It's hard to give more specifics without more detail, but in general you're going to need to read in the entire file, split it into three pieces (everything before the record of interest, the record itself, and everything after the record of interest), modify the record, reassemble the three pieces in proper order, and write the whole thing back to the file.Of course if the file is very large you might not want to actually implement it this way, but conceptually at least, this is what you are looking at.If this file some sort of proprietary format?Mike...PS: this type of issue is why I really like databases...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
I want to update multiple record in database which is based on condition
hi all,
I am using Jdev 11.1.2.1.0
I have one table named(Pay_apply_det) in this table i want to update one column named(Hierarchy) every time and according to change i want to update or i want to maintain my log table named(pay_apply_appr).It based on level wise approval when the lowest person approve the record show on next level but if the second
level person back it will be show only previous level hierarchy.And when the final approval happen the Posting_tag column of pay_apply_det will be updated too with hierarchy column.
i have drag pay_apply_det's data control as a table in my .jsf page and add one column approve status in UI .in the approve status i used radio group which return A for approve B for back R for reject through value binding i make it get or set method in it baking bean.
in backing bean class i have written code
public void approveMethod(ActionEvent actionEvent) {
ViewObject v9=new UtilClass().getView("PayApplyDetView1Iterator");
int h5=0;
Row rw9= v9.getCurrentRow();
String x=(String) rw9.getAttribute("RemarkNew1");
System.out.println(x);
String z=getR2();
System.out.println(z);
if(( z.equals("R") || z.equals("B") )&& x==null)
FacesMessage fm1 = new FacesMessage("Plz Insert Remark Feild");
fm1.setSeverity(FacesMessage.SEVERITY_INFO);
FacesContext context1 = FacesContext.getCurrentInstance();
context1.addMessage(null, fm1);
else{
ADFContext.getCurrent().getSessionScope().put("Radio",getR2().toString());
String LogValue=(String)ADFContext.getCurrent().getSessionScope().get("logid");
ViewObject voH=new UtilClass().getView("PayEmpTaskDeptView1Iterator");
voH.setWhereClause("task_cd='449' and subtask_cd='01' and empcd='"+LogValue+"'");
voH.executeQuery();
Row row1= voH.first();
int h1=(Integer)row1.getAttribute("Hierarchy");
System.out.println("Login Person Hierarchy on save button press.."+h1);
ViewObject vo9=new UtilClass().getView("PayApplyDetView1Iterator");
Row row9= vo9.getCurrentRow();
if(getR2().equals("A")&& h1!=1)
row9.setAttribute ("ApprHier",h1);
row9.setAttribute("IsClaimed","N");
row9.setAttribute("ClaimedBy",null);
row9.setAttribute("ClaimedOn", null);
else if(getR2().equals("B") ) {
ViewObject voO=new UtilClass().getView("LoHierViewObj1Iterator");
voO.setNamedWhereClauseParam("QHVO", LogValue);
Row rowO = voO.first();
h5=(Integer)rowO.getAttribute("LPrehier");
System.out.println("Back lower hier..."+h5);
row9.setAttribute ("ApprHier",h5);
row9.setAttribute("IsClaimed","N");
row9.setAttribute("ClaimedBy",null);
row9.setAttribute("ClaimedOn", null);
else if((h1==1) &&(getR2().equals("A")) )
row9.setAttribute ("PostingTag","Y");
row9. setAttribute ("ApprHier", h1);
row9.setAttribute("IsClaimed","N");
row9.setAttribute("ClaimedBy",null);
row9.setAttribute("ClaimedOn", null);
else if(getR2().equals("R"))
row9.setAttribute ("ApprHier",-1);
row9.setAttribute("IsClaimed","N");
row9.setAttribute("ClaimedBy",null);
row9.setAttribute("ClaimedOn", null);
BindingContext BC=BindingContext.getCurrent();
BindingContainer ac=BC.getCurrentBindingsEntry();
OperationBinding ob=ac.getOperationBinding("Commit");
ob.execute();
vo9.executeQuery();
FacesMessage fm = new FacesMessage("Your Data Successfully Commited..");
fm.setSeverity(FacesMessage.SEVERITY_INFO);
FacesContext context = FacesContext.getCurrentInstance();
context.addMessage(null, fm);
}here i put my approve status radio value in session variable because i also want to update my pay_apply_appr table which code i written in pay_apply_det IMPL class.
Every thing is running well when i update single record but when i want to update multiple record then my current row only updated in pay_apply_det but log table( pay_apply_appr) created for all record.
so is there any solution plz help me.
thanks
RAFATHi Rafat,
If you are able to insert into, all you need to do is iterate through the rows. For this , before the first IF condition
if(getR2().equals("A")&& h1!=1)Get the row count using int numRows =vo9.getRowCount(); , and then write it before the IF condition
if (int i=0;i<numRows;i++} After
row9.setAttribute("ClaimedOn", null);
}write vo9.next(); to iterate to next row,
Hope this will work.
Nigel. -
Updating a record using pay element using the API (Almost Done)
Hi Everyone,
I have a question about updating a record using the PAY_ELEMENT_ENTRY_API.update_element_entry
I have process that doesn't error out, but its doesn't seem to update the record. So my question is, is the query below the correct way to get the element name and object version number when using this API? If not, what do I need to do?
BEGIN
SELECT MAX(pee.element_entry_id)
INTO x_element_id_mgr
FROM pay_element_types_f pet,
pay_element_links_f pel,
pay_element_entries_f pee,
per_all_assignments_f paaf,
per_all_people_f papf
WHERE pee.element_link_id = pel.element_link_id
AND pel.element_type_id = pet.element_type_id
AND paaf.assignment_id = pee.assignment_id
AND papf.person_id = paaf.person_id
AND pet.element_name = 'Mgr Rec Pct'
AND sysdate BETWEEN pee.effective_start_date AND pee.effective_end_date
AND sysdate BETWEEN pel.effective_start_date AND pel.effective_end_date
AND sysdate BETWEEN pet.effective_start_date AND pet.effective_end_date
AND sysdate BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND sysdate BETWEEN papf.effective_start_date AND papf.effective_end_date
AND paaf.assignment_id = c_staging.assignment_id
AND papf.person_id = c_staging.person_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN
--ROLLBACK TO s1;
v_error_message := 'For employee number '||c_staging.employee_number||' No data found for element name Mgr Rec Pct' || SUBSTR(sqlerrm, 1, 200);
DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
WHEN OTHERS THEN
--ROLLBACK TO s1;
v_error_message := 'For employee number '||c_staging.employee_number||' Error found for element name Mgr Rec Pct' || SUBSTR(sqlerrm, 1, 200);
DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
END;
--- Get OVN
BEGIN
SELECT MAX(Object_version_number)
INTO x_ele_object_version_number
FROM pay_element_entries_f
WHERE element_entry_id = x_element_id_mgr;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_error_message := 'For employee number '||c_staging.employee_number||' Error in getting the OVN for Mgr Rec Pct ' || SUBSTR(sqlerrm, 1, 200);
DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
WHEN OTHERS THEN
v_error_message := 'For employee number '||c_staging.employee_number||' Error in getting the OVN for Mgr Rec Pct' || SUBSTR(sqlerrm, 1, 200);
DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
END;Your SQL isn't bad, although you're including loads of tables you don't need to so it's probably not as fast as it could be. I'm not sure you know what element entry to update so let's look at an example:
-- | Element Entry Id | OVN | Start Date | End Date | Pay Value |
-- +------------------+-----+------------+-------------+-----------+
-- | 123 2 1-Jan-2009 31-Jan-2011 USD 400
-- | 123 1 1-Feb-2009 18-Jun-2011 USD 500
-- | 123 1 19-Jun-2011 25-Jun-2011 USD 600
-- | 123 5 26-Jun-2011 31-Dec-4712 USD 700Here the one element entry (Id 123) has 4 effective rows. The employee gets $400 in Jan 2009, $500 from Feb 2009 to mid-June 2011, $600 for a few days later in June 2011 and then $700 from 26th June 2011 onwards.
So your question to the forum is which one do I update. Well, that depends which one you want to update. If you want to update the 1st Jan 2009 to 31st Jan 2011 you'd pass element_entry_id => 123, ovn => 2, effective_date => to_date('1-Jan-2009', 'DD-MON-YYYY') and datetrack_mode => 'CORRECTION'.
If you wanted to update the $700 row you'd pass OVN 5 and an effective date of 26th June 2011. And so-on.
Now in your SQL you're filtering based on sysdate, which means you'd be updating the $500 row (ovn=1). Is that what you want?
I have simplified your SQL as follows:
SELECT pee.element_entry_id
,pee.object_version_number
INTO x_element_id_mgr
,x_ele_object_version_number
FROM pay_element_entries_f pee
,pay_element_types_f pet
WHERE pee.assignment_id = c_staging.assignment_id
AND pee.element_type_id = pet.element_type_id
AND pet.element_name = 'Mgr Rec Pct'
AND trunc(sysdate) BETWEEN
pee.effective_start_date AND pee.effective_end_date
AND trunc(sysdate) BETWEEN
pet.effective_start_date AND pet.effective_end_date;This selects both the entry Id and OVN in one go; there's no need to have 2 SQL statements. If multiple entries are allowed, this SQL could return more than one row so just watch out for that. If you don't want the row as of sysdate change the two sysdate joins accordingly.
I hope that helps. -
Hi,
Im having issues with updating multiple records.
This query selects users in a specific unit that are inactive (ui.nf_statusid = 2) and compare it newsmail_recipient table
select *
from roleuser ru, unit u, userinfo ui
where u.ip_unitid = ru.nf_unitid
and u.ip_unitid = unit_id
and ui.ip_userid = ru.nf_userid
and ui.nf_statusid = 2
and n_internal = 0
and ui.ip_userid in (select user_id
from newsmail_recipient
where user_id = ui.ip_userid
and nf_listid = liste
and nf_statusid = 1;the second script will set the users to inactive in newsmail_recipient that are inactive in the userinfo table.
update newsmail_recipient
set nf_statusid = 2
, d_modified = sysdate
where user_id = ui.ip_userid;I would like to know if its possible to merge this query. I know its possible for insert but havent tried update before.
This is how i do it, but its not working.
case when (select *
from roleuser ru, unit u, userinfo ui
where u.ip_unitid = ru.nf_unitid
and u.ip_unitid = unit_id
and ui.ip_userid = ru.nf_userid
and ui.nf_statusid = 2
and n_internal = 0
and ui.ip_userid in (select user_id
from newsmail_recipient
where user_id = ui.ip_userid
and nf_listid = liste
and nf_statusid = 1)
then update newsmail_recipient
set nf_statusid = 2
, d_modified = sysdate
where user_id = ui.ip_userid;
end;thanks guys...
regards,
jTable structure:
newsmail_recipient:
IP_RECIPIENTID NUMBER(8,0)
NF_LISTID NUMBER(8,0)
NF_STATUSID NUMBER(8,0)
D_CREATED DATE
D_MODIFIED DATE
C_NAME VARCHAR2(100 CHAR)
C_EMAIL VARCHAR2(256 CHAR)
USER_ID NUMBER(10,0)
NEWSMAIL_ID NUMBER(10,0)userinfo:
IP_USERID NUMBER(10,0)
NF_STATUSID NUMBER(10,0)
N_INTERNAL NUMBER(1,0)@jeenesh:
I tried your query but i get this error:
Error(510,30): PL/SQL: ORA-00904: "UI"."IP_USERID": invalid identifierJust wondering why, but ui.ip_userid is declared.
Actually, this is a package script.
procedure edit_recipient_to_newsmaillist(unit_id IN NUMBER)
as
liste number;
--Finner alle toppfoldere til de lukkede brukergruppene som uniten har tilgang til
cursor closed_user_group is
select element_id
from admin_unit_content_access
where group_id = 97
and accesstype_classification_id in( select classification_id
from dynamic_field_value
where key = 'closed_user_group'
and dynamic_field_grouping_id = (select dynamic_field_grouping_id
from unit
where ip_unitid = unit_id))
and element_type = 'f';
begin
--Finner hvilken liste folderen tilh�rer
for u in closed_user_group loop
if (u.element_id = 39464) then
liste := 2017; --AMG
elsif (u.element_id = 36664) then
liste := 2018; --Das wird meiner
elsif (u.element_id = 34011) then
liste := 2019; --Junge sterne
elsif (u.element_id = 68359) then
liste := 2020; --Service vorteilskarte
elsif (u.element_id = 1030675) then
liste := 2021; --TGC
elsif (u.element_id = 41741) then
liste := 2022; --Truckworks
elsif (u.element_id = 118659) then
liste := 2481; --CRM
elsif (u.element_id = 122982) then
liste := 2479; --Vitoecell
else
liste := 2037; --Sneak Drive
end if;
--oppdater til brukerene i den uniten i listen
merge into newsmail_recipient nm
using
(select *
from roleuser ru, unit u, userinfo ui
where u.ip_unitid = ru.nf_unitid
and u.ip_unitid = unit_id
and ui.ip_userid = ru.nf_userid
and ui.nf_statusid = 2
and n_internal = 0)
on (nm.user_id = ui.ip_userid)
when matched then
update set nm.nf_statusid = 2,
nm.d_modified = sysdate;
liste := 0;
end loop;
end edit_recipient_to_newsmaillist;
-
Update multiple records on one page
I have a page that displays records based on a varible that
is selected on
the previous page.
So on this page i have displaying 3 columns
Store # Allowance Total
They have asked now instead of clicking on each indivual
record to mark it
as completed, they would like to just place a check next to
each one and let
it update those records for that store....
Ex.
Store 20 has a total of 7 records and has an allowance of
$6000.00 then
they would place 1 check mark next to that store and hit
submit and it would
update all 7 records with a status of completed.
I have read thru some not all but some of the example links i
found for
updating multiple records. But they seem more complex than
what im trying to
do. Since this page is populated dynamically how can i code
it so it
understands when there is new stores listed and records.
Is there any links or tutorial that anyone would recommend
that will explain
the process for creating this functionality?My bad....
ASP and Access is what im using DWMX
"bregent" <[email protected]> wrote in
message
news:ei5srh$6uv$[email protected]..
> What scripting model are you using? You may be able to
find a datagrid for
> your model which will simplify this for you. -
Update multiple records with update button???
I was wondering if someone could explain how I can use the developer tool box to update multiple records at once.
I have a repeat region with a title and a check box if the item is active. I would like to update all records of the table at once. I have see folks state the developer tool box can do this. However I am not sure how..
I am using php with mysql dreamweaver cs3Hi Chris,
that can be done with first creating an ADDT "dynamic list", means to apply ADDT´s "Dynamic List Wizard" to an empty page -- this list will provide checkboxes for all displayed records, and here´s where you can select the to-be-updated (or deleted) records.
Besides creating the list, this wizard will also be creating a blank "form" php page in the same directory, which is by default "tied" to the created list -- you´ll just need to open this blank document with DW and apply ADDT´s "Create Dynamic Form Wizard" to it. However, this form will contain all required routines for single and multiple updates, depending on how many records you select in the list.
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver -
Update multiple records from a list
Just trying to find some tutorials on how to update multiple
records from 1
page of checkboxes
easiest example is hotmail
i would like to be able to give my clients the ability to
delete or update
multiple records from 1 page... mind you that this type of
update woudl only
be for simple status changes, flags that need to be changed
and so on...
Delete... well if they made it to this page they are already
sure and have
been warned that they are going to delete the records..
where can i find such a tutorial on how to complete multiple
record updates
or deletes from 1 form...
thanksServer model and software below.
And hotmail has nothing to do with anything.. its an example
of what i would
like to be able to do...
If you log into hotmail. you have the option to check all the
emails you
want to delete.
well thats what i want to do with my clients sites...
Each record would have its own checkbox, they select the
records they want
to delete or update and they hit submit to process there
request.
Using ASP, SQL2005 and DW8
"bregent" <[email protected]> wrote in
message
news:f21upb$nop$[email protected]..
> >Just trying to find some tutorials on how to update
multiple records from
> >1
>>page of checkboxes
>
> What server model?
>
>>easiest example is hotmail
>
> What does hotmail have to do with this.
Maybe you are looking for
-
How do ram slots J-43 and J44 relate to the numbered slots inside the machine 1-4 upper and lower on a G-5?
-
ABAP RunTime Error for tcode : TS01
Hi Friends, Actually we are getting the run time error while creating the standard security transaction using TS01. After entering the data in the first screen -- click on the enter -- enter the details inside & click on save button--then it will go
-
Error: the itunes library file cannot be saved a folder was specified instead of a file
This started popping up after a forced quit because the program was hanging. The library seems to be writing files from CDs to my dedicated external drive and adding them to the library. The added songs appear and play after program is shut down and
-
How can I use Auto Import to name files after the folder they are dropped into?
I'm camera tethered on a new Macbook Pro Retina, Lightroom 5, all latest software and OS. Using EOS Utility to connect and drop into a DROP folder. When Lightroom Autoimports, I would like it to rename the file after the destination folder. Capture
-
Webi Reports error on refresh - source - SAP BW
Hi, We recently upgraded out SAP BW to SP7. Since then, all our webi reports have been giving the following error when we try to refresh the reports: "A database error occured. The database error text is: A pointer intended for use is NULL. m_pComman