Query regarding dummy column in OBIEE.
Hi Gurus,
I have a report where data is pulled at region level
regions are say :A,B,C,D,E,F,G,H
Now we have a reqmt from one of our client to group the regions and classify them as grades.But we don't have any grades in our database.This reqmt is for users of a specific country only so we don't want to add this new grade column to our database.We want to create a new dummy column for this specific report only and want to hard code the grades like this
Grade Top : Regions are A,B,D
Grade Bottom:Regions areC,F,G
Grade Middle:Regions areE,H
So the reqmt is i want to add a new dummy column (only for this particular report) called Grade with three values :Top,Bottom,Middle
How to do this , pls suggest.
Regards,
RC
Hi,
You could add a additional column to the request. In the Expression Builder you create a 'CASE-statement'
CASE when Regions in ( 'A','B','D' ) then 'Grade Top'
when Regions in ( 'C','F','G' ) then 'Grade Bottom'
when Regions in ( 'E','H' ) then 'Grade Middle'
END
Regions would be you logical column
Good Luck,
Daan Bakboord
http://obibb.wordpress.com
Similar Messages
-
Query regarding the data type for fetcing records from multiple ODS tables
hey guys;
i have a query regarding the data type for fetcing records from multiple ODS tables.
if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
can any one help with some suggestion.Hi Mudit,
One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
AS is used to rename the column name when data is being selected from your DB.
So, the query Select ename as empname from emptable will return the data with column name as empname.
Regards,
Bhavesh -
Attributes selected in query with no column type found! (solved)
Dear JHeadstart Team,
In the view object Editor I have two entity based attributes attrib1 and attrib2
both with type Number. Both have aliases with type number(9,0)
If attrib1 is null I want to have the value of attrib2.
In the expression box I put: nvl(attrib1,attrib2)
When I press the ok button I get the next error message.
"Attributes selected in query with no column type found!
Specifying column-type and precision results in better query performance at runtime.
Do you wish to set default column type for these attributes? "
When I say ok I get the next message:
"An error occurred. Unable to apply all the wizard changes.
Column type cannot be changed for Entity based attribute.
Exception: oracle.jbo.dt.objects.JboExeption."
The details button serves no extra information.
Since both the attributes have the same type I thought the nvl commando should work.
But what does the "no column type found" sentence mean?
regards,
Marcel.
Message was edited by:
user571204Thanks Jan,
You've put me on the right track.
I found out that this is only possible in the entity object class.
So I have to check my limited java skills. -
Hi,
I have a query regarding explain plan. While we gather the statistics then optimize choose the best possible plan out of the explain plans available. If we do not gather statistics on a table for a long time then which plan it choose:
If it will continue to use the same plan as it use in the starting when statistics were gathered or will change the plan as soon as dml activities performed and statistics getting old.
Thanks
GKHi,
Aman.... wrote:
Gulshan wrote:
Hi,
I have a query regarding explain plan. While we gather the statistics then optimize choose the best possible plan out of the explain plans available. If we do not gather statistics on a table for a long time then which plan it choose:The same plan which it has chosen in the starting with the previous statistics. The plan won't change automatically as long as you won't refresh the statistics. This is wrong even for Oracle 9i. Here are couple of examples when a plan might change with the same optimizer statistics:
* when you have a histogram on a column and are not a bright person to use bind variables, you might get a completely different execution plan because of a different incoming value. All that is needed to fall into this habit - a soft parse, which might be due to different reasons, for instance, due to session parameter modification (which also might change a plan even without a histogram)
* Starting with 10g, CBO makes adjustments to cardinality estimates for out of range values appeared in predicates -
Peoplesoft Trees as Hierarchial Columns in OBIEE 11g
Sorry for a duplicate posting. Logged in as a normal user with random number. I know how much people hate it. Logged in as myself now.
Hi,
I have extensively searched using Google or 11g docs but could not find a proper solution to using Peoplesoft trees in form of hierarchial columns in obiee 11g. Can the rpd of obiee 11g be designed to view the Peoplesoft tree structure( as it is in Tree manager in Pplsoft) as hierachial columns in obiee 11g? I am sure hierarchial columns as a 11g feature are not just for visual representation in tree format but also can be viewed in Answers and queried against it,am I right?
Anybody who has worked on trees and OBIEE 11g hierarchial columns? Ahsan/Navin??
Thanks,
DanI have not used the 11g hierarchical columns for PSoft Trees but I can think of a glaring reason NOT to do this..PERFORMANCE. If I understand correctly, 11g issues a group by and Union as you traverse this type of structure and PeopleSoft trees have a number of tables to represent the actual TREE. I cannot possibly see how this can be effective especially with a large scale BI Apps DW? This is part of the reason the trees get flattened out via the OOTB ETL adaptors for PSoft.
-
Hi,
We are on R12 and I have have a query regarding balances.
I am writing a report and need to get the functional Actual balance(GBP) for accounts.
Each account has a balance in one or more currencies. My understanding as per the TRM was that the period_net_dr/cr columns stores the balances in ledger currency for all Journals entered and posted in GBP, while the period_net_dr_beq and period_net_cr_beq stores the ledger equivalent balance for all Journals entered and posted in Foreign currency.
However, when I query gl_balances, I notice the following :
1) For a ccid, for GBP currency code, the period_net_dr_beq and period_net_cr_beq are being populated , why ?
2) For certain ccid, for GBP currency code the period_net_cr_beq and period_net_dr_beq both are zero, though there is a value in the period_net_dr/cr columns.
3) When I do an account inquiry from GL SuperUser, I can see that for a given period and account and for Currency type 'Entered' , the Balances window shows me the
result of period_net_dr_beq-period_net_cr_beq columns for my GBP balance.
I am a bit confused and would appreciate if someone can point me what am I missing ?
ThanksOK, I have managed to figure this one out.
The period_net_cr / period_net_dr stores the sum of functional balances(includes the GBP journals + the functional equivalent of the non gbp journals) . Its like a running total of the functional balance. -
Performance of update query for single column vs multiple column
Hi All,
I could not find any answer for this, does it ever matter in terms of performance updating single column versus multiple column in a single update query.
For eg. table consisting of 15 columns, what would be the difference in performance when one column is update in the single query against another update query where 15 columns are updated.
Please do keep in mind my table columns in actually could be around 150+.
Thanks for any information provided.If updated columns aren´t on where clause , then the only impact of 15 columns will be a increase on redo generation, and a possible chainning row.
So since the redo is one of the things that have a large impact, the answer is yes.
The performance will be slower.
Regards
Helio Dias.
http://heliodias.com
OCE SQL, OCP 9i -
Query regarding updating rows in JTable
Query regarding updating rows in JTable
Hello,
I have a JTable with 6 columns and 1000s of rows (which are data read from flat files)
I can select 1 or more rows and change the values of the
columns. each time I do this I need to update the values
in the flat file.
Currently I assign the updated Jtable values to a vector
Vector rowVector = (Vector)defaultModel.getDataVector();
then I iterate over the vector and compare the values with the (old) data
in the JTable.
for(int rowCount = 0; rowCount<rowVector.size(); rowCount++){
Vector v = (Vector)rowVector.elementAt(rowCount);
//smsList is the Vector that contains the old JTable values
for(int i=0; i<smsList.size(); i++){
//If colums values have been changed; add that
//vector value to another vector
selectedsmsList.add(smsList.get(i));
for(int i=0; i<selectedsmsList.size(); i++){
//Update the values in the flat file
}This works fine except that it takes ages to iterate over the updated vecor and un-updated,old vector; is there any way to directly get the list of rows that were updated in the jtable; so that I can directly do an I/O operation to update the jtablke values?Just a suggestion.
You could add a listener and use a vector of booleans to keep track of the rows that have been changed. You could then iterate through this boolean vector and update the changed rows.
See
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#modelchange
Don't know whether this will be helpful.
Regards, Darryl -
Cannot query conditionals on column in view
We are upgrading our oracle database from 9i to 11g. The upgrade is complete but we are running into one issue regarding a view. We are able to query the view without any problems, but when querying a specific column for a specific value, we are not getting a results back although we are able to when performing the same query on the 9i database. The view that is not working is:
Select count(*) from v_test where statuscode like '%active%';
The view has been dropped and recreated. If I do select * from v_test it works fine.
Any help/suggestion is appreciated.CREATE OR REPLACE FORCE VIEW "JIFFY"."V_TEST" ("V_PROJECTID", "JIFFY", "TFIMS", "CSSR", "CFSR", "DD254", "DTICEXEMPT", "STATUSCODE", "LASTNONZEROMONTH", "BURNRATE", "LASTLMRDATE", "LASTLMRID", "TECHSTATUSDOCDATE", "TECHSTATUSDOCID", "REPORTFREQ", "FIRSTTECHRPTDUEDATE", "FACEVALUE", "RECEIVED", "TOTOBLIGATED", "CFYOBLIGATED", "TOTACCRUED", "FUNDSEXHAUSTIONDATE", "CONTTECHPOCID", "CONTTECHPOCNAME", "GOVTTECHPOCID", "GOVTTECHPOCNAME", "CONTRACTTYPE") AS
SELECT r."V_PROJECTID",r."JIFFY",r."TFIMS",r."CSSR",r."CFSR",r."DD254",r."DTICEXEMPT",
s.statuscode,
projectinfo.getLastNonZeroMonth(r.v_projectid) lastNonZeroMonth,
projectinfo.getBurnRate(r.v_projectid) burnRate,
projectinfo.getRecentLMRDate(r.v_projectid) lastLMRdate,
projectinfo.getRecentLMRID(r.v_projectid) lastlmrid,
projectinfo.getDCFTechStatusDocDate(r.v_projectid) techStatusDocDate,
projectinfo.getDCFTechStatusDocID(r.v_projectid) techStatusDocID,
projectinfo.getDueDateFreqRpt(r.v_projectid) reportFreq,
projectinfo.getFirstTechRptDueDate(r.v_projectid) FirstTechRptDueDate,
projectinfo.getFaceValue(r.v_projectid) FaceValue,
projectinfo.getActualAllocationTot(r.v_projectid) received,
projectinfo.getTotObligated(r.v_projectid) TotObligated,
projectinfo.getCFYObligated(r.v_projectid) CFYObligated,
projectinfo.getTotAccrued(r.v_projectid) TotAccrued,
projectinfo.getFundsExhaustionDate(r.v_projectid) FundsExhaustionDate,
projectinfo.getContTechPocId(r.v_projectid) ContTechPocId,
SUBSTR(projectinfo.getContTechPocName (projectinfo.getContTechPocId(r.v_projectid)),1,50) ContTechPocName,
projectinfo.getGovtTechPocId(r.v_projectid) GovtTechPocId,
SUBSTR(projectinfo.getGovtTechPocName (projectinfo.getGovtTechPocId(r.v_projectid)),1,50) GovtTechPocName,
SUBSTR(projectinfo.getContractType(r.v_projectid),1,50) ContractType
FROM v_projectspecialreqs r, v_projectstatus s
WHERE r.v_projectid = s.projectid (+);
Since this view is a join of two other views, I thought I would provide the source for them as well...
CREATE OR REPLACE FORCE VIEW "JIFFY"."V_PROJECTSPECIALREQS" ("V_PROJECTID", "JIFFY", "TFIMS", "CSSR", "CFSR", "DD254", "DTICEXEMPT") AS
SELECT p.projectid v_projectid,
DECODE(a.jiffy,'JIFFY','Y','N') jiffy,
DECODE(b.tfims,'TFIMS','Y','N') tfims,
DECODE(c.cssr, 'CSSR','Y','N') cssr,
DECODE(d.cfsr, 'CFSR','Y','N') cfsr,
DECODE(e.dd254,'DD254','Y','N') dd254,
DECODE(f.dticx,'DTICX','Y','N') dticexempt
FROM Project p,
(SELECT tp.projectid, t.taxcode jiffy
FROM tax_projects tp, taxonomy t
WHERE tp.taxid = t.taxid
AND t.taxcode in ('JIFFY')
) a,
(SELECT tp.projectid, t.taxcode tfims
FROM tax_projects tp, taxonomy t
WHERE tp.taxid = t.taxid
AND t.taxcode in ('TFIMS')
) b,
(SELECT tp.projectid, t.taxcode cssr
FROM tax_projects tp, taxonomy t
WHERE tp.taxid = t.taxid
AND t.taxcode in ('CSSR')
) c,
(SELECT tp.projectid, t.taxcode cfsr
FROM tax_projects tp, taxonomy t
WHERE tp.taxid = t.taxid
AND t.taxcode in ('CFSR')
) d,
(SELECT tp.projectid, t.taxcode dd254
FROM tax_projects tp, taxonomy t
WHERE tp.taxid = t.taxid
AND t.taxcode in ('DD254')
) e,
(SELECT tp.projectid, t.taxcode dticx
FROM tax_projects tp, taxonomy t
WHERE tp.taxid = t.taxid
AND t.taxcode in ('DTICX')
) f
WHERE p.projectid = a.projectid (+)
AND p.projectid = b.projectid (+)
AND p.projectid = c.projectid (+)
AND p.projectid = d.projectid (+)
AND p.projectid = e.projectid (+)
AND p.projectid = f.projectid (+);
CREATE OR REPLACE FORCE VIEW "JIFFY"."V_PROJECTSTATUS" ("PROJECTID", "STATUSCODE") AS
SELECT tp.projectid projectid, t.taxcode
statuscode
FROM tax_projects tp, taxonomy t
WHERE tp.taxid = t.taxid
AND t.taxcode in ('ACTV', 'INACTV', 'CMPLT', 'CNCL'); -
Query regarding updation thru a Procedure
Hi,I have a query regarding updation.
1.I invoke a procedure in Oracle called submit thru my Java application.
The submit procedure saves the XML data in the database
and displays this data in a Front End GUI.
2. Now,I make a change in my Java application by adding new elements to the same row.This row now contains additional XML elements.
I would like to display the new row with the new elements in the GUI.
What is a better option for doing the above?
1.Delete the row being shown,save the new row with the changes in the database,and re display it?
2.Or,Update the row dynamically and refresh?
Any suggestions
Thanks,Hi,I have a query regarding updation.
1.I invoke a procedure in Oracle called submit thru
my Java application.
The submit procedure saves the XML data in the
database
and displays this data in a Front End GUI.
2. Now,I make a change in my Java application by
adding new elements to the same row.This row now
contains additional XML elements.
I would like to display the new row with the new
elements in the GUI.
What is a better option for doing the above?
1.Delete the row being shown,save the new row with
the changes in the database,and re display it?
2.Or,Update the row dynamically and refresh?
Any suggestions
Thanks,If you delete (it seems to me yours this process is regular and frequent) and re insert the new updated one record then High water mark will cause to scan yours table which may cause to degrade the performance.AFAIK you should go with update.But hold down dont implement it as i suggested lets see what are others solution here which may be more precious then mine.
Khurram -
How to place one column under another column in obiee report?
Hi all,
I am new to obiee, so need some help from obiee experts. Can anyone tell me how to place one column data under another column in obiee report?
i need the report to be as below
category total_students Course_enrollment Test_attended pass_test
total N % N % N %
all students ##### ## ## ## ## ## ##
Ethnicity
Asian ###### ## ## ## ## ## ##
African American ###### ## ## ## ## ## ##
white ######
Filipino ######
Gender
Male ##### ## ## ## ## ## ##
Female ##### ## ## ## ## ## ##
and similarly for other columns
where ethnicity, gender are columns in the table and Course_enrollment, Test_attended, pass_test are calculated columns.
Please help me to create a report as above if anyone knows how to do it.
Edited by: Shailaja on Jul 19, 2010 12:23 AMTwo ideas I can think of:
1) Create multiple pivot tables and then display them one under the other
2) Create multiple measure columns such as "male_amt", "female_amt", "white_amt", "asian_amt", "black_amt", etc. for all the columns you need. Then you could simple stack them in a single pivot table.
Option #2 might give you the prettiest results - but also requires a lot more maintenance (for instance, if you reclassify ethnic groups, you'd have to go through the reports to add additional metric columns).
Hope this helps,
Scott -
How to add two columns in OBIEE report?
Hi to All,
Can anyone tell me how to add two columns in OBIEE report and get that result in a new column?
Thanks in Advance,
ThenmozhiAssume you already have two columns SalesAmt1 and SalesAmt2, and you want to derive 3rd column say SalesAmt3 which would be the sum of SalesAmt1 and SalesAmt2.
For this, as I mentioned above pull SalesAmt1 and SalesAmt2 columns in Report. Now pull another column (say SalesAmt1) and open the fx. Clear the contents of fx. Now locate the columns button in the bottom of the fx. From Here, first select SalesAmt1 and + sign and the select SalesAmt2.
Now in this new column, the fx should look like SalesAmt1 + SalesAmt2.
Let me know if you are looking for something else.
Thanks -
Hi,
How to add a dummy column like 'Status' and all its value as "Closed" in a view. This column
is not related to any table.See example below. Hope this is what you want.
SQL> select * from tst_table;
ID DEP DET
10 XXX A
10 XXX B
20 YYY C
10 ZZZ D
SQL> create or replace view my_view as
2 select id,dep,det,(select 'Closed' from dual) Status from tst_table;
View created
SQL> desc my_view;
Name Type Nullable Default Comments
ID NUMBER Y
DEP VARCHAR2(10) Y
DET VARCHAR2(25) Y
STATUS CHAR(6) Y
SQL> select * from my_view;
ID DEP DET STATUS
10 XXX A Closed
10 XXX B Closed
20 YYY C Closed
10 ZZZ D Closed
SQL> -
A query regarding synchronised functions, using shared object
Hi all.
I have this little query, regarding the functions that are synchronised, based on accessing the lock to the object, which is being used for synchronizing.
Ok, I will clear myself with the following example :
class First
int a;
static int b;
public void func_one()
synchronized((Integer) a)
{ // function logic
} // End of func_one
public void func_two()
synchronized((Integer) b)
{ / function logic
} // End of func_two
public static void func_three()
synchronized((Integer) a)
{ // function logic
} // End of func_three, WHICH IS ACTUALLY NOT ALLOWED,
// just written here for completeness.
public static void func_four()
synchronized((Integer) b)
{ / function logic
} // End of func_four
First obj1 = new First();
First obj2 = new First();
Note that the four functions are different on the following criteria :
a) Whether the function is static or non-static.
b) Whether the object on which synchronization is based is a static, or a non-static member of the class.
Now, first my-thoughts; kindly correct me if I am wrong :
a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisation, since in case obj1 and obj2 happen to call the func_one at the same time, obj1 will obtain lock for obj1.a; and obj2 will obtain lock to obj2.a; and both can go inside the supposed-to-be-synchronized-function-but-actually-is-not merrily.
Kindly correct me I am wrong anywhere in the above.
b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation.
Kindly correct me I am wrong anywhere in the above.
c) In case 3, we have a static function , synchronized on a non-static object. However, Java does not allow functions of this type, so we may safely move forward.
d) In case 4, we have a static function, synchronized on a static object.
Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation. But we are only partly done for this case.
First, Kindly correct me I am wrong anywhere in the above.
Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".
Another query : so far we have been assuming that the only objects contending for the synchronized function are obj1, and obj2, in a single thread. Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.a; and again obj1 trying to obtain lock for obj1.a, which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed. Thus, effectively, our synchronisation is broken.
Or am I being dumb ?
Looking forward to replies..
Ashutosha) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisationThere is no synchronization between distinct First objects, but that's what you specified. Apart from the coding bug noted below, there would be synchronization between different threads using the same instance of First.
b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.obj1/2 don't call methods or try to obtain locks. The two different threads do that. And you mean First.b, not obj1.b and obj2.b, but see also below.
d) In case 4, we have a static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.Again, obj1/2 don't call methods or try to obtain locks. The two different threads do that. And again, you mean First.b. obj1.b and obj2.b are the same as First.b. Does that make it clearer?
Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".That's what happens in any case whether you write obj1.func_four(), obj2.func)four(), or First.func_four(). All these are identical when func_four(0 is static.
Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.aNo we don't, we have a thread trying to obtain the lock on First.b.
and again obj1 trying to obtain lock for obj1.aYou mean obj2 and First.b, but obj2 doesn't obtain the lock, the thread does.
which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed.Of course it won't. Your reasoning here makes zero sense..Once First.b is locked it is locked. End of story.
Thus, effectively, our synchronisation is broken.No it isn't. The second thread will wait on the same First.b object that the first thread has locked.
However in any case you have a much bigger problem here. You're autoboxing your local 'int' variable to a possibly brand-new Integer object every call, so there may be no synchronization at all.
You need:
Object a = new Object();
static Object b = new Object(); -
Removing drag functionality of column in OBIEE 11g
Hi all,
Can any one say me how to remove the draging functionality for the columns in OBIEE 11g ? It is creating an issue for me when i hide the columns in pivot and has only rows over there. It is creating one more layer on the top of the measures.
Thanks for your help.Fightclub,
Edit the Pivot view and goto Row section -> Row Properties -> Option - Uncheck the Display Heading.
But you'll loose your columns heading of rows.
Thanks,
Balaa...
Maybe you are looking for
-
Is it true that Decode function used only inside of SQL Statement ' declare i number; --cursor dept_cursor is select * from dept; begin select deptno into i from dept where deptno=10; -- dbms_output.Put_line(); dbms_output.put_line('Hi'||decode(sql%r
-
Airport Extreme giving errors after upgrading to ML Server
With OS X Server, your machine sees your Airport Extreme and can then configure it by opening ports, etc. once you turn on services. I upgraded from OS X Lion Server to ML Server and everything was fine for a second. Now whenever I click on the Extre
-
Dear All. I want to check the schduling in Master Recipe C202 transaction for updating same in material master, i have maintained Machine time & Labour time in recipe then i try in recipe from menu bar RecipeSchdulingSchdule but not getting activity
-
After my subscription of CS-6 and found I could not open raw files of Canon 5D3 whereas my CS-5 is no problem. How could I download "Camera Raw 6.7" for my CS-6??
-
Motion Content Install hanging at 100%
Hi, I just got Final Cut Studio 2. The first installation disk ran smoothly, but after getting to 100% of Audio Content Disk 1, the install hangs and never finishes. This also happens when Im installing the Motion Content. The DVD Studio Pro content