Query to find max on UNION
Hi ALL,
I need to find max date from a union result. I tried to use bellow query,
select max(last_processed) from
(select max(date_processed) "last_processed" from GMD.CHANGELOG_USERS_ORGS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_USERS_NOTES UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_USERS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_SUBS_CONTENT_LKUP UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_SUBS_CONTENT UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_ORGANISATIONS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_MEDIA_CAT_LKUP UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_MEDIA_CAT UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_INDIVIDUALS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_COUNTRIES UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_ADDRESSES);
This is not working give ORA-00904: "LAST_PROCESSED" invalid identifier.
I tried a SELECT from (....) as follows*
select * from
(select max(date_processed) "last_processed" from GMD.CHANGELOG_USERS_ORGS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_USERS_NOTES UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_USERS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_SUBS_CONTENT_LKUP UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_SUBS_CONTENT UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_ORGANISATIONS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_MEDIA_CAT_LKUP UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_MEDIA_CAT UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_INDIVIDUALS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_COUNTRIES UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_ADDRESSES)
This is woking perfectly. But when I tried to do max(*) i.e select max(*) from ......... gives error again.
Can some one suggest me a query to full fill my requirement please.
Thanks
Rupesh
www.orachat.com
Hi, Rupesh,
rupesh.sreenivas wrote:
Hi ALL,
I need to find max date from a union result. I tried to use bellow query,
select max(last_processed) from
(select max(date_processed) "last_processed" from GMD.CHANGELOG_USERS_ORGS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_USERS_NOTES UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_USERS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_SUBS_CONTENT_LKUP UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_SUBS_CONTENT UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_ORGANISATIONS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_MEDIA_CAT_LKUP UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_MEDIA_CAT UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_INDIVIDUALS UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_COUNTRIES UNION
select max(date_processed) "last_processed" from GMD.CHANGELOG_ADDRESSES);
This is not working give ORA-00904: "LAST_PROCESSED" invalid identifier.
Anything inside quotes (including double-quotes) is case-sensitive. Everything not in quotes is capitalized before compiling. So
last_processed is the same as
"LAST_PROCESSED", but different from
"last_processed".
Don't use double-quotes.
Similar Messages
-
Query to find out the time used by an user for an application
Hello All,
I want to know the query to find out the whole time used by the user for an application. Please view the below data
Employee:
SNO EMP_ID EMP_NAME EMP_DATE LOGIN_TIME LOGOUT_TIME
1 10 Visu 21-Nov-2010 06:30:00 07:30:00
2 10 Visu 21-Nov-2010 06:40:00 07:20:00
3 10 Visu 21-Nov-2010 06:50:00 07:50:00
4 10 Visu 21-Nov-2010 07:30:00 08:30:00
5 10 Visu 21-Nov-2010 09:30:00 10:30:00
By checking the above data we can say that the total time Visu used the application is
8.30 - 6.30 (From 1,2,3,4 records) = 2hrs
10.30 - 9.30 (Based on 5th rec) = 1hr
So the total time Visu used the application would be 3 hrs = 180 mins.
Could you please help me in getting the result from that data using a query?odie_63 wrote:
I think it may be solved with analytics too.
with t1 as (
select 1 sno,10 emp_id,'Visu' emp_name,'21-Nov-2010' emp_date,'06:30:00' login_time,'07:30:00' logout_time from dual union all
select 2,10,'Visu','21-Nov-2010','06:40:00','07:20:00' from dual union all
select 3,10,'Visu','21-Nov-2010','06:50:00','07:50:00' from dual union all
select 4,10,'Visu','21-Nov-2010','07:30:00','08:30:00' from dual union all
select 5,10,'Visu','21-Nov-2010','09:30:00','10:30:00' from dual
t2 as (
select emp_id,
emp_name,
emp_date,
to_date(emp_date || login_time,'DD-MON-YYYYHH24:MI:SS') login_time,
to_date(emp_date || logout_time,'DD-MON-YYYYHH24:MI:SS') logout_time
from t1
t3 as (
select t2.*,
case
when login_time < max(logout_time) over(
partition by emp_id,emp_date
order by login_time
rows between unbounded preceding
and 1 preceding
then 0
else 1
end start_of_group
from t2
t4 as (
select t3.*,
sum(start_of_group) over(partition by emp_id,emp_date order by login_time) grp
from t3
t5 as (
select emp_id,
emp_date,
min(login_time) login_time,
max(logout_time) logout_time
from t4
group by emp_id,
emp_date,
grp
select emp_id,
numtodsinterval(sum(logout_time - login_time),'day') time_spent
from t5
group by emp_id
order by emp_id
EMP_ID TIME_SPENT
10 +000000000 03:00:00.000000000
SQL> SY. -
Query to find the latest record with respect to the current status
Dear gurus
I have the following data in a table
Customernum
bkcode
reqtdate
Prevstat
currstat
The data will be like this
CustomerNum bkcode reqdate prevstat currstat
5900 1 03-Aug-12 0 1
5900 1 06-Aug-12 1 0
5900 5 22-Jun-12 0 1
If a customer has an issue to solved, a record is added with bkcode , register date and currstat will be 1
If the issue is resolved for the bookingcode,a new record is added, the currentstatus will become 0. and prev stat will show 1. Row no 1 and 2 reflects this case
If this table is queried for finding the unresolved issues. the output should be only the Last row of the above example. since issue with bookingcode 1 has been resolved
I have trying hard to get this thing confused what to use Lead or Max
Kindly guide meHi,
one way here:
WITH mytable(CustomerNum, bkcode, reqdate, prevstat, currstat)
AS
SELECT 5900, 1, TO_DATE('03-Aug-12', 'DD-Mon-YY'), 0, 1 FROM DUAL UNION ALL
SELECT 5900, 1, TO_DATE('06-Aug-12', 'DD-Mon-YY'), 1, 0 FROM DUAL UNION ALL
SELECT 5900, 5, TO_DATE('22-Jun-12', 'DD-Mon-YY'), 0, 1 FROM DUAL
SELECT CustomerNum, bkcode, reqdate, prevstat, currstat
FROM (SELECT a.*
, ROW_NUMBER() OVER (PARTITION BY CustomerNum, bkcode
ORDER BY reqdate DESC) AS rn
FROM mytable a
WHERE rn=1
AND currstat=1;
CUSTOMERNUM BKCODE REQDATE PREVSTAT CURRSTAT
5900 5 22-JUN-12 0 1Regards.
Al
Edited by: Alberto Faenza on Dec 18, 2012 5:23 PM
Changed again!! Previous logic was wrong -
Query to find the memory of database in oracle,sql
Hi All,
Please let me know the query to find the memory of database in oracle,sql.
Thanks,
sajithHow do I find the overall database size?
The biggest portion of a database's size comes from the datafiles. To find out how many megabytes are allocated to ALL datafiles:
select sum(bytes)/1024/1024 "Meg" from dba_data_files;
To get the size of all TEMP files:
select nvl(sum(bytes),0)/1024/1024 "Meg" from dba_temp_files;
To get the size of the on-line redo-logs:
select sum(bytes)/1024/1024 "Meg" from sys.v_$log;
Putting it all together into a single query:
select a.data_size+b.temp_size+c.redo_size "total_size"
from ( select sum(bytes) data_size
from dba_data_files ) a,
( select nvl(sum(bytes),0) temp_size
from dba_temp_files ) b,
( select sum(bytes) redo_size
from sys.v_$log ) c;
Another query ("Free space" reports data files free space):
col "Database Size" format a20
col "Free space" format a20
select round(sum(used.bytes) / 1024 / 1024 ) || ' MB' "Database Size"
, round(free.p / 1024 / 1024) || ' MB' "Free space"
from (select bytes from v$datafile
union all
select bytes from v$tempfile
union all
select bytes from v$log) used
, (select sum(bytes) as p from dba_free_space) free
group by free.p
This is what I use :P From http://www.orafaq.com/wiki/Oracle_database_FAQ#How_do_I_find_the_overall_database_size.3F -
Query to find out pertcular schema related datafiles free space????
hai,
whats the query to find out free space in datafiles and index files related free space for perticular schmea?
Regards
dbaIf you wish to get free space in index tablespace then use following query:
select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb
from
(select tablespace_name, round(sum(bytes)/1024/1024 ,2) as free_space
from dba_free_space group by tablespace_name) a,
(select tablespace_name, sum(bytes)/1024/1024 as tbs_size
from dba_data_files group by tablespace_name
UNION
select tablespace_name, sum(bytes)/1024/1024 tbs_size
from dba_temp_files
group by tablespace_name ) b
where a.tablespace_name(+)=b.tablespace_name
and a.tablespace_name='INDX';
and if you get info for all tablespace then :
select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb
from
(select tablespace_name, round(sum(bytes)/1024/1024 ,2) as free_space
from dba_free_space group by tablespace_name) a,
(select tablespace_name, sum(bytes)/1024/1024 as tbs_size
from dba_data_files group by tablespace_name
UNION
select tablespace_name, sum(bytes)/1024/1024 tbs_size
from dba_temp_files
group by tablespace_name ) b
where a.tablespace_name(+)=b.tablespace_name; -
Need query to find out the sum till a period
Hi,
I need to write one query to find out the cumulative sum of raw_cost of table pa_budget_lines till the specified period, I tried to do this by analytical function, but that is not working in Report 10g. Can anybody help me in this.
Thanksnot familiar with report but could you do something like this
with t as
select 1 grp, 10 * level the_cost, add_months (sysdate, level) effective_dt from dual connect by level < 11 union all
select 2 grp, 5 * level the_cost, add_months (sysdate, level) effective_dt from dual connect by level < 11
input as
( select null grp, null the_cost, null running_total, v_eff_dt effective_dt from dual)
select * from(
select t.grp, t.the_cost, sum(t.the_cost) over (partition by t.grp order by t.effective_dt) running_total, t.effective_dt,
lead(t.effective_dt) over (partition by t.grp order by t.effective_dt) next_effective_dt,
input.effective_dt inp_eff_dt
from t, input
where inp_eff_dt between effective_dt and next_effective_dtv_eff_dt would be the input date you are interested in -
Query to find the Salary table details HRMS 11i
I am looking query to find the persons salary details in Oralce EBS 11i.
I tried the below query bu it didn'ty work.
SELECT papf.employee_number
,papf.full_name
,pj.NAME job
,haou.NAME ORGANIZATION
,ppp.proposed_salary_n salary
FROM per_all_people_f papf
,per_all_assignments_f paaf
,per_jobs pj
,hr_all_organization_units haou
,per_position_definitions ppd
,per_all_positions pap
,per_pay_proposals ppp
WHERE 1 = 1
AND SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
AND papf.current_employee_flag = 'Y'
AND papf.employee_number IS NOT NULL
AND paaf.person_id = papf.person_id
AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND paaf.job_id = pj.job_id
AND paaf.organization_id = haou.organization_id
AND paaf.position_id = pap.position_id
AND pap.position_definition_id = ppd.position_definition_id
AND ppp.pay_proposal_id = (SELECT MAX (pay_proposal_id)
FROM per_pay_proposals
WHERE assignment_id = paaf.assignment_id)
In our case all the below tables have 0 records..
select count(*) from PER_PAY_PROPOSALS ;
COUNT(*)
0
select count(*) from pay_element_entry_values_f;
COUNT(*)
0
select count(*) from PAY_ELEMENT_ENTRY_VALUES_F;
COUNT(*)
0
select count(*) from PAY_ELEMENT_ENTRIES_F;
COUNT(*)
0Hi,
Your results clearly states that there is no salary data which is been captured as well as there are no element entries which are assigned to any assignment.
Please do the below which will insert records in salary as well as element entries table:
1. Add a salary proposal to any active employee (People Enter and Maination --> Search for any employee --> Assignment --> Salary) - This will insert a record in PER_PAY_PROPOSALS table
2. Add an element entry to any active assignment (People Enter and Maination --> Search for any employee --> Assignment --> Entries) - This will insert a record in PAY_ELEMENT_ENTRIES_F and PAY_ELEMENT_ENTRY_VALUES_F table
Hope this clarifies.
Thanks,
Sanjay -
Query to find Memory used by each session in the database
Hi All,
Is there any query to find the memory utilised by each session in the database.I am in 9i database.
Regards
VijayMemory using sessions script,
SET LINESIZE 145
SET PAGESIZE 9999
COLUMN sid FORMAT 99999 HEADING 'SID'
COLUMN serial_id FORMAT 999999 HEADING 'Serial#'
COLUMN session_status FORMAT a9 HEADING 'Status' JUSTIFY right
COLUMN oracle_username FORMAT a12 HEADING 'Oracle User' JUSTIFY right
COLUMN os_username FORMAT a9 HEADING 'O/S User' JUSTIFY right
COLUMN os_pid FORMAT 9999999 HEADING 'O/S PID' JUSTIFY right
COLUMN session_program FORMAT a18 HEADING 'Session Program' TRUNC
COLUMN session_machine FORMAT a8 HEADING 'Machine' JUSTIFY right TRUNC
COLUMN session_pga_memory FORMAT 9,999,999,999 HEADING 'PGA Memory'
COLUMN session_pga_memory_max FORMAT 9,999,999,999 HEADING 'PGA Memory Max'
COLUMN session_uga_memory FORMAT 9,999,999,999 HEADING 'UGA Memory'
COLUMN session_uga_memory_max FORMAT 9,999,999,999 HEADING 'UGA Memory MAX'
prompt
prompt ----------------------------------------------------
prompt | User Sessions Ordered by Current PGA Size |
prompt ----------------------------------------------------
SELECT
s.sid sid
, s.serial# serial_id
, lpad(s.status,9) session_status
, lpad(s.username,12) oracle_username
, lpad(s.osuser,9) os_username
, lpad(p.spid,7) os_pid
, s.program session_program
, lpad(s.machine,8) session_machine
, sstat1.value session_pga_memory
, sstat2.value session_pga_memory_max
, sstat3.value session_uga_memory
, sstat4.value session_uga_memory_max
FROM
v$process p
, v$session s
, v$sesstat sstat1
, v$sesstat sstat2
, v$sesstat sstat3
, v$sesstat sstat4
, v$statname statname1
, v$statname statname2
, v$statname statname3
, v$statname statname4
WHERE
p.addr (+) = s.paddr
AND s.sid = sstat1.sid
AND s.sid = sstat2.sid
AND s.sid = sstat3.sid
AND s.sid = sstat4.sid
AND statname1.statistic# = sstat1.statistic#
AND statname2.statistic# = sstat2.statistic#
AND statname3.statistic# = sstat3.statistic#
AND statname4.statistic# = sstat4.statistic#
AND statname1.name = 'session pga memory'
AND statname2.name = 'session pga memory max'
AND statname3.name = 'session uga memory'
AND statname4.name = 'session uga memory max'
ORDER BY session_pga_memory DESC
Thanks -
Write the sql query to find largest value in row wise without using great
write the sql query to find largest value in row wise without using
greatest fuction?Another not so good way, considering you want greatest of 4 fields from a single record:
SQL> ed
Wrote file afiedt.buf
1 with t as (Select 100 col1,200 col2,300 col3,400 col4 from dual
2 union select 500,600,700,800 from dual
3 union select 900,1000,1100,1200 from dual
4 union select 1300,1400,1500,1600 from dual
5 union select 1700,1800,1900,2000 from dual
6 union select 2100,2200,2300,2400 from dual
7 union select 2800,2700,2600,2500 from dual
8 union select 2900,3000,3100,3200 from dual)
9 SELECT (CASE WHEN col1 > col2 THEN col1 ELSE col2 END) Max_value
10 FROM
11 (SELECT (CASE WHEN col1_col2 > col2_col3 THEN col1_col2 ELSE col2_col3 END) col1,
12 (CASE WHEN col2_col3 > col3_col4 THEN col2_col3 ELSE col3_col4 END) col2,
13 (CASE WHEN col3_col4 > col4_col1 THEN col3_col4 ELSE col4_col1 END) col3
14 FROM
15 (SELECT (CASE WHEN col1 > col2 THEN col1 ELSE col2 END) col1_col2,
16 (CASE WHEN col2 > col3 THEN col2 ELSE col3 END) col2_col3,
17 (CASE WHEN col3 > col4 THEN col3 ELSE col4 END) col3_col4,
18 (CASE WHEN col4 > col1 THEN col4 ELSE col1 END) col4_col1
19* FROM t))
SQL> /
MAX_VALUE
400
800
1200
1600
2000
2400
2800
3200
8 rows selected.
SQL> Edited by: AP on Sep 21, 2010 6:29 AM -
To find max effdt from a table
i am facing problem in finding max effdt for every employee from a table.
i have to fetch emplid's from a table according to a particular deptid but there are many entries for a employee depending on effdt.I have to fetch the entry which is of max effdt.
i wrote query like dis,is it ok?
select emplid,effdt from ps_job where deptid='10000' and effdt in (select max(effdt) from ps_job group by emplid)You need to correlate the effdt and the empid is some fashion There are a few ways to do this. The closest correct way to what you have is:
SELECT emplid, effdt
FROM ps_job o
WHERE deptid='10000' and
effdt IN (SELECT MAX(effdt) FROM ps_job i
WHERE i.emplid = o.emplid)A one-pass method, assuming you can use analytics would be:
SELECT emplid, effdt
FROM (SELECT emplid, effdt, deptid,
ROW_NUMBER() OVER(PARTITION BY emplid
ORDER BY effdt DESC) rn
FROM ps_job o)
WHERE deptid='10000' and
rn = 1John -
Shell script to find MAX(SEQUENCE#) of primary and standby DB.
Hi All,
AIX 5.3 64bit DB:10.2.0.3.0
I am looking for a shell script which does the following:
Use SQL*Plus to query the MAX(SEQUENCE#) from both databases i.e., Primary and standby V$LOG_HISTORY view. If the STANDBY appears to be falling behind by 2 archive log files,then send alert mail to: [email protected]
We should be able to connect to primary DB from standby DB using ssh
For example: ssh ora<user>@hostname.domain
I use the following query to find out MAX(SEQUENCE#):
col logseq_on_standby new_value V_STDBY_LOGSEQ
select /*+ rule */ max(h.sequence#) logseq_on_standby
from v\$log_history h,
v\$parameter p
where h.thread# = to_number(decode(p.value,'0',1,p.value))
and p.name = 'thread';
Thanks for your time!!
Regards,sent the shell script..
By the way is this hssawan!!!
Please check the shell script and let me know the following:
AIX 5.3 64bit DB:10.2.0.3.0
I am looking for a shell script which does the following:
Use SQL*Plus to query the MAX(SEQUENCE#) from both databases i.e., Primary and standby V$LOG_HISTORY view. If the STANDBY appears to be falling behind by 2 archive log files,then send alert mail to: [email protected]
We should be able to connect to primary DB from standby DB using ssh
For example: ssh ora<user>@hostname.domain
I use the following query to find out MAX(SEQUENCE#):
col logseq_on_standby new_value V_STDBY_LOGSEQ
select /*+ rule */ max(h.sequence#) logseq_on_standby
from v\$log_history h,
v\$parameter p
where h.thread# = to_number(decode(p.value,'0',1,p.value))
and p.name = 'thread';
Thanks for your time!!
Regards, -
How to use ONE query to find out tree structure?
ID------------upperID----------Name------------------------isFolder
1------------ 0---------- Folder
1------------------------------------1
2------------ 1------------ Folder 1- Sub
Folder--------------------1
3------------ 2------------
Folder1-Item1-A--------------------------0
4------------ 1------------ Folder 1- Sub
Item-----------------------0
Hi all, if I have a table like above to demonstrate the
folders and item relationship. This structure allows the user to
create unlimited folders and items.
Now I would like to use one query to find out the tree
structure of this table, how could I do the query.
Any help on this will be highly appreciated!
Thanks,
ezAlso, see this thread:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=12 55788&enterthread=y -
Looking for a query to find first/last dates in overlapping dates...
Hi,
I'm looking for a query to find the first dates and last dates in a table conaining overlapping dates.
I have a subscription table which has for each Customer start and end date for different subscriptions.
I want to know the different ranges of date where there is subscriptions active.
so if the table has this:
CustID, Start date, end date
1, 2008-01-01, 2012-06-06
1 ,2009-01-01, 2011-01-01
1, 2011-01-01, 2013-02-02
1, 2013-01-01, 2013-08-08
1, 2014-01-01, 2014-04-04
I want to produce this result:
custid, range start, range end
1, 2008-01-01, 2013-08-08
1, 2014-01-01, 2014-04-04
the first row is the range identified from the 4 rows in my subscription table.
thanks :)I think I found it...
http://stackoverflow.com/questions/5213484/eliminate-and-reduce-overlapping-date-ranges
let me try this method
Hi,
m writing to follow up with you on this post. Thanks for you posting a reply to share your workground. Was the problem resolved after performing the above link? If you are satisfied with the above solution, I’d like to mark this issue as "Answered".
Please also feel free to unmark the issue, with any new findings or concerns you may have.
Thanks,
Sofiya Li
If you have any feedback on our support, please click here.
Sofiya Li
TechNet Community Support -
Hyp FR Error: 5200 : Error executing query. Exceed max row number 100000
Hi,
I am getting the error
5200 : Error executing query. Exceed max row number 100000
when I run the report on Financial Reporting. It gives the same error when run on Workspace.
Have you guys encountered this error before? What are the best ways to tackle it? Help is much appreciated guys.
-- Adi
Edit 1 - I tried to simplify the parameters but I still get the same error making me suspect that the issue is not the 100000 row issue.
Edited by: Aditya26 on Apr 11, 2012 9:02 AMHi Adi,
This is from My Oracle Support:
How to Increase Row Limit to Avoid Error "Exceed Max Row Number 100000" [ID 866832.1]
Modified 23-FEB-2012 Type HOWTO Status PUBLISHED
In this Document
Goal
Solution
Applies to:
Hyperion BI+ - Version: 9.3.1.0.00 to 11.1.1.3.00 - Release: 9.3 to 11.1
Information in this document applies to any platform.
Goal
How do you increase the maximum row limit to avoid the error "5200: Error executing query: Exceed max row number 100000"?
Solution
1.Edit \Hyperion\common\ADM\<version>\lib\ADM.properties as follows:
From MAX_ROW_NUMBERS=100000 to MAX_ROW_NUMBERS=500000
If you are running extremely large reports, you can increase the limit.
2.Restart Reporting and Analysis services.
For version 11.1.2.x
The path of ADM.properties file in these versions should be located under:
%Oracle_Home%\Middleware\EPMSystem11R1\commo\ADM\11.1.2.0\lib
Cheers,
Mehmet -
Query to find the list of users having access to a particular scenario
Hi,
I am learning Hyperion Planning 9.2 x version. I wanted to know the query to find the list of users having access to Plan Iteration - 1 scenarion.
As I am new to Hyperion Essbase and Hyperion Planning, I am assuming these ideas work out to get the desired result.
1) As Hyperion Planning uses Relational DB to store the User Security information, we can query the list of users who is having access to Plan Iteration - 1 Scenario.
I am not sure if this solution works. Please correct me If I am wrong.
2) We can also query from the essbase editor to find out who all having access to this scenario.
If the above is correct, can you please provide me the query.
I am really need of this and I will be happy if any one provide the solution.
Thanks & Regards,
Upendra. BesthaHi,
If you are looking for some SQL to retrieve the access rights by member then you can use something like (SQL Server code though can easily be modified for Oracle)
SELECT usr.object_name as Username,mem.object_name as Member,
'Access Rights' = CASE acc.access_mode
WHEN -1 THEN 'None'
WHEN 1 THEN 'Read'
WHEN 2 THEN 'Write'
WHEN 3 THEN 'Write'
ELSE 'Unknown' END,
'Relation' = CASE acc.flags
WHEN 0 THEN 'Member'
WHEN 5 THEN 'Children'
WHEN 6 THEN 'Children (inclusive)'
WHEN 8 THEN 'Descendants'
WHEN 9 THEN 'Descendants (inclusive)'
ELSE 'Unknown' END
FROM
hsp_access_control acc, hsp_object mem, hsp_object usr
WHERE acc.object_id = mem.object_id
AND acc.user_id = usr.object_id
AND mem.object_name = 'Plan Iteration - 1'
Cheers
John
http://john-goodwin.blogspot.com/
Maybe you are looking for
-
How can I change the Apple ID on one phone but the other. Right now they both use the same ID.
-
Exporting DXF with Coordinates Illustrator to CAD program
Hi, I often have to export graphics from Illustrator CS5 for use in Catia or Pro Engineer. Usually, if it's a graphic I have made myself, all I do is drag the 0,0 on my rulers to the position on the artwork where I require the coordinate system to be
-
In process quality inspection in operation of a process order
Hi, PP-PI inprocess quality inspection at operation level I am creating a process order having two operation. the first is quality inspection (inprocess inspection) & last is related to consumption of some materials. The control key in operations are
-
He underlying connection was closed: An unexpected error occurred on a rece
hi all , very good morning i am getting the error for run the sample program for DI server sales Quotation. Database sqlserver 2008 thanks & Regards B.Lakshmi Narayanan
-
User exit in after posting MIGO
All experts: do there some user exit after posting the MIGO, I want to posting the goods receipts data to other Transaction code after do the MIGO at one time, thank you for advance.