Multiple Rows Update
Hi,
I am creating a form which will display the multiple rows from the table. Is there any way to make multiple rows update at the same time.
If it is report generated by the query, can we do multiple rows update.
Regards,
Munish
Munish,
Sounds like what youâre looking for is a tabular form. Click on create page, then choose form, then tabular form and follow the steps of the wizard. This will create a tabular form for you that lets you update multiple rows, add new rows and delete multiple rows.
Regards,
Marc
Similar Messages
-
Multiple Rows Update / Refresh Toplink Query when database trigger involved
Hi everybody!
I have two easy troubles for you; the platform is the same as the SRDemo Toplink version.
1. Multiple Rows Update: I want to update with mergeEntity method, multiple rows for an isolated table; that method receives a parameter that I try to bind with the iterator "dataProvider" but it only merges the first row, not all, any other combination returns an error.
What I want to do is to have a form (like tabular forms in Apex) that lets me update multiple rows in a single page. ¿May anyone tell me how to do it?
2. Refresh Toplink Named Query: I have a list on a page with two columns. From another page, a button does an action that fires a database trigger that updates one of the columns on the list´s page. When I go back to the list, it is not updated; however, the CacheResults´s property is set to false on the iterator.
Thanks in advance,
Alejandro TI didn't use it (yet), but - you might take a look. You'll find a [url http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-plug-ins-182042.html]Timer plug-in on this page. It is a dynamic action which allows you to periodically fire other dynamic actions in the browser. For example use the timer to refresh a region every five minutes. You can perform any dynamic action you want using this infrastructure.So I was thinking: you might use it to run a dynamic action which would check whether something changed in that table (I suppose you'll know the way) (for example, a database trigger might set a flag in some table, timestamp or similar), and - if you find that something really changed - refresh the page.
As I said, I never used it so that's pure theory. Someone else might know better, though. -
Multiple row update of a table from another one
Im trying to make a multiple row update with date from a different table, but it's giving me an error.
update inv.mtl_system_items_b
set attribute1 = t2.description,
last_update_date = SYSDATE,
last_updated_by = 3606
from inv.mtl_system_items_b t2
inner join TMP.TMP_INACTIVAR_PRODUCTOS t1
on t2.segment2 = t1.inventory_item_id;Edited by: user8986013 on 21-may-2010 14:15Hi,
Whenever you have a question involving an error message, post the complete error message, including line number. Don't you think that might help people solve your problem?
Whneve you have any question, post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data. (In the case of a DM<L statement, like UPDATE, the INSERT statements show the tables before the change, and the results are the contents of the changed table after it.)
Review the syntax of the UPDATE statement in the SQL Language manual:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10008.htm#sthref9598
MERGE may be more efficient and easier to use than UPDATE. -
Multiple row update; CEV business rule parameters are not refreshed
During a multiple row update, a business rule is fired for each row.
This change event business rule must update the value of another column in the same table (and same row).
Unfortunately, the parameters of the BR are keeping the values of the first row that has been checked. Since my parameter p_id always keeps the same value, I always update the same row.
Does somebody have a hint on how to solve this problem ?
I'm using Headstart R6i and Forms6i with Oracle9i DB.
Thanks in advance for your help,
Denis.I think that's how it works. I tried that with a variable where type is Members.
It is not showing me a prompt when i select multiple rows. However works only for first row. (even if the menu is initiated from second row).
Multiple rows selected, variable type is members. works only for first row in selection. (in 11.1.2.2) You can try log an SR and see what Oracle has to say.
Regards
Celvin
http://www.orahyplabs.com -
Multiple Row Update in a Table
Hi,
How do I do a multiple row update in a single table in Oracle? I was thinking of something that is similar to the insert example below:
Insert into SOME_TABLE (COL1, COL2) (select COL1, COL2 from ANOTHER_TABLE);
...wherein I don't have to write multiple lines of update statement.
Thanks.Hi Mike,
Thanks for replying. I was actually looking for a multiple row update using a single update statement. The only reason I provided an Insert statement example is to show the idea. I did some test and I was able to figure it out. I thought it was something complicated but I just had to retrieve the new values from another table and equate the primary key and foreign keys of the two tables. -
ADF JSF - Multiple Rows Update
Does anybody if there is a new component in ADF JSF that allows update of multiple rows? Se example...
ID | Name | Number
1 | textbox | textbox
2 | textbox | textbox
3 | textbox | textbox
|Create- button| | Save - button|Sure, the ADF Faces <af:table> supports updating multiple rows: just put an <af:inputText> inside one of the columns.
-
JDBC Receiver - Multiple rows Update
I have an interface the incoming message contain multiple columns and it has to be updated using a JDBC Receiver Adapter with its key values.
Can we send multiple rows in a single JDBC Update Statement.
Please advise.Sebin,
No ,it's not possible to have multiple rows in single update statement. Rather you can duplicate the segment at Statement level and do the update.
Please refer http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
raj. -
URGENT!!! Can't implement a Multiple Row Update Process
Hi All,
I'm a total newbie to APEX and wondered if anyone could help.
I've created an Application using the "Report and Form" template. My Table, call it tab1, has a pk called pk1 and four fields, f1, f2, f3 and f4. The Application has 3 pages, p1 is the login page, p2 is the Report and p3 the Form. The Report is fine and I've added a search on the Report based on the pk. The Below is an example of the output of a Report filtered on the value pk=3:
PK F1 F2 F3 F4
3 21 A C A
3 21 B B C
3 21 C A A
3 21 B D A
Each of the 4 rows above then links into a Form on P3 for updating, so if I clicked on the link for the first row the Form would like something like this:
PK 3
F1 21
F2 A
F3 C
F4 A
Now here's what I'm trying to achieve. I've created an "Update" button on p3 and when I press this I would simple like the below statement to be executed:
Update Tab1
set F4 = :P_4,
F3 = :P_3
where F1 = :P_F1
where :P_1, :P_3 and :P_4 are the values inserted by the user. So basically I want to do a multi-row update based on a non-primary key. In this case I would want 4 rows updated after pressing the Update button.
Any help would be most appreciated.
Mitshave you tried to download and install hp's drivers from this place?
http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?product=3382185&lc=en&cc=us& dlc= -
Multiple Row Update From Similar Table
I am attempting to update a table based on similar table if the Entry_Type is D and they have the same log_numbers. I have created queries to show me the results I want but am having some difficulities getting the update to happen. I am getting a single-row subquery returns more than one row error, but I would like to update all necessary rows.
Here is my sql...
UPDATE V.MASTER
SET (MODIFIED_BY, ENTRY_TYPE) = (
SELECT MODIFIED_BY, ENTRY_TYPE
FROM J.BACK)
WHERE LOG_NUMBER IN
(SELECT LOG_NUMBER FROM V.MASTER
WHERE ENTRY_TYPE <> 'D' AND LOG_NUMBER = ANY
(SELECT LOG_NUMBER FROM J.BACK
WHERE ENTRY_TYPE = 'D'))
I would appreciate any assistance! Thanks!You can also use correlated update. This one is from AskTom (http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1197999096334)
if you have the proper primary keys to assure uniqueness on S and C, this does it (i have the keys
noted in the creates)
ops$tkyte@ORA920> create table pgp_person
2 ( date_of_birth date,
3 update_by varchar2(10),
4 update_date date,
5 load_timestamp date,
6 person_num int );
Table created.
ops$tkyte@ORA920>
ops$tkyte@ORA920> create table ship_passenger
2 ( date_of_birth date,
3 person_num int,
4 voy_num int,
5 book_num int,
6 seq_num int,
7 primary key (person_num) );
Table created.
ops$tkyte@ORA920>
ops$tkyte@ORA920> create table pgp_cruise_history
2 ( voy_num int,
3 book_num int,
4 seq_num int,
5 matched_ind int,
6 primary key(voy_num,book_num,seq_num) );
Table created.
ops$tkyte@ORA920>
ops$tkyte@ORA920> update ( select p.date_of_birth dob1, s.date_of_birth dob2,
2 p.update_by, p.update_date, p.load_timestamp
3 from pgp_person p, pgp_cruise_history c, ship_passenger s
4 where p.person_num = s.person_num
5 and s.voy_num = c.voy_num
6 and s.book_num = c.book_num
7 and s.seq_num = c.seq_num
8 and c.matched_ind is not null
9 and s.date_of_birth <> p.date_of_birth )
10 set dob1 = dob2,
11 update_by = 'sdm18649',
12 update_date = trunc(sysdate),
13 load_timestamp = sysdate;
0 rows updated. -
How can i use multiple row subquery in update statement
Hai All
I using group function in my update statement.. and i need to update more rows so i need to use multiple row
subquery pls tell me how to use multiple row subquery in update statement
For example
while i am using this like this i got an error
update dail_att set outtime in (select max(r2.ptime) from temp_att where empcode=r2.enpno and
barcode=r2.cardn and attend_date=r2.pdate group by enpno,pdate,cardn);
Pls tell me how to use with example
Thanks & regards
Srikkanth.MHai Man
Thanks for ur response Let me clear what i need
First step Fetch the records as text file and stores into table T1
and the next step is i have seperated the text using substring and stores in different columns of a table
There are two shifts 0815 to 1645 and 1200 and 2000
Here I rep IN and O rep OUT
Empno date time inout
001 01-01-10 0815 I
002 01-01-10 0815 I
003 01-01-10 0818 I
001 01-01-10 1100 0
001 01-01-10 1130 I
002 01-01-10 1145 0
002 01-01-10 1215 I
004 01-01-10 1200 I
005 01-01-10 1215 I
004 01-01-10 1315 O
004 01-01-10 1345 I
001 01-01-10 1645 0
002 01-01-10 1715 0
003 01-01-10 1718 0
004 01-01-10 2010 0
005 01-01-10 2015 0
This is my T1 table i have taken data from text file and stored in this table from this table i need to move data to another table T2
T2 contains like this
Empno Intime Intrin Introut Outtime Date
001 0815 1100 1130 1645 01-01-10
002 0815 1145 1215 1715 01-01-10
003 0818 1718 01-01-10
004 1200 1315 1345 2010 01-01-10
005 1215 2015 01-01-10
This what i am trying to do man but i have little bit problems Pls give some solution with good example
And my coding is
declare
emp_code varchar2(25);
in_time varchar2(25);
out_time varchar2(25);
Cursor P1 is
Select REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
From temp_att
group by REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
ORDER BY enpno,pdate,ptime;
begin
for r2 in p1 loop
declare
bar_code varchar2(25);
begin
select barcode into bar_code from dail_att where empcode=r2.enpno and attend_date=r2.pdate;
For r3 in (select empcode,empname,barcode,intime,intrin,introut,addin,addout,outtime,attend_date from dail_att)loop
if r2.inout ='O' then
update dail_att set outtime =(select max(r2.ptime) from temp_att where empcode=r2.enpno and barcode=r2.cardn and attend_date=r2.pdate group by r2.cardn,r2.enpno,r2.pdate );
end if;
end loop;
exception
when no_data_found then
if r2.inout ='I' then
insert into dail_att(barcode,empcode,intime,attend_date)(select r2.cardn,r2.enpno,min(r2.ptime),r2.pdate from temp_att group by r2.cardn,r2.enpno,r2.pdate );
end if;
end;
end loop;
commit;
end;
Pls tell me what correction i need to do i the update statement i have used a subquery with group function but when i used it will return only one row but my need is to return many rows and i need to use multiple row subquery
and how can i use it in the update statement
Thanks In Advance
Srikkanth.M -
How can I use multiple row insert or update into DB in JSP?
Hi all,
pls help for my question.
"How can I use multiple rows insert or update into DB in JSP?"
I mean I will insert or update the multiple records like grid component. All the data I enter will go into the DB.
With thanks,That isn't true. Different SQL databases have
different capabilities and use different syntax, That's true - every database has its own quirks and extensions. No disagreement there. But they all follow ANSI SQL for CRUD operations. Since the OP said they wanted to do INSERTs and UPDATEs in batches, I assumed that ANSI SQL was sufficient.
I'd argue that it's best to use ANSI SQL as much as possible, especially if you want your JDBC code to be portable between databases.
and there are also a lot of different ways of talking to
SQL databases that are possible in JSP, from using
plain old java.sql.* in scriptlets to using the
jstlsql taglib. I've done maintenance on both, and
they are as different as night and day.Right, because you don't maintain JSP and Java classes the same way. No news there. Both java.sql and JSTL sql taglib are both based on SQL and JDBC. Same difference, except that one uses tags and the other doesn't. Both are Java JDBC code in the end.
Well, sure. As long as you only want to update rows
with the same value in column 2. I had the impression
he wanted to update a whole table. If he only meant
update all rows with the same value in a given column
with the same value, that's trivial. All updates do
that. But as far as I know there's know way to update
more than one row where the values are different.I used this as an example to demonstrate that it's possible to UPDATE more than one row at a time. If I have 1,000 rows, and each one is a separate UPDATE statement that's unique from all the others, I guess I'd have to write 1,000 UPDATE statements. It's possible to have them all either succeed or fail as a single unit of work. I'm pointing out transaction, because they weren't coming up in the discussion.
Unless you're using MySQL, for instance. I only have
experience with MySQL and M$ SQL Server, so I don't
know what PostgreSQL, Oracle, Sybase, DB2 and all the
rest are capable of, but I know for sure that MySQL
can insert multiple rows while SQL Server can't (or at
least I've never seen the syntax for doing it if it
does).Right, but this syntax seems to be specific to MySQL The moment you use it, you're locked into MySQL. There are other ways to accomplish the same thing with ANSI SQL.
Don't assume that all SQL databases are the same.
They're not, and it can really screw you up badly if
you assume you can deploy a project you've developed
with one database in an environment where you have to
use a different one. Even different versions of the
same database can have huge differences. I recommend
you get a copy of the O'Reilly book, SQL in a
Nutshell. It covers the most common DBMSes and does a
good job of pointing out the differences.Yes, I understand that.
It's funny that you're telling me not to assume that all SQL databases are the same. You're the one who's proposing that the OP use a MySQL-specific extension.
I haven't looked at the MySQL docs to find out how the syntax you're suggesting works. What if one value set INSERT succeeds and the next one fails? Does MySQL roll back the successful INSERT? Is the unit of work under the JDBC driver's control with autoCommit?
The OP is free to follow your suggestion. I'm pointing out that there are transactions for units of work and ANSI SQL ways to accomplish the same thing. -
How to update multiple rows in one query using php
i am new to this can any one help me how to update multiple rows at a time i am doing an school attendance page
Often the situation is such that you have multiple courses across a range of dates.So students may take more than one course, and you need to track attendance for each course date. The following graphic demonstrates this:
In such a situation, you need four database tables as follows:
students (student_id, student_name, etc.)
courses (course_id, course_name, etc.)
students_courses (student_id, course_id)
attendance (student_id, course_id, dater)
A fifth table may also be needed to define the dates of courses, but you may also be able to build this array programmatically by using PHP's robust date functions, which can give you, for instance, all the Tuesdays and Thursdays between a start date and end date.
The students_courses table simply keeps track of which students are taking which courses, so it has just two columns for the primary keys of both of the main tables. The attendance table is similar, but it also includes a date field. The following view of the attendance table demonstrates this:
So if David's solution does cover your needs, consider yourself lucky, because this could quickly grow from a beginner-appropriate project to a moderately advanced one. -
Update row in a table based on join on multiple rows in another table
I am using SQL Server 2005. I have the following update query which is not working as desired.
UPDATE DocPlant
SET DocHistory = DocHistory + CONVERT(VARCHAR(20), PA.ActionDate, 100) + ' - ' + PA.ActionLog + '. '
FROM PlantDoc PD INNER JOIN PlantAction PA on PD.DocID = PA.DocID AND PD.PlantID = PA.PlantID
For each DocID and PlantID in PlantDoc table there are multiple rows in PlantAction table. I would like to concatenate ActionDate and ActionLog information into DocHistory column of DocPlant table. But the above update query is considering only one row from
PlantAction table even though there are multiple rows that match with DocID and PlantID.
DocHistory column is of type NVARCHAR(MAX).
How do I fix my query to achieve what I want ? Thanks for the help.UPDATE DocPlant
SET DocHistory = DocHistory + CONVERT(VARCHAR(20), PA.ActionDate, 100) + ' - ' + PA.ActionLog + '. '
FROM PlantDoc PD INNER JOIN PlantAction PA on PD.DocID = PA.DocID AND PD.PlantID = PA.PlantID
We do not use the old Sybase UPDATE..FROM.. syntax. Google it and learn how it does not work. We do not use the old Sybase CONVERT() string function. You are still writing 1950's COBOL with string dates instead of temeproal data types.
You also did not post DDL, so we have to guess about everything. Does your boss make you work without DDL? How do you do it?
>> For each DocID and PlantID in PlantDoc table there are multiple rows in PlantAction [singular name?] table. I would like to concatenate ActionDate and ActionLog information into DocHistory column of DocPlant table. <<
Why? What does this new data element mean? This is like dividing Thursday by Red and expecting a reasonable answer. Now, non-SQL programmers who are still writing COBOL will violate the tiered architecture rule about doing display formatting in the database.
If you will follow forum rules, we can help you.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Update multiple rows in a dynamic table Dreamweaver CS5.5
hello there
i want to update multiple rows which comes from a dynamic table in Dreamweaver CS5 (a loop in php) here is my Mysql table :
sql code
CREATE TABLE `register`.`s_lessons` (
`lid` int( 5 ) NOT NULL ,
`sid` int( 9 ) NOT NULL ,
`term` int( 5 ) NOT NULL ,
`tid` int( 5 ) NOT NULL ,
`point` double NOT NULL DEFAULT '0',
PRIMARY KEY ( `lid` , `sid` , `term` ) ,
KEY `tid` ( `tid` ) ,
KEY `point` ( `point` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 COLLATE = utf8_persian_ci;
and this is my page source code:
php file
<?php require_once('../Connections/register.php'); ?>
<?php
session_start();
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$colname1_rs1 = "-1";
if (isset($_GET['term'])) {
$colname1_rs1 = $_GET['term'];
$colname_rs1 = "-1";
if (isset($_GET['lid'])) {
$colname_rs1 = $_GET['lid'];
$colname2_rs1 = "-1";
if (isset($_SESSION['tid'])) {
$colname2_rs1 = $_SESSION['tid'];
mysql_select_db($database_register, $register);
$query_rs1 = sprintf("SELECT s_lessons.sid, s_lessons.lid, s_lessons.term, s_lessons.tid, s_lessons.point FROM s_lessons WHERE s_lessons.lid = %s AND s_lessons.term = %s AND s_lessons.tid = %s", GetSQLValueString($colname_rs1, "int"),GetSQLValueString($colname1_rs1, "int"),GetSQLValueString($colname2_rs1, "int"));
$rs1 = mysql_query($query_rs1, $register) or die(mysql_error());
$row_rs1 = mysql_fetch_assoc($rs1);
$totalRows_rs1 = mysql_num_rows($rs1);
$count=mysql_num_rows($rs1);
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
for ($j = 0, $len = count($_POST['lid']); $j < $len; $j++) {
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE s_lessons SET point=%s WHERE tid=%s, lid=%s, sid=%s, term=%s",
GetSQLValueString($_POST['point'] [$j], "double"),
GetSQLValueString($_SESSION['tid'], "int"),
GetSQLValueString($_POST['lid'] [$j], "int"),
GetSQLValueString($_POST['sid'] [$j], "int"),
GetSQLValueString($_POST['term'] [$j], "int"));
mysql_select_db($database_register, $register);
$Result1 = mysql_query($updateSQL, $register) or die(mysql_error());
$updateGoTo = "student_lists.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $updateGoTo));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>r</title>
<link href="styles/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="styles/in_styles.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<div id="header-wrapper">
</div>
<!-- end #header -->
<div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<div style="clear: both;">
<form name="form1" id="form1" method="post" action="<?php echo $editFormAction; ?>">
<table border="1" align="center">
<tr>
<th>Student ID</th>
<th>Lesson ID</th>
<th>Semester</th>
<th>Point</th>
</tr>
<?php do { ?>
<tr>
<td class="data"><label for="sid[]"></label>
<input name="sid[]" type="text" id="sid[]" value="<?php echo $row_rs1['sid']; ?>" size="9" readonly="readonly" /></td>
<td class="data"><label for="lid[]"></label>
<input name="lid[]" type="text" id="lid[]" value="<?php echo $row_rs1['lid']; ?>" size="5" readonly="readonly" /></td>
<td class="data"><label for="term[]"></label>
<input name="term[]" type="text" id="term[]" value="<?php echo $row_rs1['term']; ?>" size="4" readonly="readonly" /></td>
<td><label for="point[]"></label>
<input name="point[]" type="text" id="point[]" value="<?php echo $row_rs1['point']; ?>" size="4" />
</tr>
<?php } while ($row_rs1 = mysql_fetch_assoc($rs1)); ?>
</table>
<p>
<input type="submit" name="Submit" id="Submit" value="Submit" />
<input type="hidden" name="MM_update" value="form1" />
</p>
</form>
</div>
</div>
<div style="clear: both;">
</div>
</div>
<!-- end #content -->
<!-- end #sidebar -->
<div style="clear: both;"> </div>
</div>
</div>
</div>
<!-- end #page -->
</div>
<!-- end #footer -->
</body>
</html>
<?php
mysql_free_result($rs1);
?>
All i want is that when users click on SUBMIT button values of point column in s_lessons(database table) be updated by new entries from user.
i did my best and result with that code is :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' lid=888, sid=860935422, term=902' at line 1
I would appreciate any idea.
with prior thanksGo to the Row Properties, and in the Visibility tab, you have "Show or hide based on an expression". You can use this to write an expression that resolves to true if the row should be hidden, false otherwise.
Additionally, in the Matrix properties you should take a look at the filters section, perhaps you can achieve what you wish to achieve through there by removing the unnecessary rows instead of just hiding them.
It's only so much I can help you with the limited information. If you require further help, please provide us with more information such as what data are you displaying, what's the criteria to hiding rows, etc...
Regards
Andrew Borg Cardona -
INSERT or UPDATE with multiple rows
Hi there!
I want to ask what I should do in the following case: I have to handle mutliple rows of data to insert OR to update into the database.
The first question is about how to decide whether I should take INSERT or UPDATE. I read here in the forum that I could take a SELECT-statement before, and, if it isn't null, I could update the resultset..if it is null I can make an INSERT-statement.
But now I a have multiple rows to update or to insert which I want to handle as a transaction (with a batch), so I don't want to check each row the way I described above. Does anyone has a hint ?
Thanks a lot in advance.This is not a problem with java but rather a problem
with databases in general. The solution generally
depends on the data that is being operated on.
If there is a primary key involved, and most records
were expected to NOT be in the database, then you
could just insert them in blocks (transaction/batch).
Each block would fail when a primary key duplicate.
Then you can process each block as individual
l statements. The ones that fail are done as
inserts.
The reverse of the above is used if you expect most
records to be in the database. Do updates and the
break out the blocks with failures to locate the
inserts.
Keep in mind that queries for keys probably will be
faster, but that requires that your keys are ordered.
If you keys are ordered then you can get a range from
the initial data. Use that to query the database for
keys between that range (only return the keys.)
Using the returned keys you can decide whether each
h record needs to be an update or insert (presort the
data into each group and batch each group for more
speed.)
If the data is really mixed and the database supports
it then you can write a stored proc (MySQL does not)
which decides whether an insert/update is needed.
Finally if you have large amounts of data, bulk
operations especially inserts are better done with
tools supplied by the database vendor. Instead of
using JDBC to do the insert/updates you write the
output to a file and pass the file to the tool. You
might use JDBC (again with the ordered key query) to
decide which operation to do. Although faster for
large sets this is problematic due to the error
handling that you have to add.
Thanks for this, jschell. I look for your answers, because they're on the money and written well. I learn a lot from them. - MOD
Maybe you are looking for
-
IPhone no longer plays any non-iTunes content
I recently updated my iTunes and synced my iphone to it. Now any song I have in my iPhone library that was not acquired through iTunes (including music I imported from CDs and purchased on Amazon.com) will not play anymore. This is the first time thi
-
I'm using the java.util.logging.Logger and I need to know how to set the logging level so the log file will only print ERROR or higher messages. Is there a way to do this though a java command line argument? Thank you in advanced.
-
SAP Press Sneak Preview errors with EJB
I am using the WAS Sneak Preview that came with the SAP PRESS Programming with Java and I have been trying to create a test entity bean which I create from a JSP. I have basically made it mirror with one of the examples in the book albeit changing so
-
hi in sapscript function: CALL FUNCTION 'OPEN_FORM' EXPORTING device = device language = sy-langu "language form = 'Z_SHOPPING_LIST' OPTIONS = itcpo dialog = ' '. how to set: just to send spool not print o
-
Backup and Restore of Redis Data
My usage of Azure Redis is a cache to store snapshots of data for an event sourced system. We have millions of events stored in persistent storage that are aggregated and saved to redis. This provides us with fast access to the current state of an en