Multiple Rows in Footer's part of table
H i all of you
I'm looking for a way to display multiple rows in a footer (which is repeated on every pages) based upon an internal table.
Have you ever try to do this ?
Brice
Configuration : ADS 8.1
Edited by: Brice VINCENT on Aug 26, 2009 5:17 PM
In fact i have to display to sum of different currencies.
For instance:
Body Part
EUR 10
USD 20
EUR 15
USD 12
Footer Part
EUR 25
USD 22
The problem is not to do the sum. the problem is to make the list of currencies in the footer repeated throughout each page.
And i get no currencies in the footer since the 2nd page.
Similar Messages
-
Multiple Rows in Footer part of a table
Hi all you,
I'd like to know if there is a way to handle dynamically several rows in the footer table's part.
In fact, i try to summarize for every page of a form , the total of expenditure by Currency.
Thanks!
BriceThanks Djaknow for you answer.
Unfortunetaly, i can't send any sample because i work on a SAP version of Adobe lifecyble (nevertheless, this work exactly like the genuine one).
In fact, i'm making an invoice form which has different currencies in it. This is a multi page form. Therefore i have to summarize amounts for each currrency which means that i have a list of currencies in the footer of each page.
The way i've done it is as followed:
- I've created a table just below the masterpage content area. But it works only for the first page. The following pages displayed nothing. I think it is due to lifecycle which stop enumerating data after the first page.
May be if we tell lifecycle to reset dataset processing for each page, it would works. But i don't know how to do it with formcalc or javascript language. -
How to get multiple rows at one time in a table?
hi
I have a JTable bound with ViewObject and i use multiple selection mode setting to get selection row.
My question is when i select more then one row at one time i only can get those index from JTable but can't get those rows from ViewObject.is it possible to get rows from ViewObject? or how to use JTable row index to get row from ViewObject?repost
-
Send multiple rows to database from a dynamic table.
I'm using JSP for my application. I have a table that changes
in size depending on a value a user selects in a drop down list.
They can then enter some values into the table and click the submit
button. I know for whatever reason Dreamweaver only sends the first
row to the database and I've had a hard time finding good
examples/tutorials showing how I could make it send all the rows to
the database.
Is there a way for me to just do a while/for loop taking into
account the number of rows in the table? That would be ideal for me
as it sounds like the simplest method and I'm very new to web
development.
Should I be using the Server Behavior Builder or a Stored
Procedure and if so is there any good examples for those as I've
had a hard time working with any documentation/tutorials I've found
regarding them.
Any help would be greatly appreciated.Hey Baxter, thanks for the response. I guess I should have
been more specific when I said I was new to Web Development. I am
actually in Software Development where I primarily code in Java and
other OO languages. I have worked with a database before in java by
writing my own servlet. I have also done some HTML so jsp is very
good for me as it is mostly java with the odd bit of html
structuring with tables and such.
Languages like PHP and ASP I am not very familiar with and
most of the solutions I find for this very problem revolve around
ASP. I have just found it very hard to find a solution to this
problem. It seems like it isn't talked about very much even in
Dreamweaver's own documentation. If a stored procedure is the only
way to go then I think I can handle it with some guidance if anyone
knows of some tutorials/examples available.
Also is it really not possible to just go into the code and
somehow make it loop through each row in the table and execute a
prepared statement for each row? I've included some code of the
dynamic table I have and as you can see I have a Submit button on
its own outside of the table. If i had it inside then the user
would have to submit each row individually which isn't realistic
when there are many rows of data. Since the Submit is outside of
the while it only gets called once after the table is populated
thus sending only one row of data.
You might want to copy paste the code into a text editor as
some of the lines are long and may be hard to read here. If you
notice any errors in the table itself like mismatching column
headers it is because I changed some column names before attaching
it here so just assume that the table is all built correctly.
PS: I am going to be out of town for five days or so, so if I
don't reply to you right away don't think I disappeared from this
thread. Thanks again.
<div>
<h2>TableData</h2>
<form ACTION="<%=MM_editAction%>" METHOD="POST"
name="tabledata">
<table>
<% if (!Recordset1_isEmpty ) { %>
<tr>
<td class="head">Name1</td>
<td class="head">Name2</td>
<td class="head">Name3</td>
<td class="head">Code1</td>
<td class="head">Code2</td>
<td class="head">Old Status1</td>
<td class="head">New Status1</td>
<td class="head">Old Status2</td>
<td class="head">New Status2</td>
<td class="head">Year</td>
</tr>
<% } /* end !Recordset1_isEmpty */ %>
<% while
((Recordset1_hasData)&&(Repeat1__numRows-- != 0)) { %>
<% if (szin11 ==2) {color11 = "#ECECEC" ;szin11=(0);}
%><tr>
<td><input type="hidden"
value="<%=((((Recordset1_data =
Recordset1.getObject("Name1"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Name1"
/><%=(((Recordset1_data =
Recordset1.getObject("Name1"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input value="<%=((((Recordset1_data =
Recordset1.getObject("Name2"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Name2"
type="hidden" /><%=(((Recordset1_data =
Recordset1.getObject("Name2"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input value="<%=((((Recordset1_data =
Recordset1.getObject("Name3"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Name3"
type="hidden" /><%=(((Recordset1_data =
Recordset1.getObject("Name3"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<input name="Code1" type="hidden"
value="<%=(((Recordset1_data =
Recordset1.getObject("Code1"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%>" />
<td><input value="<%=((((Recordset1_data =
Recordset1.getObject("Code2"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Code2"
type="hidden" /><%=(((Recordset1_data =
Recordset1.getObject("Code2"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input value="<%=((((Recordset1_data =
Recordset1.getObject("Old Status1"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Old Status1"
type="hidden" /><%=(((Recordset1_data =
Recordset1.getObject("Old Status1"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input size="10"
value="<%=((((Recordset1_data = Recordset1.getObject("New
Status1"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="New Status1"
type="hidden" />
<%=(((Recordset1_data = Recordset1.getObject("New
Status1"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input name="New Status1" type="text" size="5"
/></td>
<td><input size="10"
value="<%=((((Recordset1_data = Recordset1.getObject("Old
Status2"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Old Status2"
type="hidden" />
<%=(((Recordset1_data = Recordset1.getObject("New
Status2"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input name="New Status2" type="text" size="5"
/></td>
<td><%=(((Recordset1_data =
Recordset1.getObject("Year"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%>
<input name="Year" type="hidden"
value="<%=(((Recordset1_data =
Recordset1.getObject("Year"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%>"
/></td></tr>
<% if (szin11 ==0) {color11 = "#FFFFFF"; szin11=(0);}
%>
<% szin11++; %>
<%
Repeat1__index++;
Recordset1_hasData = Recordset1.next();
%>
</table>
<p>
Comments<br />
<textarea name="comments" cols="40"
rows="4"></textarea>
</p>
<p>
<input type="submit" value="Submit" />
</p>
<input type="hidden" name="MM_insert" value="tabledata"
/>
</form>
</div> -
Update multiple rows with datas from the same table
i have a table like
name version value1 value2
2 A 4,31 3,5
3 A 3,45 10
2 B 6,97 12
4 B 12 16
so name + version is unique
i have to update the datas value1 and value2 ( version A) with the datas from version B where the name ( VersionA) = name version B
i.e the result should be
name version value1 value2
2 A 6,97 12
3 A 3,45 10
2 B 6,97 12
4 B 12 16
is it possible to do this in sql? ( sql. 8.1)... if your table does not contain exactly what you expect you could get:
'single row sub-query returns more than one row'
To prevent that, put a unique index on (name, version). If this combination is not always unique, you will need to cater for the possibility in the update statement. -
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 -
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 -
Insert multiple rows from cursor to table
Hi,
I want to insert multiple rows retrieved from cursor to a table without looping the cursor till the end of cursor.
I have the following structure, plz guide me.
Create procedure procedure_name as
cursor mycursor as
select * from table1; --returns multiple row
t_data table1%rowtype;
begin
fetch mycursor to t_data;
loop
exit when cursor not found;
insert to table2
end loop;
end procedure;
===========================
Now my cursor contains multiple records. I can iterate the records in loop and insert data to another table e.g table2 with same structure.
But I want to insert the total data at a time without looping the cursor for each data.Please suggest how to do this ?
Thanks in advance.You should be able to do it in a single statement (assuming table1 and table2 have the same columns/datatypes)
insert into table2 (select * from table1); -
Displaying multiple rows of a table using smartforms
hi,
how to get multiple rows on a form from a table using smartforms.I succeded in getting only the first row of the table on the main window of the page .In order to display more than one record on the page what i have to do.You have to use LOOPS / TEMPLATES to achieve this
Here is a very good code sample for using Template,Table,Loop in smartforms with screen shot
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
Please do not post multiple threads. Kindly close them rewarding point for helpful answers,
extracting multiple records
to display multiple records in smart form
Re: extracting multiple records
Kindly reward point and close the duplicates.
Regards
Kathirvel -
Multiple rows to be returned from a procedure without a cursor?
We can return multiple rows using ref cursor as the return type in a procedure/function but I want to avoid processing a cursor. I would like to use the select statement on the returned multiple rows. I believe pl/sql table can not be used here also as select are not permitted on it. Is there some way to get around this defficiency in oracle?? Please help out!! My email is [email protected]
nullOracle 8i has temporary tables. As far as I know, this is your only option.
I, too, would like to be able to return a true "relation" (or "table") from a pl/sql function. Why can't I just specify the return type of the function as a "table" of "records"?
Note that if pl/sql is completely orthogonality (neat word, huh?) I should be allowed to use this function that returns a "relation" as a table in the "from" clause of a sql query.
Speaking of complete orthogonality, why can't I treat a pl/sql table just like any other table -- I should be able to query it, "insert" into it, "update" it, join it to other "tables", etc.
How about this for a slogan, "tables everywhere"? Anything, from arrays scalars to functions to arrays of classes to pl/sql tables should be able to participate in a sql statement as a "relation/table."
Anyone from Oracle listening out there? :-) -
Concatenate a column value across multiple rows - PDW
We are using PDW based on SQL2014. We require an efficient logic on how to concatenate a column value across multiple rows. We have the following table
T1
(CompanyID, StateCD)
Having following rows:
1 NY
1 NJ
1 CT
2 MA
2 NJ
2 VA
3 FL
3 CA
We need a code snippet which will return following result set:
1
CT,NJ,NY
2
MA,NJ,VA
3
CA,FL
We have tried built-in function STUFF with FOR XML PATH clause and it is not supported in PDW. So, we need a fast alternative.Hi Try this:
SELECT * INTO #ABC
FROM
SELECT 1 AS ID,'NY' AS NAME
UNION
SELECT 1 AS ID,'NJ' AS NAME
UNION
SELECT 1 AS ID,'CT' AS NAME
UNION
SELECT 2 AS ID,'MA' AS NAME
UNION
SELECT 2 AS ID,'NJ' AS NAME
UNION
SELECT 2 AS ID,'VA' AS NAME
UNION
SELECT 3 AS ID,'FL' AS NAME
UNION
SELECT 3 AS ID,'CA' AS NAME
)A
CREATE TABLE ##CDB (ID INT, NAME NVARCHAR(800))
DECLARE @TMP VARCHAR(MAX),
@V_MIN INT,
@V_MAX INT,
@V_COUNT INT
SELECT @V_MIN=MIN(ID),@V_MAX=MAX(ID) FROM #ABC
SET @V_COUNT=@V_MIN
WHILE @V_COUNT<=@V_MAX
BEGIN
SET @TMP = '' SELECT @TMP = @TMP + CONVERT(VARCHAR,NAME) + ', ' FROM #ABC
WHERE ID=@V_COUNT
INSERT INTO ##CDB (ID, NAME) SELECT @V_COUNT AS ID ,CAST(SUBSTRING(@TMP, 0, LEN(@TMP)) AS VARCHAR(8000)) AS NAME
SET @V_COUNT=@V_COUNT+1
END
SELECT * FROM ##CDB
OR
SELECT * INTO #ABC
FROM
SELECT 1 AS ID,'NY' AS NAME
UNION
SELECT 1 AS ID,'NJ' AS NAME
UNION
SELECT 1 AS ID,'CT' AS NAME
UNION
SELECT 2 AS ID,'MA' AS NAME
UNION
SELECT 2 AS ID,'NJ' AS NAME
UNION
SELECT 2 AS ID,'VA' AS NAME
UNION
SELECT 3 AS ID,'FL' AS NAME
UNION
SELECT 3 AS ID,'CA' AS NAME
UNION
SELECT 5 AS ID,'LG' AS NAME
UNION
SELECT 5 AS ID,'AP' AS NAME
)A
CREATE TABLE ##CDB (ID INT, NAME NVARCHAR(800))
DECLARE @TMP VARCHAR(MAX),
@V_MIN INT,
@V_MAX INT,
@V_COUNT INT
SELECT @V_MIN=MIN(ID),@V_MAX=MAX(ID) FROM #ABC
SET @V_COUNT=@V_MIN
WHILE @V_COUNT<=@V_MAX
BEGIN
SET @TMP = '' SELECT @TMP = @TMP + CONVERT(VARCHAR,NAME) + ', ' FROM #ABC
WHERE ID=@V_COUNT
SELECT @V_COUNT AS ID ,CAST(SUBSTRING(@TMP, 0, LEN(@TMP)) AS VARCHAR(8000)) AS NAME INTO #TEMP
INSERT INTO ##CDB (ID, NAME) SELECT ID, NAME FROM #TEMP WHERE NAME<>''
DROP TABLE #TEMP
SET @V_COUNT=@V_COUNT+1
END
SELECT * FROM ##CDB
Thanks Shiven:) If Answer is Helpful, Please Vote -
Ok I have three tables which two tables are one to one and
the other one is a one to many. The one to one tables have all the
data in one row and the one to many has the data in multiple rows.
The one to many table (named county_notes) has notes about specific
counties. The other tables (named county_bio and county_stats) have
different information about each county. The three tables are
connected by an ID.
What I want to be able to list the county information and the
notes about each county in the same report.
For example:
Record1
County: Craven
Phone: (252)123-4567
Notes:
Judy is nice
John is mean
The tables would like this:
county_bio
ID county_name
1 craven
county_stats
ID county_phone
1 (252) 123-4567
county_notes
ID notes
1 Judy is nice
1 John is mean
Obviously the above tables are just examples but you get the
idea of how the tables are set up. The problem is I can join the
county_notes table to one of the two using tables, so that is
problem one. Problem 2, Coldfusion separates each note into a
different record. So I end up with record "craven" showing up twice
(once with the note about judy, and once with the note about john).
Here is the SQL that joins county_bio and county_notes:
SELECT *
FROM county_bio
LEFT JOIN county_notes
ON county_bio.ID = county_notes.county_ID
First how do I get all three tables connected? And second how
do I get ColdFusion to print each note about the county in one
record?
Thanks for any and all help! I have been working on this for
a few days and am out of ideas.quote:
Originally posted by:
wbnc1902
THANK YOU SO MUCH!!!! This was a big help. Forgive me for
being new at SQL but can you explain why there is a ( ) around the
inner join in the from statement? My only guess is it is some sort
of subquery that joins those two tables together into one virtual
table and then joins that table with the county_notes table
creating one big virtual table.
Am I even close?
In this particular case, the brackets were not necessary.
But, obviously they didn't hurt.
The concept you are describing has many names. I call it
joining to a subquery. Others call it creating tables on the fly or
derived tables. The syntax is
select stuff
from a_table join (select etc) alias_name on a_table.field =
alias_name.field
etc -
How to insert multiple rows in same table at once
hi ,
How can I insert more than one row in the same database table on single submit button.
(i am using the ADF , EJB and Toplink for this example.)
EMPLOYEEand DEPARTMENT tables will hold a common coloum deptno
The method I have tried is as follows.
I have created the UI that holds EMPLOYEE(DETAIL) details and a DEPARTMENT(MASTER) table and I have created two separate bean classes which hold the getters and setters for the corresponding tables.
I have created a method in Department bean which will be called when we add the employee details
public String addEmpdetails() {
this.employeedetailslist.add(empdetails);
return null;
where employeedetailslist is a Arraylist and I want to pass the reference of employeebean in the array list.
But this method will fail as I need to create the new employee bean object every time when ever I need to pass.
How can I store values of multiple rows in bean.
In the EJB session bean how can I commit multiple EMPLOYEE rows and DEPARTMENT values at once.The use of &variable in a script is actually syntax for a "substitution variable" in the SQL*Plus tool (other tools may also do the same), not an inherent part of SQL or PL/SQL itself.
Whenever SQL*Plus is given a script it parses through it and if it encounters one of these it prompts for a value. This value is then substituted into the script before the script actually get's sent to the SQL or PL/SQL engine (process) on the database server. Once the script has gone to the database server it executes there and the results are passed back for SQL*Plus to display. However, the SQL and PL/SQL processes on the database server have no way to interface to the client machine, so they themselves cannot prompt for input from the client and you can't expect to prompt inside a loop as you are doing.
What you need is a user interface on the client that can prompt repeatedly for values and then re-send the script, or call a procedure on the database each time. This can be done using shell scripts or dos batch files (depending on your client being unix/dos based) or using a front end application tool such as Java, .NET, Powerbuilder, PHP, Application Express (APEX) etc. -
How to select multiple row of table using check box?
hi,
i am having table on view having first field as checkbox. what i want, when i click on checkboxes in multiple rows, and i click on any button i need to use those content to next view...
my problem is if i select only one row , i can use onlead select property of table..but when i select multiple rows through check box how should i read contents of table....?
Plz solve it.
Thanks,
Saurin ShahHello Saurin,
You are right using LeadSelection you can select only 1 row at a time. You will have to make use of Selection for achieving this. First you will have to change the selection mode of the table to multiple & also change the selection property for the related context to 0..n . Please find a code extract which might help you. (However this facility is only available from SP 14.) The main part is using the set_selected method of if_wd_context_node.
data: node_zcourse_details type ref to if_wd_context_node,
node_course_assign type ref to if_wd_context_node,
elem_course_assign type ref to if_wd_context_element,
stru_course_assign type if_v_details=>element_course_assign ,
item_popin_selected like stru_course_assign-popin_selected.
" navigate from <CONTEXT> to <ZCOURSE_DETAILS> via lead selection
node_zcourse_details = wd_context->get_child_node( name = if_v_details=>wdctx_zcourse_details ).
" navigate from <ZCOURSE_DETAILS> to <COURSE_ASSIGN> via lead selection
node_course_assign = node_zcourse_details->get_child_node( name = if_v_details=>wdctx_course_assign ).
" @TODO handle not set lead selection
if ( node_course_assign is initial ).
exit.
endif.
data elem_set type wdr_context_element_set.
field-symbols <wa_elem> like line of elem_set.
elem_set = node_course_assign->get_elements( ).
loop at elem_set assigning <wa_elem>.
<wa_elem>->set_selected( TRUE OR FALSE ). " Supply either TRUE/FALSE in here
endloop. -
Deleting Multiple Rows From Multiple Tables As an APEX Process
Hi There,
I'm interesting in hearing best practice approaches for deleting multiple rows from multiple tables from a single button click in an APEX application. I'm using 3.0.1.008
On my APEX page I have a Select list displaying all the Payments made and a user can view individual payments by selecting a Payment from the Select List (individual items are displayed below using Text Field (Disabled, saves state) items with a source of Database Column).
A Payment is to be deleted by selecting a custom image (Delete Payments Button) displayed in a Vertical Images List on the same page. The Target is set as the same page and I gave the Request a name of DELETEPAY.
What I tried to implement was creating a Conditional Process On Submit - After Computations and Validations that has a source of a PL/SQL anonymous block as follows:
BEGIN
UPDATE tblDebitNotes d
SET d.Paid = 0
WHERE 1=1
AND d.DebitNoteID = :P7_DEBITNOTEID;
INSERT INTO tblDeletedPayments
( PaymentID,
DebitNoteID,
Amount,
Date_A,
SupplierRef,
Description
VALUES
( :P7_PAYMENTID,
:P7_DEBITNOTEID,
:P7_PAID,
SYSDATE,
:P7_SUPPLIERREF,
:P7_DESCRIPTION
DELETE FROM tblPayments
WHERE 1=1
AND PaymentID = :P7_PAYMENTID;
END;
The Condition Type used was Request = Expression 1 where Expression 1 had a value of DELETEPAY
However this process is not doing anything!! Any insights greatly appreciated.
Many thanks,
Gary....the "button" is using a page level Target,...
I'm not sure what that means. If the target is specified in the definition of a list item, then clicking on the image will simply redirect to that URL. You must cause the page to be submitted instead, perhaps by making the URL a reference to the javaScript doSubmit function that is part of the standard library shipped with Application Express. Take a look at a Standard Tab on a sample application and see how it submits the page using doSubmit() and emulate that.
Scott
Maybe you are looking for
-
Image files created by CS6 not viewable in iOS devices
Hello, This is kind of a strange one. I'll start off with what I am running: My computer - Late 2013 MacBook Pro (Retina) running Yosemite (10.10.1) My Photoshop - CS6 (13.0.6 x64) And now the issues: I am not able to view any emailed image files, on
-
Problems Viewing PDF documents
Hi, A colleague of mine travels quite frequently, and from time to time receives email from our office with PDF attachements. He reads his emails using Outlook Web, sometime when he opens a PDF the PDF will show instantly, other times the PDF cannot
-
Acrobat X crashes shortly after launch; Win7; Creative Cloud
I am on Windows 7 64bit with Creative Cloud (all updates applied) and whenever I try to open a PDF it opens for about 10 seconds, and then crashes. In fact, even if I just load Acrobat by itself (ie. not PDF opened), it still crashes shortly after. T
-
Missing nvidia force 8800 gs driver o the windows site
I have configured my iMac with Boot Camp. Have installed Windows. Missing the nvidia geforce 8800gs driver. The install disc # 1 won't run and none of the nvidia drivers work. The nvidia driver from their site does not work. Any suggestions.
-
Change the Default Authentication back to secLDAP after SAP kit 3.1 Install
My client would like to switch the default authentication back to secLDAP after the installation of the SAP kit. What steps do we need to take to make this happen on Unix/Weblogic 9.2? Typically it is a simple chane in the Web.xml, but we are having