Excluding a column causes non-repeating values in 2nd table view
I have an analysis (11.1.1.5) that has these columns: Month, Country, State, City, Sales, Country Sales, Share of Country. Country Sales is a level-based measure that returns sales at the Country level. Country, State, and City are a hierarchy as you might expect.
When I display the initial Table view for this analysis, the Country Sales column shows a value on every row.
When I create a 2nd Table view and exclude the City column from that view, the Country Sales column now only shows a value for the first State within each Country. In other words, each value of Country Sales is shown only once, and is NOT repeated on each subsequent row for that country.
Any ideas if this is a bug, or if it was intentionally designed this way for some reason? Is there a way to force the values to repeat? (Green Bar / Repeat doesn't do it.)
Thank you for the responses, guys. Still no luck.
I moved the Country Sales column as Deepak suggested, both in the criteria and in the view. That didn't change the results. I also started fresh with a new analysis, and placed the columns in the suggested positions from the start. Still no change.
New information: I tried excluding State and leaving City in the table view. Got the same goofy results - Country Sales did not repeat.
More new information: I added a Brand Revenue measure to the Sample Sales subject area. Brand Revenue is defined as '1 - Revenue' at the Product Brand level. Created a similar view, and it worked fine.
I'll investigate what the differences might be between Sample Sales and my repository. Hard to imagine what it might be. My repository is very simple and straightforward.
Similar Messages
-
Display of missing values in a table view.
Hi everyone,
I have a table view with 7 columns and 10 rows which displays only those values which are missing in the DataBase Table.
Is it possible to show only the missing values as '-' in a table view, the table view is having 7 different fields.
Also when the value is inserted at run time the corresponding field should be updated accordingly and the value will no longer be displayed in the table view as '-'
please advice.
Regards
Neo.Welcome to SDN.
do you mean to say that in some rows some column values will be blank and you want to replace the blanks with '-'.
loop thru the itab which you are passing to tableview and for the blank cells pass '-'.
<i>Also when the value is inserted at run time</i>
so you are having editable tableview. to update the value back to the dbtable, you have to read it in oninputprocessing and update it to dbtable .
search the forum on how to read the user entered value from the table view so that you can update the dbtable.
Regards
Raja -
Populating values on a table view
Hi,
Following is the xml webservice response:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:getAvailableResourcesResponse xmlns:ns="http://webservices.iphoneapps.com" xmlns:ax21="http://vo.iphoneapps.com/xsd">
<ns:return>JOHN</ns:return>
<ns:return>KATE</ns:return>
<ns:return>JOLIE</ns:return>
<ns:return>DOLSON</ns:return>
</ns:getAvailableResourcesResponse>
</soapenv:Body>
</soapenv:Envelope>
From the above xml I am trying to parse <ns:return>tags i am getting the output values as "JOHNKATEJOLIEDOLSON" but the I am unable to seperate those values and populate those values in the table view, one after the other.
Following is the code that i used for parsing:
-(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *) namespaceURI qualifiedName:(NSString *)qName
attributes: (NSDictionary *)attributeDict
if([ elementName isEqualToString:@"ns:return" ])
NSLog(@"ns:return");
if (!soapResults)
soapResults=[[NSMutableString alloc]init];
NSLog(@"%d", soapResults);
elementFound=YES;
-(void)parser:(NSXMLParser *) parser foundCharacters:(NSString *)string
if (elementFound)
//[arrayResources addObject:string];
[soapResults appendString: string];
NSLog(@"%@", soapResults);
[self release];
-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
if( [ elementName isEqualToString:@"ns:return" ])
elementFound=FALSE;
Can anyone please suggest me how to parse the xml statement and populate the values in the table view with sample example.
Regards
SRI.
Message was edited by: ksriOnly you can solve the issue by learning about namespaces. You are comparing element names against fully-qualified names. Then you are logging what you think you have received. Change your NSLog statements to log what is really being parsed instead of a literal. That should prove enlightening.
-
Fetching Non Qualifier value frm main table
Hi All,
I have a requirement where I need to get 3 Non-Qualifier value present in the Main table .
These 3 Non-Qualifier values are present in 1 Qualified Table.
Kindly send me some sample code for this scenario
awaiting for your reply
RegardsHi Sudheendra,
Get the record result set by serching one particular column(other than field of type qualified) of the main table.
then follow the steps.
QualifiedLookupValue LVAL =(QualifiedLookupValue) temprs.getRecords()[0].getFieldValue(repoSchemacmd.getRepositorySchema().getTableSchema("mainTableName").getField("MaintableFieldName").getId());
QualifiedLinkValue[] qlinks = LVAL.getQualifiedLinks();
for (int k = 0; k < qlinks.length; k++) {
//check whether qualifiercolumn is Display field or not.
if(displayField){
RecordId RID[] = new RecordId[1];
RID[0] = qlinks[k].getLookupId();
ResultDefinition rd =new ResultDefinition(repoSchema.getTable("qualifertableName").getId());
rd.setSelectFields(repoSchemacmd.getRepositorySchema().getTableSchema("qualifertableName").getDisplayFieldIds());
RetrieveRecordsByIdCommand retrievedRecords =new RetrieveRecordsByIdCommand(conAccessor);
retrievedRecords.setSession(userSessionID);
retrievedRecords.setIds(RID);
retrievedRecords.setResultDefinition(rd);
try {
retrievedRecords.execute();
} catch (CommandException e) {
Record[] rec = retrievedRecords.getRecords().getRecords();
for (int m = 0; m < rec.length; m++) {
//if the field value is String.
String Value = qlinks[k].getQualifierValue(repoSchemacmd.getRepositorySchema().getFieldId(tableName,column)).toString();
else{
//if columt type in qualifier table is StringValue.
String value1 =qlinks[k].getQualifierValue(repoSchemacmd.getRepositorySchema().getFieldId("qualifertableName","qualifiercolumn")).toString();
Regards,
Sandeep. -
At max how many columns is advisable to create in a table/view
Hi All,
I have two transaction table from which i want to create a simple view or materialized view. But the number of columns is about 200. So i want to know at max how many columns is advisable from the performance point of view.
Even though i will create 200 columns in a view , for a perticular client installation i may not use all the columns.
one more thing i will never use 200 columns in the select statement . At a time i will use only 4/5 columns.
It may happen from this four column one column will be the 1st and 2nd column will be the 200th one.
I want to know how it affects the performance and in which scenario . Please help if any body knows or already faced this kind of scenario.
I am using oracle 10g .Annapurna Nayak wrote:
thanks for ur reply .
We are going to use this view in a report , so if i will create it as simple view it will affect report performance. because the view script is too long ...so every time quring to a view will decrease the performance.
Are you asking me if it will? I think it probably won't but of course you have the means to test it to be sure, right?
As u said MV should be done with minimum possible column . what can be the maximum column in MV ..??It would be defined by the limits on:
* The maximum number of columns that a table can contain
* The size of the query needed to define the select statement
* Limitations on queries needed to maintain the data
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/limits003.htm#i288032 -
919: Column count replaces query count when opening table/view/etc tab
I don't know whether this is intentional or not, but I have just noticed that opening a table or view tab from the connection pane replaces the existing query count message with the query count from the column query. For example, opening a table tab for a table with 14 columns sets the query count message to "All Rows Fetched: 14".
This is not a big issue, but adds to the aggravation of only having the latest query count message, rather than one for each SQL Worksheet.
Is it possible to find somewhere on the SQL Worksheet that we can put it's query count message (for example to the right of the execution time)?I am happy for querying the columns of a table/view/etc to display the fetch count of the columns, although I am rarely interested in how many columns there are in a table/view/etc.
However, I already find it frustrating that the query count is only for the last fetch - it can be very useful having the query count for last fetch per SQL Worksheet. Having the last fetch overwritten by opening a table tab only makes it more frustrating. -
SQL to sum a column while avoiding repeating values
Dear All
i have this table called Loans_installments that contains the client's loan installments.
a sample of data:
branch currency client_id loan_no inst_mat_date inst_seq original_inst_amt int_amt
110 2 222 100 1/1/2013 1 0 50
110 2 222 100 1/2/2013 2 0 52
110 2 222 100 1/3/2013 3 0 54
110 2 222 100 1/4/2013 4 500 90
110 2 222 100 1/5/2013 5 0 50
110 2 222 100 1/6/2013 6 0 51
110 2 222 100 1/7/2013 7 0 50
110 2 222 100 1/8/2013 8 600 105
110 2 222 100 1/9/2013 9 0 50
110 2 222 100 1/10/2013 10 0 54
110 2 222 100 1/11/2013 11 0 50
110 2 222 100 1/12/2013 12 700 120
now what i want to sum the field int_amt based on original_inst_amt value (0 or has a value) and put the result on the int_amt that has an orig_inst_amt value <>0.
the result should be like this:
branch currency client_id loan_no inst_mat_date inst_seq original_inst_amt int_amt
110 2 222 100 1/1/2013 1 0 0
110 2 222 100 1/2/2013 2 0 0
110 2 222 100 1/3/2013 3 0 0
110 2 222 100 1/4/2013 4 500 246
110 2 222 100 1/5/2013 5 0 0
110 2 222 100 1/6/2013 6 0 0
110 2 222 100 1/7/2013 7 0 0
110 2 222 100 1/8/2013 8 600 256
110 2 222 100 1/9/2013 9 0 0
110 2 222 100 1/10/2013 10 0 0
110 2 222 100 1/11/2013 11 0 0
110 2 222 100 1/12/2013 12 700 274
any help plz.Using model clause
SQL> with t
2 as
3 (
4 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/1/2013','mm/dd/yyyy') inst_mat_date, 1 inst_seq, 0 original_inst_amt, 50 int_amt from dual
5 union all
6 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/2/2013','mm/dd/yyyy') inst_mat_date, 2 inst_seq, 0 original_inst_amt, 52 int_amt from dual
7 union all
8 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/3/2013','mm/dd/yyyy') inst_mat_date, 3 inst_seq, 0 original_inst_amt, 54 int_amt from dual
9 union all
10 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/4/2013','mm/dd/yyyy') inst_mat_date, 4 inst_seq, 500 original_inst_amt, 90 int_amt from dual
11 union all
12 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/5/2013','mm/dd/yyyy') inst_mat_date, 5 inst_seq, 0 original_inst_amt, 50 int_amt from dual
13 union all
14 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/6/2013','mm/dd/yyyy') inst_mat_date, 6 inst_seq, 0 original_inst_amt, 51 int_amt from dual
15 union all
16 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/7/2013','mm/dd/yyyy') inst_mat_date, 7 inst_seq, 0 original_inst_amt, 50 int_amt from dual
17 union all
18 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/8/2013','mm/dd/yyyy') inst_mat_date, 8 inst_seq, 600 original_inst_amt, 105 int_amt from dual
19 union all
20 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/9/2013','mm/dd/yyyy') inst_mat_date, 9 inst_seq, 0 original_inst_amt, 50 int_amt from dual
21 union all
22 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/10/201','mm/dd/yyyy') inst_mat_date, 10 inst_seq, 0 original_inst_amt, 54 int_amt from dual
23 union all
24 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/11/201','mm/dd/yyyy') inst_mat_date, 11 inst_seq, 0 original_inst_amt, 50 int_amt from dual
25 union all
26 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/12/201','mm/dd/yyyy') inst_mat_date, 12 inst_seq, 700 original_inst_amt, 120 int_amt from dual
27 )
28 select branch
29 , currency
30 , client_id
31 , loan_no
32 , inst_mat_date
33 , inst_seq
34 , original_inst_amt
35 , decode(original_inst_amt, 0, 0, sum(int_amt) over(partition by cnt)) int_amt
36 from (
37 select branch
38 , currency
39 , client_id
40 , loan_no
41 , inst_mat_date
42 , inst_seq
43 , original_inst_amt
44 , int_amt
45 , cnt
46 from t
47 model
48 dimension by
49 (
50 inst_seq
51 )
52 measures
53 (
54 branch, currency, client_id, loan_no, inst_mat_date, original_inst_amt, int_amt, 1 cnt
55 )
56 rules
57 (
58 cnt[any] = case
59 when original_inst_amt[cv()-1] > 0 then
60 cnt[cv()-1] + 1
61 else
62 nvl(cnt[cv()-1], cnt[cv()])
63 end
64 )
65 )
66 /
BRANCH CURRENCY CLIENT_ID LOAN_NO INST_MAT_ INST_SEQ ORIGINAL_INST_AMT INT_AMT
110 2 222 100 01-JAN-13 1 0 0
110 2 222 100 02-JAN-13 2 0 0
110 2 222 100 03-JAN-13 3 0 0
110 2 222 100 04-JAN-13 4 500 246
110 2 222 100 05-JAN-13 5 0 0
110 2 222 100 06-JAN-13 6 0 0
110 2 222 100 08-JAN-13 8 600 256
110 2 222 100 07-JAN-13 7 0 0
110 2 222 100 09-JAN-13 9 0 0
110 2 222 100 11-JAN-01 11 0 0
110 2 222 100 10-JAN-01 10 0 0
110 2 222 100 12-JAN-01 12 700 274
12 rows selected.
SQL> -
Sorting of columns in report with values from lookup table (LOV)
Hi,
I have a report where I looku the values using a number of LOVs. I'd like to enable sorting on those columns in the report whihc works BUT the report get's sorted on the numric looku pvalue instead of the description for example COUNTRY_ID instead of COUNTRY_DESC.
I have played around with the function APEX_ITEM.ITEM_TET_FROM_LOV in my SQL query:
select ID, NAME,
APEX_ITEM.TEXT_FROM_LOV(COUNTRY_ID, 'COUNTRY_LOOKUP') COUNTRY,
from VAR
But I get the following error:
report error:
ORA-06550: line 1, column 13:
PLS-00103: Encountered the symbol "COLLECT" when expecting one of the following:
:= . ( @ % ;
ORA-06550: line 1, column 82:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
. ( , % from
So I am thinking that I am doing something very wrong? Is there another way to accomplish this?
Andyyou need to use htmldb_item.text_from_lov in your query.
this will then deocde the key value to the description within the query itself and therefore allow you to do your sorting. -
How to avoid repeat values in two tables
hi there,
I have two tables. SUPPLIERS and MANUFACTURERS. SUPPLIERS has more than one MANUFACTURERS. In normalization rule, a field must have single piece of data. SUPPLIERS_ID is repeating for every MANUFACTURERS. pls help me out to normalize these two tables.
Thank u...Ideally you need to have 2 master tables SUPPLIER & MANUFACTURER.
Then you need an intermediate transaction table to hold the relationship bet SUPPLIED & MANUFACTURER. Here the records will be repeated. -
Hiding grand total value in pivot table view
Hi,
I have a pivot table in which i have 5 measures, out of these 5 measures i want to show the grand total for only the first one. How can this be done?
Thxhi Phantasm, do as it is mentioned as kart.
IT WORKS FINE, put agrregation rule as none and take row total as after.........
take aggregation rule as NONE for last 4 columns ok......
TRY NEATLY ONCE..........IT WORKS
Thanks & Regards
J Rushi -
ReportViewer Total column InScope causes repeating values in Innermost group
I have a table which has only one cell. Inside that cell it has a rectangle (design purposes only) and inside that rectangle there is my main table. Primary table is used for paging, so it has one group. Innermost table is for data view. The problem is,
that if i have ANY expression containing InScope("Matrix1_Group1") in Total column in the innermost table, i get repeating values in that table. Numbers are ok, but rows titles are repeating.
+-----------+------------+---------+----------+
| Country | Producer | [Month] | Total |
+-----------+------------+---------+----------+
| [Country] | [Producer] | SUM(Q) | <<Expr>> |
+-----------+------------+---------+----------+
| Total | SUM(Q) | <<Expr>> |
+------------------------+---------+----------+
This is the sample of my innermost table (tried my best. not allowed to insert images). I i use InScope("Matrix1_Group1") in ANY (value, Color, BackgroundColor) expression in Total column, Producer column values are repeating (the first value
is repeated in all rows).
Sample expression from cell in Total column is: =IIF(InScope("Matrix1_Group1"), Fields!Producer.Value/SUM(Fields!Producer.Value, "Matrix1_Group1"), "100%")
More information abou this problem.
It only occurs if two conditions are met: repor has paging and InScope returns true. I have to make pages in report and each page contains table and some other blocks. I use List component to create a list and use grouping. Then i put a table inside. If
table is outside any element, everything works perfectly, but if it is inside list, table, matrix or something similar allowing to create pages, the problem occurs.
Also, if InScope allways returns FALSE and none condition is met - there is no problem. But if any InScope return TRUE - i have repeating values in innermost group.Please have a look at the following links:
http://download-west.oracle.com/docs/html/B10602_01/orbr_summary.htm#1010648
http://download-west.oracle.com/docs/html/B10602_01/toc.htm -
Application hangs for non existing value
Hi,
At the DB level I tried to query non existing value from the table, query came out with "no rows selected" . But when I try to do the same from front end, application hangs! I just checked in the statspack report it shows like query is taking more cpu time to execute. what could be the reason for this?
when I join the v$session,v$sql to get the currently running query on database, it shows the query which try to execute from the application as active.
why it is hanging in application and why not in DB?
can any one brief me on this regard? why does application hangs for non exsting value?
With Regards
BooHi,
At the DB level I tried to query non existing value from the table, query came out with "no rows selected" . But when I try to do the same from front end, application hangs! I just checked in the statspack report it shows like query is taking more cpu time to execute. what could be the reason for this?
when I join the v$session,v$sql to get the currently running query on database, it shows the query which try to execute from the application as active.
why it is hanging in application and why not in DB?
can any one brief me on this regard? why does application hangs for non exsting value?
With Regards
Boo -
After updating timezone.xml и RGNLSTNG.xml files for my SharePoint 2010 (SP2 - 14.0.7015.1000)
I have to run this command to Update time zone on calendar events:
stsadm -o tzmove -name "russ2014" -update all
But this cause an error: Adding a value to a 'datetime' column caused an overflow
ULS log event: System.Data.SqlClient.SqlException: Adding a value to a 'datetime' column caused an overflow. The statement has been terminated.
How to fix this?Hi,
Whether you added new time zone definition to your timezone.xml
and RGNLSTNG.xml files. if not, please provide the details about what content you updated in timezone.xml and RGNLSTNG.xml files.
The stsadm.exe –o tzmove command does not work for new time zone definition changes.
This command is designed for making changes in the existing time zone,
not for creating a new time zone definition.
After you modify the Timezone.xml and Regnlstng.xml files to include the new time zone definition, you must restart Internet Information Services (IIS).
To do this, click Start, click Run, type
iisreset in the Open box, and then click
OK.
Try to do IIS restart, compare the results.
Best Regards,
Lisa Chen
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] -
Script to replace non-numeric value of column to blank
Hi
I want to replace non-numeric value of column to blank. Can any one help me out.
For example:
column1
234 kjnkj 12e
555565asd44
1232334343
Now I want to that update cloumn with blank value which contains non-numeric value in itTry the following
select translate(column1,translate(column1,' +-123456789',' '), ' ') b from dual; -
Ranking of Consecutive non-increasing values in a column
Hi friends
I have a table with numbers like this in a column
sr no. value
1 17
2 0
3 0
4 38
5 32
6 24
7 12
8 51
9 42
10 1
11 1
12 0
13 0
14 1
15 1
so on....I want to find out consecutive non-increasing sequences of value (2nd column) order by sr. no (first column) in ascending order.
For example, in the 2nd column, 17 is followed by 0 and 0 and then 38 so it means 3 consecutive values (i.e starting from 17 are 0 and 0) are non-increasing and they are ranked by '1' in my desired in third column as shown below. similarly, the 2nd non-increasing sequence starts with 38,32,24 and 12 and this is ranked as '2' in the third column. same is the case with rank '3' for the third non increasing sequence. so bascially i want the third column with "ranks" starting and ending as per above logic. i tried using LEAD function but doesn't get what I want. I need the shortest possible query to get that third column since i have other columns in the original table in a multiple group by query.
my desired output is:
sr no. value Rank
1 17 1
2 0 1
3 0 1
4 38 2
5 32 2
6 24 2
7 12 2
8 51 3
9 42 3
10 1 3
11 1 3
12 0 3
13 0 3
14 1 4
15 1 4
. Hope I explained the question clearly and hoping to get answer soonest.
regards
Hamzawith sample_table as (
select 1 sr_no,17 val from dual union all
select 2,0 from dual union all
select 3,0 from dual union all
select 4,38 from dual union all
select 5,32 from dual union all
select 6,24 from dual union all
select 7,12 from dual union all
select 8,51 from dual union all
select 9,42 from dual union all
select 10,1 from dual union all
select 11,1 from dual union all
select 12,0 from dual union all
select 13,0 from dual union all
select 14,1 from dual union all
select 15,1 from dual
t1 as (
select sr_no,
val,
case
when lag(val) over(order by sr_no) >= val then 0
else 1
end start_of_group
from sample_table
select sr_no,
val,
sum(start_of_group) over(order by sr_no) rank
from t1
order by sr_no
SR_NO VAL RANK
1 17 1
2 0 1
3 0 1
4 38 2
5 32 2
6 24 2
7 12 2
8 51 3
9 42 3
10 1 3
11 1 3
SR_NO VAL RANK
12 0 3
13 0 3
14 1 4
15 1 4
15 rows selected.
SQL> SY.
Maybe you are looking for
-
Is it possible to activate an ipad w/o an internet connection on a mac?
Is it possible to activate an ipad without an internet connection on my mac? I have got a macbook pro with iTunes 10.1.2 (17) and an micro-sim card with a iPad 3G data plan, so I can use it directly with the iPad, but I have to activate the iPad at f
-
Error while setting up calendar
I am running XP, DM4.5 with a BB8310. I"m trying to set up outlook express calendar on the BB. I go to 'configure sync settings on my desktop program' choose 'calendar' then highlight microsoft outlook ( outlook express is not an option in the list),
-
How to convert oracle forms in j2ee platform
hi, i want to know how can i convert oracle forms into j2ee platforms. if is it possible then please tell me the steps that i need to follow . thxs
-
Hi, I need to configure RSPAN between 2 nexus 7000 but i do not understand how to do it on catalyst you configure destination remote vlan but on nexus that options is not available. Could anybody show me with an example please? Best regards. Thanks i
-
How to upload a file to two different servers?
Hi All We have a JSP page in our web application where we allow user to upload a file. The file is saved on to the JBOSS application server's deploy folder. Now we have another server where we need to have copy of the same files uploaded by the user.