Multiple values on single page
Hi, I want to retrieve a report as below. To the left are labels and to the right are the values. City has 2 values.
Country USA
State OR
City Portland, Salem
However i get the above in 2 seperate pages as below
page 1
Country USA
State OR
City Portland
page 2
Country USA
State OR
City Salem
Is there a way i could get both cities seperated by a comma or on a seperate line but same page?
The database might not have cities for some states and countries, in that case i just need country and state populated. However i see that if city is empty it is returning nothing, ie even country and state are not returned?
Thanks
Edited by: san-user on Jul 26, 2011 12:01 AM
Hi
Create 3 groups like :
Group on Country
Group on State
Group on City
Now create a formula to display cities :
WhileprintingRecords;
Stringvar city:= " "; // place this formula in your city group header.
WhileprintingRecords;
Stringvar city;
city:=city{city databasefield}','; // place this formula in your detail where you see cities.
Create one more formula to display
WhileprintingRecords;
Stringvar city; // place this formula on your group footer
This will display all cities with coma separate.
Thanks,
Sastry
Similar Messages
-
Passing multiple values to another page via a sql report
Having trouble passing multiple values to another page via a popup SQL report
I have two fields one called "descr" and another called "Met"
when I use the code below all works fine and the value of "descr" is passed
Select '<a href="javascript:popUp2('''
|| 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
|| 'P950_TYPE:'
|| descr
|| ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%">'
|| descr
|| '</a>' "Note"
But when I want to pass another value, all goes bonkers and instead of the value of the field being passed the literal text is passed.
can someone look at my code below and see what may be wrong
Select '<a href="javascript:popUp2('''
|| 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
|| 'P950_TYPE,P950_CODE:'
|| descr, Met
|| ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%">'
|| descr
|| '</a>' "Note"
I appeciate your help looking into this
FYI (Here is the entire SQL for reference)
With t
as
(SELECT
CASE WHEN KEY = 2 then
CASE WHEN WCS_CPT > :P940_METRIC_1_WCS_CPT1 then
'<span style="color:Red; ">'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'</span>' else
'<span style="color:#399304; ">'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'</span>' end
else '<span style="color:#180c8b;">'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'</span>' end "WCSCPT",
CASE WHEN KEY = 2 then
CASE WHEN WCS_TOI_PER_FTE < :P940_METRIC_2_WCS_TOI_PER_FTE then
'<span style="color:Red; ">'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'</span>' else
'<span style="color:#399304; ">'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'</span>' end
else '<span style="color:#180c8b;">'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'</span>' end "WCSTOIPERFTE",
CASE WHEN KEY = 2 then
CASE WHEN WCS_SIO_PER_FTE < :P940_METRIC_3_WCS_SIO_PER_FTE then
'<span style="color:Red; ">'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'</span>' else
'<span style="color:#399304; ">'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'</span>' end
else '<span style="color:#180c8b;">'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'</span>' end "WCSSIOPERFTE",
CASE WHEN KEY = 2 then
CASE WHEN WCS_TC_PER_FTE < :P940_METRIC_4_WCS_TC_PER_FTE then
'<span style="color:Red; ">'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'</span>' else
'<span style="color:#399304; ">'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'</span>' end
else '<span style="color:#180c8b;">'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'</span>' end "WCSTCPERFTE",
CASE WHEN KEY = 2 then
CASE WHEN WCS_ADSL_PER_FTE < :P940_METRIC_5_WCS_DSL_PER_FTE then
'<span style="color:Red; ">'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'</span>' else
'<span style="color:#399304; ">'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'</span>' end
else '<span style="color:#180c8b;">'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'</span>' end "WCSADSLPERFTE",
CASE WHEN KEY = 2 THEN
TO_CHAR(MONTH,'MON-YY')
else
'METRICS'
end "MONTH"
FROM (
SELECT DISTINCT
ROW_NUMBER() OVER (ORDER BY KEY DESC) AS ROW_NUM, KEY, WCS_CPT, WCS_TOI_PER_FTE, WCS_SIO_PER_FTE, WCS_TC_PER_FTE, WCS_ADSL_PER_FTE, MONTH
from TW_M_KEYMETRICS
WHERE TO_DATE(UPPER(MONTH),'DD/MON/YY') >= TO_DATE(UPPER(:P940_START_OF_THIS_FIN_YEAR),'DD/MON/YY')
ORDER BY KEY ASC, ROW_NUM, MONTH)
WHERE ROW_NUM <= :P940_MONTHS_SINCE_FIN_START)
Select '<a href="javascript:popUp2('''
|| 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
|| 'P950_METRIC_TYPE,P950_METRIC_VALUE:descr,MET'
|| ''
|| ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%">'
|| descr
|| '</a>' "Note"
, max(Met) METRICS, max(Jul) Jul08, max(Aug) Aug08, max(Sep) Sep08, max(Oct) Oct08, max(Nov) Nov08, max(Dec)Dec08, max(Jan) Jan08, max(Feb) Feb08, max(Mar) Mar08, max(Apr) Apr08, max(May) May08, max(Jun) Jun08
from (
Select 'Cost Per Transaction' descr,
decode (MONTH, 'METRICS', WCSCPT) MET,
decode (MONTH, 'JUL-08', WCSCPT) Jul,
decode (MONTH, 'AUG-08', WCSCPT) Aug,
decode (MONTH, 'SEP-08', WCSCPT) Sep,
decode (MONTH, 'OCT-08', WCSCPT) Oct,
decode (MONTH, 'NOV-08', WCSCPT) Nov,
decode (MONTH, 'DEC-08', WCSCPT) Dec,
decode (MONTH, 'JAN-08', WCSCPT) Jan,
decode (MONTH, 'FEB-08', WCSCPT) Feb,
decode (MONTH, 'MAR-08', WCSCPT) Mar,
decode (MONTH, 'APR-08', WCSCPT) Apr,
decode (MONTH, 'MAY-08', WCSCPT) May,
decode (MONTH, 'JUN-08', WCSCPT) Jun
from t
union all
Select 'Total Orders Issued Per FTE' descr,
decode (MONTH, 'METRICS', WCSTOIPERFTE) MET,
decode (MONTH, 'JUL-08', WCSTOIPERFTE) Jul,
decode (MONTH, 'AUG-08', WCSTOIPERFTE) Aug,
decode (MONTH, 'SEP-08', WCSTOIPERFTE) Sep,
decode (MONTH, 'OCT-08', WCSTOIPERFTE) Oct,
decode (MONTH, 'NOV-08', WCSTOIPERFTE) Nov,
decode (MONTH, 'DEC-08', WCSTOIPERFTE) Dec,
decode (MONTH, 'JAN-08', WCSTOIPERFTE) Jan,
decode (MONTH, 'FEB-08', WCSTOIPERFTE) Feb,
decode (MONTH, 'MAR-08', WCSTOIPERFTE) Mar,
decode (MONTH, 'APR-08', WCSTOIPERFTE) Apr,
decode (MONTH, 'MAY-08', WCSTOIPERFTE) May,
decode (MONTH, 'JUN-08', WCSTOIPERFTE) Jun
from t
union all
Select 'SIOs Per Billing FTE' descr,
decode (MONTH, 'METRICS', WCSSIOPERFTE) MET,
decode (MONTH, 'JUL-08', WCSSIOPERFTE) Jul,
decode (MONTH, 'AUG-08', WCSSIOPERFTE) Aug,
decode (MONTH, 'SEP-08', WCSSIOPERFTE) Sep,
decode (MONTH, 'OCT-08', WCSSIOPERFTE) Oct,
decode (MONTH, 'NOV-08', WCSSIOPERFTE) Nov,
decode (MONTH, 'DEC-08', WCSSIOPERFTE) Dec,
decode (MONTH, 'JAN-08', WCSSIOPERFTE) Jan,
decode (MONTH, 'FEB-08', WCSSIOPERFTE) Feb,
decode (MONTH, 'MAR-08', WCSSIOPERFTE) Mar,
decode (MONTH, 'APR-08', WCSSIOPERFTE) Apr,
decode (MONTH, 'MAY-08', WCSSIOPERFTE) May,
decode (MONTH, 'JUN-08', WCSSIOPERFTE) Jun
from t
union all
Select 'Total Calls Answered per FTE' descr,
decode (MONTH, 'METRICS', WCSTCPERFTE) MET,
decode (MONTH, 'JUL-08', WCSTCPERFTE) Jul,
decode (MONTH, 'AUG-08', WCSTCPERFTE) Aug,
decode (MONTH, 'SEP-08', WCSTCPERFTE) Sep,
decode (MONTH, 'OCT-08', WCSTCPERFTE) Oct,
decode (MONTH, 'NOV-08', WCSTCPERFTE) Nov,
decode (MONTH, 'DEC-08', WCSTCPERFTE) Dec,
decode (MONTH, 'JAN-08', WCSTCPERFTE) Jan,
decode (MONTH, 'FEB-08', WCSTCPERFTE) Feb,
decode (MONTH, 'MAR-08', WCSTCPERFTE) Mar,
decode (MONTH, 'APR-08', WCSTCPERFTE) Apr,
decode (MONTH, 'MAY-08', WCSTCPERFTE) May,
decode (MONTH, 'JUN-08', WCSTCPERFTE) Jun
from t
union all
Select 'ADSL Orders per FTE' descr,
decode (MONTH, 'METRICS', WCSADSLPERFTE) MET,
decode (MONTH, 'JUL-08', WCSADSLPERFTE) Jul,
decode (MONTH, 'AUG-08', WCSADSLPERFTE) Aug,
decode (MONTH, 'SEP-08', WCSADSLPERFTE) Sep,
decode (MONTH, 'OCT-08', WCSADSLPERFTE) Oct,
decode (MONTH, 'NOV-08', WCSADSLPERFTE) Nov,
decode (MONTH, 'DEC-08', WCSADSLPERFTE) Dec,
decode (MONTH, 'JAN-08', WCSADSLPERFTE) Jan,
decode (MONTH, 'FEB-08', WCSADSLPERFTE) Feb,
decode (MONTH, 'MAR-08', WCSADSLPERFTE) Mar,
decode (MONTH, 'APR-08', WCSADSLPERFTE) Apr,
decode (MONTH, 'MAY-08', WCSADSLPERFTE) May,
decode (MONTH, 'JUN-08', WCSADSLPERFTE) Jun
from t
GROUP by descr
FrankBorg Species 5618 wrote:
Having trouble passing multiple values to another page via a popup SQL report
But when I want to pass another value, all goes bonkers and instead of the value of the field being passed the literal text is passed.
can someone look at my code below and see what may be wrong
Select '<a href="javascript:popUp2('''
|| 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
|| 'P950_TYPE,P950_CODE:'
|| descr, Met
|| ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%">'
|| descr
|| '</a>' "Note"
Hi Frank,
You should close this parameters with single quotation. Try this -
Select '<a href="javascript:popUp2('''
|| 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
|| 'P950_TYPE,P950_CODE:'
*|| 'descr, Met'*
|| ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%">'
|| descr
|| '</a>' "Note"
Hope this helps.
Regards,
M Tajuddin
http://tajuddin.whitepagesbd.com -
Pass multiple values as single input parameter into pipelined function
Hi all,
My need is to pass multiple values as single input parameter into pipelined function.
For example - "2" and "3" are values of input parameter "t":
with data as (
select 1 as t from dual union all
select 2 as t from dual union all
select 3 as t from dual union all
select 4 as t from dual union all
select 5 as t from dual
select * from data where t in (2,3)Is it possible at all?Not exactly sure, but usually 'multiple values'+'pipelined function' = some IN-LIST related approach?
See:
SQL> create table data as
2 select 1 as t from dual union all
3 select 2 as t from dual union all
4 select 3 as t from dual union all
5 select 4 as t from dual union all
6 select 5 as t from dual;
Table created.
SQL> --
SQL> CREATE OR REPLACE FUNCTION in_list (p_in_list IN VARCHAR2)
2 RETURN sys.odcivarchar2list PIPELINED
3 AS
4 l_text VARCHAR2(32767) := p_in_list || ',';
5 l_idx NUMBER;
6 BEGIN
7 LOOP
8 l_idx := INSTR(l_text, ',');
9 EXIT WHEN NVL(l_idx, 0) = 0;
10 PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
11 l_text := SUBSTR(l_text, l_idx + 1);
12 END LOOP;
13
14 RETURN;
15 END;
16 /
Function created.
SQL> --
SQL> select *
2 from data
3 where t in ( select *
4 from table(in_list('1,2'))
5 );
T
1
2
2 rows selected.http://www.oracle-base.com/articles/misc/dynamic-in-lists.php
or
http://tkyte.blogspot.nl/2006/06/varying-in-lists.html -
Is it possible to have multiple links in single page?
Is it possible to have multiple links in single page for
linking in different slides like in a websites? My deadline is
nearing in. Adobe folks please help me.> Is it possible to have multiple links in single page for
linking in
> different slides like in a websites? My deadline is
nearing in. Adobe
> folks please help me.
>
Add multiple click boxes to the page.
Steve
Adobe Community Expert: eLearning, Mobile and Devices
European eLearning Summit - EeLS
Adobe-sponsored eLearning conference.
http://www.elearningsummit.eu -
Hi
I have SPGridView control (fetching value from DB) with a column which is having multiple values
in single row seperated by ";", whenever filter applied it show these values in single row but i want
to dispaly these values separately in diff. rows when column filter is applied.
I have exactly same req. as mentioned in http://sadomovalex.blogspot.in/2011/03/spgridview-with-filtering-by-multiple.html
but this solution didn't work for me.
Please help/suggest.Hi Erland,
Thank you very much for the answer. Sorry I had to be more accurate on my XML : This XML is in a SQL Server Table column. This table also has an id column. It will be great if you can answer specifically to this.
<RootNode>
<Node1>
<Line_id_Node>1 </Line_id_Node>
<A>
<B>
<D>Val1 </D>
</B>
<B>
<D>Val2 </D>
</B>
<B>
<D>Val3 </D>
</B>
</A>
</Node1>
<Node1>
<Line_id_Node> 2 </Line_id_Node>
<A>
<B>
<D>Val4 </D>
</B>
<B>
<D>Val2 </D>
</B>
</A>
</Node1>
<Node1>
<Line_id_Node> 3 </Line_id_Node>
<A>
<B>
<D>Val5 </D>
</B>
</A>
</Node1>
</RootNode>
Expected O/P:
Line_id_Node Column_D
1 1
val1, val2, val3
2 2
val4, val2
3 3
val5
Nichesl -
Multiple values for single field
hi
In order to upload Purchase order details, how you handle multiple values for a single field?
Eg: Item field may contain no. of values for a recordHi,
It is generally taken care using BDC's by Table Control, and if you are using BAPI's then there are tables for ITEMS.
Regards,
Atish -
Duplex printing of multiple copies of single page
I really like that the settings for printing are retained so you can leave it set to duplex rather than having to select it each time. Although I do get caught with not resetting the number of copies on occasion. I do a lot of printing and like to conserve paper.
The problem is when duplex is set and I print multiple copies of a single page, it prints on both sides of the paper. When printing two copies I get one page printed on two sides instead of two pages printed on one side.
I know the easy answer is reset the duplex setting. But it should print correctly regardless. Has anyone had this problem and found how to deal with it other than resetting duplex?If these settings are in the printer driver (which they most likely are) then you'd have to contact the driver manufacturer. Perhaps there are multiple "double-sided" settings. For instance, if there is "duplex" as one option and "two-sided" as another option in the driver, then perhaps one indicates all copies will be printed double-sided even on the same page (as you're experiencing), whereas the other would print multiple two-sided copies. This, however, is very driver-dependent behavior. I'd recommend checking to see if there's an update available for your printer driver that might either clear the problem or provide a clearer option setting for the print jobs.
-
Pass Multiple values of single field to ITS url
Hi ,
I have one transaction code(YW37P),
I that have one field(Order No) in the selection screen, which has capable to accept multiple values (i.e multiple single values) and excute the t code.
Now my question is how to pass this multiple values of one single field to the ITS url and by pass the selection screen.
I have gone through the blogs which explains about how to pass only one single value of single field to ITS url and by pass the selection screen
please provide some solution for this
Regards
SrinivasHello Srinivas,
How do you enter multiple order numbers in the field usually? Is there a space or comma separating the numbers? If so you will probably need to encode the space or comma, ie if a comma %2C. The easiest way to figure it out is to use a tool like HTTPwatch and capture the POST data to see the value that is normally sent by the transaction.
Edgar -
In editing a simple, new Excel 2013 file, I am seeing certain cells with multiple, overlapping values in the a single cell. This is in the A-column so, not a matter of margins. Specificially, in one cell, I had "Design", then replaced
that text with "Reqt". Now I see the word "Reqt" written over "Design". when trying to delete the values, I can remove the "Reqt" value, but the "Design" value will not disappear/delete.
I've tried saving and reopenning the file with no effect; problem persists. Makes me think this is a corrupted .xlsx file, even though I just started from scratch 15 minutes before the problem arose.
I appreciate any guidance (or bug submission) you can support.
V/R,
KevinI have successfully inserted seven records in one form submit operation by looping through the command object execute method.
However, the data that is being inserted by the command object is repetition of the first record and the command object is not taking any data from the text boxes for the second record onwards. In this I had used the isert record behavious generated by DW CS4 and modified it to suit my requirement. However, the data inserted in the first row is getting repeated in all the seven rows.
Please help.
Also advise if there are any free dreamweaver server side validation extensions available. -
Passing multiple values to another page
I am somewhat new to Coldfusion 9 in a IIS platform through Dreamweaver CS4 and could use some direction. I am working on a form where someone has submited a request for approval. The user has requested a bulk approval button for all users that fall under certain filter conditions to do a mass approve ( setting the value to 1). I have not been able to either pass the values to the current approval method or approve them on the existing page. Below is the coding for the page as I have it.
After the filter has applied I need to get the values of the #qRecords.VR_Machine_Participant_Activity_Login_ID# and have them all approve as apposed to doing them individually which they are doing now. I have looked at several methods, but they are not meeting my needs. Some information cut for space but left the form action.
<form name="form1" method="post">
<table width="996" border="1">
<tr class="ReportColumnHeadingSmall">
<td width="150">Approval Needed</td>
<td width="100">Approved</td>
<td width="180">Business Unit</td>
</tr>
<tr class="data0Small">
<td>
<select name="cboApprovalRequired" class="smallFont">
<!---<option value="All">All</option>--->
<option value="1"
<cfif isDefined("vApprovalRequired")>
<cfif vApprovalRequired eq 1>
selected
</cfif>
</cfif>
>True</option>
<option value="0"
<cfif isDefined("vApprovalRequired")>
<cfif vApprovalRequired eq 0>
selected
</cfif>
</cfif>
>False</option>
</select>
</td>
<td>
<select name="cboApproved" class="smallFont">
<!---<option value="All">All</option>--->
<option value="1"
<cfif isDefined("vApproved")>
<cfif vApproved eq 1>
selected
</cfif>
</cfif>
>True</option>
<option value="0"
<cfif isDefined("vApproved")>
<cfif vApproved eq 0>
selected
</cfif>
</cfif>
>False</option>
</select>
</td>
<!--- Drop down showing the current available units to choose from --->
<td>
<select name="cbo_BusUnit" id="cbo_BusUnit">
<cfoutput query="qBusUnit">
<option value="#qBusUnit.BusinessUnit#"
<cfif (isDefined("vBusUnit") AND vBusUnit is qBusUnit.BusinessUnit)>selected </cfif>>#qBusUnit.BusinessUnit#</option>
</cfoutput>
</select>
</td>
<!--- This is where I'd like to mark the items for approval. --->
<td><input type="submit" name="Submit" value="Apply Filter">
</td>
<td width="450" align="right">
This will approve all records displayed on the current page.
<input name="bVr_id" type="button" value="Approve">
<cfoutput query="qRecords"><a href= "vr_participantactivityapproval.cfm?participant=#qRecords.VR_Machine_Participant_Activity _Login_ID#">
<img src="../Images/switch_user.gif" alt="Approve" width="16" height="16" border="0"></a>
</cfoutput>
</td>
</tr>
<tr class="ReportColumnHeadingSmall">
<td colspan="3" height="20"></td>
</tr>
</table>
<table width="996" border="1">
<tr class="ReportColumnHeadingSmall">
<td></td>
<td>Machine or<br>Activity Type</td>
<td>Activity</td>
<td>Comments</td>
<td>Oper.<br>ID</td>
<td>Name</td>
<td>Approved</td>
<td>Login Status</td>
<td>Login Date Time</td>
<td>Minutes</td>
</tr>
<cfoutput query="qRecords">
<tr class="data#Int(qRecords.CurrentRow MOD 2)#Small">
<td>
<!--- Current method of approving them individually. --->
<a href="vr_participantactivityapproval.cfm?participant=#qRecords.VR_Machine_Participant_Act ivity_Login_ID#"><img src="../Images/switch_user.gif" alt="Approve" width="16" height="16" border="0"></a>
</td>
<td class="SmallFont">#qRecords.ActivityType#</td>
<td class="SmallFont">#qRecords.Activity#</td>
<td class="SmallFont">#qRecords.Value_Nvarchar#</td>
<td class="SmallFont">#qRecords.VR_Department_Number#</td>
<td class="SmallFont">#qRecords.FullName#</td>
<td class="SmallFont"><cfif #qRecords.Approved# IS 0>False<cfelse>True</cfif></td>
<td class="SmallFont">#qRecords.Login_Status#</td>
<td class="SmallFont">#DateFormat(qRecords.Login_Date, 'ddd mm/dd/yyyy')# #TimeFormat(qRecords.Login_Date, 'H:mm')#</td>
<td class="SmallFont">#qRecords.TotalTime#</td>
</tr>
</cfoutput>
</table>
</form>I suggest displaying all the potential approvees as checked checkboxes. The user can then uncheck as many as he wants.
-
SQL Join help for multiple values in single field.
Hello All,
I need a help, I have two tables T1 and T2
Content of T2 will be like
T2. ID | T2.USERNAME
ID1 | John
ID2 | Peter
ID3 | Mark
Content of T1 is like
T1.ID
ID1 ID2 ID3
ID2
ID1 ID3
I need to join these two tables and replace the T1.ID values with T2.USERNAME, for eg. Row one of T1 should be changed as John Peter Mark.
Note: ID1 ID2 ID3 is a single value.
Thanks for your help.
Sathish.At Volder: I have made a slight enhancement. It's the same thing but the other way around as last week's regular expression thread. Remember the "and then the bird flew away"? ;-)
SQL> create table t1
2 as
3 select 'ID1 ID2 ID3' id from dual union all
4 select 'ID2' from dual union all
5 select 'ID1 ID3' from dual union all
6 select 'ID11 ID2' from dual
7 /
Tabel is aangemaakt.
SQL> create table t2
2 as
3 select 'ID1' id, 'John' username from dual union all
4 select 'ID2', 'Peter' from dual union all
5 select 'ID3', 'Mark' from dual union all
6 select 'ID11', 'Volder' from dual
7 /
Tabel is aangemaakt.
SQL> select * from t1
2 model
3 reference r on (select t2.*, rownum rn from t2)
4 dimension by (rn)
5 measures(id, username)
6 main m
7 dimension by (id)
8 measures(cast(id as varchar(200)) str)
9 rules iterate(100) until (r.id[iteration_number+1] is null)
10 (str[any] = replace(str[CV()], r.id[iteration_number+1],r.username[iteration_number+1]))
11 /
ID STR
ID1 ID2 ID3 John Peter Mark
ID2 Peter
ID1 ID3 John Mark
ID11 ID2 John1 Peter
4 rijen zijn geselecteerd.
SQL> select id
2 , str
3 from t1
4 model
5 reference r on (select id,username,rownum rn from t2)
6 dimension by (rn)
7 measures (id, username)
8 main m
9 dimension by (id)
10 measures (cast(' ' || id || ' ' as varchar2(200)) str)
11 rules iterate(1000) until (r.id[iteration_number+1] is null)
12 ( str[any] = replace
13 ( str[cv()]
14 , ' ' || r.id[iteration_number+1] || ' '
15 , ' ' || r.username[iteration_number+1] || ' '
16 )
17 )
18 /
ID STR
ID1 ID2 ID3 John Peter Mark
ID2 Peter
ID1 ID3 John Mark
ID11 ID2 Volder Peter
4 rijen zijn geselecteerd.At Sathish: just look at the queries we have to come up with to do such a simple thing. As said many times before, I would also encourage you to change the design instead of executing the queries presented by Volder and me.
Regards,
Rob.
Message was edited by:
Rob van Wijk
Just noticed I missed a final TRIM function around "str", so please add this. -
Printing multiple images on single page
Can anyone explain how to print multiple images on the same page such as 4-4x6 photos? Or the same image more than once on a page - similar to the N-up option in iPhoto? Anything new and helpfull for printing in 1.5? Thanks.
No, it isn't what we're looking for.
Let's take the example of a professional portrait photographer (me? ) trying to set up a home-lab with a wide format, roll printer.
I get an order for, say, 2 4x5 of image 1, 2 4x5 of image 2, 4 5x7 of image 3. I have 10" paper loaded in my roll.
What I would want to do is gang the prints onto 3 "units" - the 4 4x5 on one 8"x10" unit, and 2 5x7 on each 7"x10" unit.
Since my clients ordered specific sizes, I need to make sure I get the prints sized exactly right (contact sheet tool doesn't let me do this) and since printing is pricey, I want to make sure to waste as little paper/ink as possible. I also don't want to get stuck doing a lot of trimming.
So, in lightroom, photoshop, imagebuddy, portraits-n-prints etc, I would just ask the app to output the package for me. In Aperture, I'm stuck. I can't use the book tool because it uses a (moronically) fixed page-size. I can't use the contact sheet tool because it doesn't let me specify image size/aspect ratio. I can't use the "standard" print tool because it only prints one image per page.
This is a glaring omission, and a slap in the face to the professionals that Aperture claims to see as its target audience. -
How to work on multiple values in single parameter
Hi Guys,
I want to insert emp record upon selection (more than one value from UI) of applications list for a given empid.
like below:
empid app_id
123 1
123 2
both are in parameters and records need to insert for given empid =123
can any one help on this.
Thanks in advance!
Rgds,
LrkThanks for your response.
Actually from UI when I enter empid = 123 then all list of unchecked app_ids will display. when I check two or more than two checkboxes for app_id, it need to insert respective records associated with empid.
my proc like below:
procedure insert_appid
p_empid in varchar2,
p_appid varchar2
is
cursor c1 is
select emp_id,app_id from emp_tab where emp_id = p_empid;
begin
for i in c1 loop
if i.emp_id = p_empid then
update app_ids for given emp_id.
else
insert into
emp_tab
emp_id,
app_id
values
i.emp_id,
i.app_id
end if;
end loop;
end insert_appid;
will it works your query..or can u suggest me for my proc...how to handle if i check more than one checkbox from UI which is passing through p_appid parameter.? -
Multiple values for single inboud param for a simple proc ?
In Oracle 8.17 I have a package/stored procedure with simple date range parameters and a 3rd param event name
+++++++++
PACKAGE rpt_NB_MOP_By_Event_PKG AS
TYPE rc_MOPRec IS RECORD (
o_EVENT VARCHAR2 (255),
o_PAYMENTDATE DATE,
o_DESCRIPTION VARCHAR2 (255),
o_PAYMENTAMOUNT number (19,4)
TYPE rc_MOP IS REF CURSOR RETURN rc_MOPRec;
END; -- Package Specification RPT_NB_MOP_BY_EVENT_PKG
++++++++++++
However the Front End is a Dot net web site which will allow the user to choose multiple events by holding down the control key.
So we have dates to and from and now more than one Event,
If the web service delivers the Event param as an "IN(a,b,c) statement will that work or do I have to treat it as an array?
Thanks BeforeHand
AJObject types work great for dynamic IN lists like this:
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:110612348061 -
Multiple values into single column
Hi ,
Im having the query like as below
with t as ( select 'Approved' as "Code" from dual union all
select 'Historically Relevant' from dual union all
select 'In Progress' from dual union all
select 'Internal Review' from dual )
select "Code" from t where "Code" in ('Approved,Historically Relevent')
in this i need the output like below . ie, what are the things i have selected in where clause based on that the output need to come
'Approved,Historically Relevent'
Thanks in Advance ...Always remember to post your database version as it can make a difference to the answer.
In 10g you would use sys_connect_by_path to aggregate strings together...
SQL> ed
Wrote file afiedt.buf
1 with t as (select 'Approved' as code from dual union all
2 select 'Historically Relevant' from dual union all
3 select 'In Progress' from dual union all
4 select 'Internal Review' from dual )
5 --
6 -- end of test data
7 --
8 select ltrim(sys_connect_by_path(code,','),',') as codes
9 from (
10 select code, rownum r
11 from t
12 where code in ('Approved','Historically Relevant')
13 )
14 where connect_by_isleaf = 1
15 connect by r = prior r + 1
16* start with r = 1
SQL> /
CODES
Approved,Historically Relevant
In 11gR2 onwards you can use the new LISTAGG function
SQL> ed
Wrote file afiedt.buf
1 with t as (select 'Approved' as code from dual union all
2 select 'Historically Relevant' from dual union all
3 select 'In Progress' from dual union all
4 select 'Internal Review' from dual )
5 --
6 -- end of test data
7 --
8 select listagg(code,',') within group (order by rownum) as codes
9 from t
10* where code in ('Approved','Historically Relevant')
SQL> /
CODES
Approved,Historically Relevant
Maybe you are looking for
-
IPod nano Shuts Down my Windows 7 in the middle of syncing
What the heck... I received this iPod Nano as a gift, moved all of my items into iTunes, only to have it repeatedly shut down my PC mid-sync. I've seen this issue in threads dating back to 2010, but I haven't been able to find any posting that actua
-
I loaded files on the cRIO but used upper case letters for the startup directory. Now I cannot access the RIO since it didn't boot. The proxy server comes up read-only so I can't reload the files or change the directory. I tried the RS232 port but
-
I just purchased and installed Adobe Photoshop Lightroom. The first thing I want to do is get rid of the Adobe Photo Downloader that has appeared in my system tray. How do I get rid of this thing? No amount of twiddling with the settings in Lightroom
-
I have compiz set to start in my .xinitrc When I start it I have a mouse cursor I can move around, and that's it. I can't find any way to start programs or do anything.... I get that I have done something wrong....but what? I can't find any documenta
-
How to Create a connection and User Seesion and Authentificate Session
Hi I would like that someone provide my the code to set a connection with MDM through the MDM Java APIS SP6 Patch2. I need to connect with the repository, and authentificate the User and the Password. Furthermore I would need the code to pick up