Horizontal display of column values
HI All,
I got a requirement in that i need to display one column horizontally
Such as
abc abc1 abc2 abc3 abc4 --->Second column in my table
1
2
3
4--->First column in my table
Kindly help me with this.
Edited by: Basva on Feb 22, 2011 10:47 PM
Please consider the following when you post a question. This would help us help you better
1. New features keep coming in every oracle version so please provide Your Oracle DB Version to get the best possible answer.
You can use the following query and do a copy past of the output.
select * from v$version 2. This forum has a very good Search Feature. Please use that before posting your question. Because for most of the questions
that are asked the answer is already there.
3. We dont know your DB structure or How your Data is. So you need to let us know. The best way would be to give some sample data like this.
I have the following table called sales
with sales
as
select 1 sales_id, 1 prod_id, 1001 inv_num, 120 qty from dual
union all
select 2 sales_id, 1 prod_id, 1002 inv_num, 25 qty from dual
select *
from sales 4. Rather than telling what you want in words its more easier when you give your expected output.
For example in the above sales table, I want to know the total quantity and number of invoice for each product.
The output should look like this
Prod_id sum_qty count_inv
1 145 2 5. When ever you get an error message post the entire error message. With the Error Number, The message and the Line number.
6. Next thing is a very important thing to remember. Please post only well formatted code. Unformatted code is very hard to read.
Your code format gets lost when you post it in the Oracle Forum. So in order to preserve it you need to
use the {noformat}{noformat} tags.
The usage of the tag is like this.
<place your code here>\
7. If you are posting a *Performance Related Question*. Please read
{thread:id=501834} and {thread:id=863295}.
Following those guide will be very helpful.
8. Please keep in mind that this is a public forum. Here No question is URGENT.
So use of words like *URGENT* or *ASAP* (As Soon As Possible) are considered to be rude.
Similar Messages
-
Hello Everyone,
How to update zero to a column value when record does not exist in table but should display the column value when it exists in table
Regards
Regards Gautam SAs per my understanding...
You Would like to see this
Code:
SELECT COALESCE(Salary,0) from Employee;
Regards
Shivaprasad S
Please mark as answer if helpful
Shiv -
Infopath display lookup column value
Hi
I have a Infopath 2010 form with which displays an employee record. Some of the columns are lookup from a sharepoint list.
How can I display the value of the lookup column instead of Id in the form.
The form has the main connection and the secondary connection for the lookup sharepoint lists.
The sharepoint lookup column is set to "Title" in additional column settings. Add a column to show each of the additional fields are all unchecked.
I searched google, but couldnt find an answer.
I tried to do the way described in http://sharepointsolutions.com/sharepoint-help/blog/2011/11/get-infopath-to-display-lookup-column-value-not-id/
But get error , since it works for repeated table.
Any Ideas?
Thanks
VenkyHi Venky,
How did you create your look up column? Which column type is the column which your look up column looks for?
By my test, it is default behavior that the InfoPath form display the value of the lookup column.
Thanks,
Eric
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Eric Tao
TechNet Community Support -
Displaying the column values of a wizard-generated form
Hello,
I created a Master-Detail page following the examples in the various Apex guides. The form is not working correctly, unfortunately. When I click the Add Row button a row is added at the bottom of the table. Once I enter data into that row and click the Apply Changes button I get an SQL Insert error. I understand error message; a hidden column is not getting populated. Having said all that, that is not my problem.
My problem is understanding how APEX is storing the data it displays in the table so I can manipulate it to place a value into that hidden column.
I read many posts about how data is stored in the fxx arrays. I've looked at my source and have seen values like f02, f03, f03_0004 and so on. So, I tried creating a report to display the contents of APEX_APPLICATION.G_F03(1). I created another report on the same page with the following SQL statement:
SELECT 'Code: '||apex_application.g_f03(1) F1
FROM DUAL;
When I run the page, the second report shows this: ORA-06553: PLS-221: 'G_F03' is not a procedure or is undefined.
Someone (I think Denes) suggest creating a process with the following PL/SQL to help locate the correct array:
BEGIN
wwv_flow.debug('******************************');
wwv_flow.debug('*** STARTING MY DEBUG HERE ***');
wwv_flow.debug('1: ' || APEX_APPLICATION.G_F01(1));
wwv_flow.debug('2: ' || APEX_APPLICATION.G_F02(1));
wwv_flow.debug('3: ' || APEX_APPLICATION.G_F03(1));
wwv_flow.debug('4: ' || APEX_APPLICATION.G_F04(1));
wwv_flow.debug('5: ' || APEX_APPLICATION.G_F05(1));
wwv_flow.debug('*** ENDING MY DEBUG HERE ***');
wwv_flow.debug('******************************');
END;
With that process in place, whenever I run the page I get an error that says ORA-01403: no data found. When I comment out the five lines that reference APEX_APPLICATION.G_Fxx the page runs, but I cannot see the remaining debug comments UNLESS I place the process to run before or after the Footer.
I hope that all makes sense.
So, what am I doing wrong about displaying the contents of the array that is storing the table?
Respectfully,
LeonYou can't reference a package variable in a SQL statement like you do in:
SELECT 'Code: '||apex_application.g_f03(1) F1
FROM DUAL;
You can only reference it in a PL/SQL block (like you did in a Before/After Footer process). If you try to use the variables before they are instantiated you'll get the no-data-found error. -
Want to disable display of column values in Selection Panel (11g)
In 11g, double-clicking on a column from the selection panel (under the Subject Areas heading) adds that column to the analysis. It also "expands" that column so that the first 20 values of that column are visible in the selection panel, immediately under the column that was double-clicked.
I don't want to see those first 20 values of the column pop up every time I add a column to the analysis by double-clicking. And although dragging the column into the analysis does not cause the popup behavior, dragging is not my team's preferred method of adding the column.
Is there a way to disable that expansion when double-clicking to add a column to an analysis?
I suppose it also means that we would be searching for a way to turn off the little plus sign next to each column as well. I don't want to EVER see those values.I suppose you might want to know WHY I want this turned off.
One of my columns in the repository, Region, is defined as a concatenated text string that will be treated as HTML in Analytics. I see this when Region expands in the selection panel:
<span title="Central: Smith ">Central</span>
<span title="East: Jones ">East</span>
<span title="West: Graham ">West</span>When displayed on an analysis, I see Central, East, and West as the regions, as expected. The hover behavior for each region properly shows its title (Region+Manager) as well.
If the expanded display in the Selection Panel showed Central, East, and West, I wouldn't care. But because it shows the actual text for that column (the HTML string) it's rather confusing to the uninformed. Expanding it to include other tags would make the display almost useless unless you know some HTML. Even then, it's ugly.
Edited by: Mark T. on Mar 15, 2013 6:13 AM - didn't know I could use the tag -
Displaying Summary Column Values
I have just learned about summary columns in Developer 2000...But I can't complete the task...
I'd like to display the # of records for each value in the status column of my report. I have created the break group with Status column. Then I added a summary column choosing function: "count", source: Status, and reset at: g_status (at the group level).
What should I do next? I'd like to display counts of records (for each status value) in a separate field? How do I filter each status set? Do I need to create a separate summary column for each possible value of status?Hello,
Is this what you are trying to achieve?
rows:
record_id Status
========= ========
rec01 Active
rec02 Closed
rec03 Pending
rec04 Active
rec05 Closed
rec06 Pending
rec07 Active
rec08 Closed
rec09 Pending
rec10 Active
rec11 Closed
rec12 Pending
rec13 Closed
rec14 Pending
rec15 Closed
output:
Active 4
Closed 6
Peding 5If so, you will need two groups, one for the Status, and another for the records.
Then, create a summary column in the status group of function 'count' and the source = record_id, and reset at g_status.
Then, in your report layout, have a repeating frame with source = status group.
Inside that repeating frame create 2 text items, one for the status text and another for the status summary.
-Marilyn -
I want to display one column values with multiple symbols
i am created one report.
my column name is offshore & on shore i want display 3 values with % symbol, then i want show 4 th value as $ 2000,
but it was allowing only one format $ or % but i need to display symbols with my values.Try the following :
give a name to the following formula like @getvalue
Numbervar x;
if
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex)= 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Employee"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Contractor"), CurrentSummaryIndex) = 0 and
//(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Mgt consult"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Clerical"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Other"), CurrentSummaryIndex) = 0
then
x:=0
else
x:=(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex))
(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Employee"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Contractor"), CurrentSummaryIndex) +
//GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Mgt consult"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Clerical"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Other"), CurrentSummaryIndex)
) * 100
Now create a new formula and check the value of the above formula :
if {@getvalue} > 50 Then
"$"&{@getvalue}
else
{@getvalue}&"%"
Hope this will resove the issue.
Thanks,
Sastry -
Problem in displaying multiple column values using Narrative View
Hi All,
I have a requirement where in I need to display column 1 of an Answers report as a header and all values of column 2 below tht.
There are multiple values from column 2 for every value in column 1
Example:
Group:
Grp (This is column 1)
Activity:
Act1
Act2
Act3 (These are values from column 2)
I have used narrative view for this which looks like:
Group: @1
Activity:@2[br/]
But this displays the value of column1 along with every value of column 2. I want column 1 value to be displayed only once.
Thanks in advance
RadhikaHi see this link it may helpful
Re: Narrative view not showing up in the report
Re: how to transpose columns to rows in OBIEE
Regards
Naresh -
Spool ALV not displaying two column value
Hi,
In spool ALV is getting displayed. But the output is not printing the value of 2 columns , both are MATNR values. I checked the output table it is fetching the material number but ALV is not displaying it. please help its urgent. The GI material is not getting displayed.HI Aparjitha,
As per the above screenshot I assume there should be only 2 possible cases as said by Jyoti. Apart from that there is no other chance of missing data, especially for couple of columns in the output.
If you are passing the value at run-time to MATNR and you are able to see that in output, hence your final internal table which you are passing to the ALV is not filled appropriately with MATNR values. May be those values are cleared somewhere.
It would be better if you could share some piece of your subroutine FIELDCATFILL code. Also place a breakpoint before ALV display and check if the fieldcatalog and the final internal table are having the appropriate values.
Regards,
Naresh -
To display the column value though it is null
Hi all,
lineItems.ShipToCustomer.VName is having null in this case
When I execute this query I get zero records returned,the problem lies in lineItems.ShipToCustomer.VName :
select lineItems.ShipToCustomer.VName,C.VDealNumber CPRNumber, W.created SubmitDate, lineItems.VLineID LineItemNumber,lineItems.VProduct.Description Product from com.eastman.pricing.CprForm C,com.vendavo.platform.workflow.VWorkflow W where C.objectId=W.VWorkflowEntity.objectId and VID = 'CPR-013005'
When I execute after removing lineItems.ShipToCustomer.VName then the query returns one record:
select C.VDealNumber CPRNumber, W.created SubmitDate, lineItems.VLineID LineItemNumber,lineItems.VProduct.Description Product from com.eastman.pricing.CprForm C,com.vendavo.platform.workflow.VWorkflow W where C.objectId=W.VWorkflowEntity.objectId and VID = 'CPR-013005'
One more observation is when I include the column as lineItems.ShipToCustomer i.e after omitting only vname then I get one record returned.ShipToCustomer is a vector field.Anything to do with vector.
How do I get one row returned even though the lineItems.ShipToCustomer.VName is included in the query?
Thanks in advanceThis query is specific to the project i'm working it is called VQL which mostly follows the SQL standards that is why i'm not able to use nvl() which is not implemented in VQL....
The problem which i'm facing i have explained below:
lineItems.ShipToCustomer.VName is having null in this case
When I execute this query I get zero records returned,the problem lies in lineItems.ShipToCustomer.VName :
select lineItems.ShipToCustomer.VName,C.VDealNumber CPRNumber, W.created SubmitDate, lineItems.VLineID LineItemNumber,lineItems.VProduct.Description Product from com.eastman.pricing.CprForm C,com.vendavo.platform.workflow.VWorkflow W where C.objectId=W.VWorkflowEntity.objectId and VID = 'CPR-013005'
When I execute after removing lineItems.ShipToCustomer.VName then the query returns one record:
select C.VDealNumber CPRNumber, W.created SubmitDate, lineItems.VLineID LineItemNumber,lineItems.VProduct.Description Product from com.eastman.pricing.CprForm C,com.vendavo.platform.workflow.VWorkflow W where C.objectId=W.VWorkflowEntity.objectId and VID = 'CPR-013005'
One more observation is when I include the column as lineItems.ShipToCustomer i.e after omitting only vname then I get one record returned.ShipToCustomer is a vector field.Anything to do with vector.
How do I get one row returned even though the lineItems.ShipToCustomer.VName is included in the query? -
How to display a column value with in string?
Hai all,
Select name from TAB1;
output: JAGAN
RAMU
SIVA
Sanjay
So my requirement is to display these data in string(With in single Quotes) like below.
' JAGAN'
'RAMU'
' SIVA'
'Sanjay'
Let me know if it is possible.......
Thanks in Advance.....
Jagadekara ReddyLike this ,
SELECT ''''||ENAME||'''' FROM TAB1;
Cheers! -
How to display item when mouse moves over Column value??
Hi there
It would be helpful if you could resolve the following :
i) I need to display the column 'A' values of my report in a Text field when mouse moves over column B of my report.
ii) I can able to display the same column value when mouse moves over or onclick happens. but my requirement is something like i have to display the other column value when mouse moves over.
iii) Also i noticed that, i can able to display the item only on "Display only Item" and not on Text field.
Any pointers to display my column value in Text field when onclick happens on my report column?
iv) One more thing that i noticed, i can able to perform onclick or mouse over only on Editable column and not on
non editable columns.
Any pointers on how to achieve the same when mouse moves over Non editable column of report?
Reference: I have created a dummy application (refer the following link), where i can able to display column value Salary on display only item using mouse move Event.
My requirement: when i click column Ename , the text field should show salary.
http://apex.oracle.com/pls/otn/f?p=56045:1
User:guest
Pswd: apex_demo
Any pointers on this would be appreciated.
Thanks
VijayVijay,
If you use Jquery then this should do the trick.
$(document).ready(function() {
$(".t20Report t20Standard tr").hover(function() {
$("#P2_SALARY").attr("innerHTML",$(this).find("td:last input").attr("value"));
{code}
after looking at the source of your page it seems that your class for your report region is *class="t20Report t20Standard"* I am not 100% sure but you might have to correct that in the template. I am not sure how the selector will handle the space in the class name.
Hope this helps,
Tyson -
Hey,
I am trying to only display a column value one time for a record, not a static value. The value changes and there can be many values. I do not think grouping will work since the Date value is dynamic. I am using Oracle for Toad 10.5. There are 4 records with this test data.
select Date, Person, Language, Country
from TableA
TableA
Date Person Language Country
01/25/2013 James English
12/20/2012 James English
US
AFWould like to only display
Date Person Language Country
01/25/2013 James English
12/20/2012
US
AFThanks for reading this thread!
Edited by: Nikki on Jan 7, 2013 1:08 PMHi,
You can use the analytic ROW_NUMBER function to see if a given row is the 1st row in a group, and only display the person and language columns when it is:
WITH got_r_num AS
SELECT dt -- DATE is not a good column name
, person, language, country
, ROW_NUMBER () OVER ( PARTITION BY person
, language
ORDER BY dt
) AS r_num
FROM table_x
SELECT dt
, CASE WHEN r_num = 1 THEN person END) AS person
, CASE WHEN r_num = 1 THEN language END) AS language
, country
FROM got_r_num
ORDER BY person, language, dt -- If wanted
;Your front end may also have a way to hide those values when you want. The BREAK feature in SQL*Plus does this; I don't know if Toad has anything comparable.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) where the query above produces the wrong results, and also post the right results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ {message:id=9360002} -
Single query for displaying all but 1 column values for all tables
Hi,
All the tables have SYS_CREATION_DATE column.
But I dont want to display this column value
Can someone suggest some way in which i could achive this?
Oracle version:11gR1
OS:SunOS
Cheers,
Kunwar
Edited by: user9131570 on Jul 6, 2010 7:57 PMuser9131570 wrote:
@Tubby
I *want to display table-wise the values of all but 1(SYS_CREATION_DATE) columns in my database.*
I need this in order to compare it to another database for all these values .Let me make a wild guess at what you are getting at.
Given these two tables
create table emp
(empid number,
empname varchar2(15),
empaddr varchar2(15),
sys_creation_date date);
create table dept
(deptid number,
deptmgr varchar2(10),
sys_creation_date date);you want to somehow combine
select empid,
empname,
empaddr
from emp;with
select deptid,
deptmgr
from dept;into a single sql statement? -
FSG report not printing column values on same line but sequentially
FSG report problem:
We have defined 2 FSG reports 'Balance Sheet - Total' and 'Balance Sheet - Detail'. Both reports have 3 column values, namely the value in Euro (our Functional Currency), the value in MUR - Mauritian rupees (our reporting currency) and the rate of exchange.
The report 'Balance Sheet - Total' displays these values for assets e.g.:-
EURO MUR Rate of exchange
Non-current assets
1. Intangible assets ? ? ?
2. Other investments ? ? ?
(note: ? represents a certain value)
The report 'Balance Sheet - Detail' displays values as follows :-
Account EURO MUR Rate of exchange
1. Property & Equipment
A10101 Building Cost ? 0.00 0.0000
A20105 Motor Veh Accum Dep ? 0.00 0.0000
TOTAL ? 0.00 0.0000
A10101 Building Cost 0.00 ? n/m
A20105 Motor Veh Accum Dep 0.00 ? n/m
(note: ? represents a certain value)
What we don't understand s why the 'Balance Sheet - Detail' report repeats the display of column values in MUR FOLLOWING the display in EURO, instead of displaying column values for EURO and MUR on the same line, just like in the case for 'Balance Sheet - Total'.
Is there anything in the definition of column set, row set or report set should I change?
Can anybody help. Thanks.
nullThe problem is related to defining the column set properly. It is OK with the first report and needs modification for the second. Formatting is also important so that they appear in the same line(row). The columns need to be linked to the fileds and assignment to set of books is also important as mentioned by Rajsekhar
Maybe you are looking for
-
Help - have an iTunes account on iPad for well over a year. Just bought iPhone 5 and I cannot purchase apps using my account. I am asked to verify my credit card and details but then it rejects them. They are still fine on the iPad. Any ideas? I trie
-
How to include original message body in the reply to a workflow notificatio
Hi, I have a requirement from my clients. Standard Functionality: When a Manager clicks on the APPROVE (button / link) to approve a workflow notification from a mailing application, a (response) mail gets composed to the Workflow Mailbox with the NID
-
Hi, Iam using the above said parser to parse an XML & XSL File. My code looks like this... XMLParser xmlpar; While initialising the XMLParser ecode = xmlpar.xmlinit(); xmlinit() function is returning an error code saying 201 (XMLERR_BAD_ENCODING). I
-
Acrobat 9 slow to open pdf files through proxy
We are finding that it is very slow to open pdf files from various web sites though the BorderManager proxy with Acrobat Reader version 9. This is not the case with earlier versions of Acrobat Reader. We are using BorderManager 3.8 sp 5. Has anyone e
-
BC to XI migration solution methodology
Hi Experts, Can anyone provide me with a standard solution methodology for SAP BC to XI migration. Thanks & Regards, Amit