SQL query to get the responsibility name
Hi,
I require an SQL query which would give the responsibilty name to which the concurrent programs are assigned.
Thanks& Regards,
SELECT fcpv.user_concurrent_program_name
FROM fnd_request_groups frg,
fnd_request_group_units frgu,
fnd_concurrent_programs_vl fcpv,
fnd_responsibility_vl frv
WHERE frgu.request_group_id = frg.request_group_id
AND frgu.request_unit_id = fcpv.concurrent_program_id
AND frv.request_group_id = frg.request_group_id
AND frgu.request_unit_type = 'P'
AND frv.responsibility_name =<Responsibility Name>Regards
Prashant Pathak
Similar Messages
-
SQL query to get the Datetime 06 hours prior to the table Datetime value
Hi Experts,
I'm just trying to create a SQL query to get the Datetime which should be 06 hours prior to my Table column value(Executiontime),
Eg: my Executiontime(column) value is 07:00AM means, this query should fetch the detail of first VMName from table at 01:00AM,
SQL Table Name: TestTable
Columns: VMName(varchar),status(varchar) Executiontime(Datetime)
SQL Query : Select Top 1 VMName from
TestTable where convert(date,Exeutiontime)=convert(date,getdate()) and
status='0' and ExecutionTime > dateadd(hour,6,getdate())
Request someone to alter this Query to my requirement or give me the new one.
Regards,
Sundar
SundarHi All,
Thanks for your Prompt response. I tried the below queries, but still I don't have any luck. Actually the queries are returning the value before the condition met (say when the time difference is more than 06 hours). I want the
query to return exactly @ 06 hour difference or less than 06 hours,
Query 01: Select Top 1 VMName from TestTable where
convert(date,Exeutiontime)=convert(date,getdate())
and status='0'
and ExecutionTime >
dateadd(hour,-6,getdate())
Query 02: Select
Top 1 VMName from TestTable where
status='0'
and ExecutionTime >
dateadd(hour,-6,getdate())
Query 03: Select
Top 1 VMName from TestTable where status='0'
and ExecutionTime >
dateadd(hour,-6,ExecutionTime)
Can someone point out the mistake please.
Regards,
Sundar
Sundar -
SQL query to get the list of approvals
Hi,
Could someone let me know the SQL query to get the list of all the pending approvals for a user in OIM 11g R2.
ThanksThere are a few ways to do this:
- The easiest would be to use a Relationship Query from the CMC. To do this, go to the Universes section on the CMC, right click on the relevant universe, select tools >> Check Relationships.
- Use Query Builder. You will need more than one query to pull the information you need. You could try something like the below (for Webi)
SELECT SI_NAME, SI_WEBI, SI_DATACONNECTION FROM CI_APPOBJECTS
WHERE SI_KIND = 'universe' and SI_NAME = 'Universe Name'
This will give you a list of Webi Reports by SI_ID.
You'll need another query to list Webi report names:
SELECT SI_NAME FROM CI_INFOOBJECTS WHERE SI_ID IN (SI_ID from query above)
- This is trivial via Auditing / the Activity universe. This of course will only return reports that have already run.
Best.
Srinivas -
SQL Query to get Project Plan Name and Resource Name from Reporting database of Project Server 2007
Can you please help me to write an SQL Query to get Project Plan Name and Resource Name from Reporting database of Project Server 2007. Thanks!!
Refer
http://gallery.technet.microsoft.com/projectserver/Server-20072010-SQL-Get-a99d4bc6
SELECT
dbo.MSP_EpmAssignment_UserView.ProjectUID,
dbo.MSP_EpmAssignment_UserView.TaskUID,
dbo.MSP_EpmProject_UserView.ProjectName,
dbo.MSP_EpmTask_UserView.TaskName,
dbo.MSP_EpmAssignment_UserView.ResourceUID,
dbo.MSP_EpmResource_UserView.ResourceName,
dbo.MSP_EpmResource_UserView.ResourceInitials
INTO #TempTable
FROM dbo.MSP_EpmAssignment_UserView INNER JOIN
dbo.MSP_EpmProject_UserView ON dbo.MSP_EpmAssignment_UserView.ProjectUID = dbo.MSP_EpmProject_UserView.ProjectUID INNER JOIN
dbo.MSP_EpmTask_UserView ON dbo.MSP_EpmAssignment_UserView.TaskUID = dbo.MSP_EpmTask_UserView.TaskUID INNER JOIN
dbo.MSP_EpmResource_UserView ON dbo.MSP_EpmAssignment_UserView.ResourceUID = dbo.MSP_EpmResource_UserView.ResourceUID
SELECT
ProjectUID,
TaskUID,
ProjectName,
TaskName,
STUFF((
SELECT ', ' + ResourceInitials
FROM #TempTable
WHERE (TaskUID = Results.TaskUID)
FOR XML PATH (''))
,1,2,'') AS ResourceInitialsCombined,
STUFF((
SELECT ', ' + ResourceName
FROM #TempTable
WHERE (TaskUID = Results.TaskUID)
FOR XML PATH (''))
,1,2,'') AS ResourceNameCombined
FROM #TempTable Results
GROUP BY TaskUID,ProjectUID,ProjectName,TaskName
DROP TABLE #TempTable
-Prashanth -
SQL Query to get the # of files in folders in a library
Anyone has the SQL query to list the number of files in each folders in a SharePoint library?
Technically it's a grey area of support as MS don't mind you doing it but won't help you if you encounter problems, the script is much better though.
Scratch that, the script isn't that good. It's using .items which won't work on large lists and is slow. The version below is untested but should be significantly faster and work on large lists.
$starttime = Get-Date
#Creating new site object
$siteurl = Read-Host "Enter the name of your site and press enter"
$site = New-Object Microsoft.SharePoint.SPSite($siteurl)
#Assigning all webs (sites) to $webs
$webs = $site.Allwebs
#System Libraries defined so they won't be touched##
$systemlibs =@("Converted Forms", "Customized Reports", "Documents", "Form Templates",
"Images", "List Template Gallery", "Master Page Gallery", "Pages",
"Reporting Templates", "Site Assets", "Site Collection Documents",
"Site Collection Images", "Site Pages", "Solution Gallery",
"Style Library", "Theme Gallery", "Web Part Gallery", "wfpub")
Write-Host "Total number of webs that will be traversed: " $webs.count
$DocLibsCount = 0
$DocLibwItems = 0
$totalitems = 0
$subfolderitems = 0
foreach($web in $webs)
$listcoll = $web.lists
foreach($list in $listcoll)
if($list -eq $null)
Write-Host
else
$base = $list.GetType()
if($base.name -eq "SPDocumentLibrary")
if ($systemlibs -contains $list)
{ continue}
else
$DocLibsCount += 1
$totalitems += $List.itemcount
$name = $list.Title
$folders = $web.GetFolder($name).SubFolders
for($etr = 0;$etr -lt $folders.count; $etr++)
if($folders[$etr].Name -ne "Forms")
Write-Host "Processing SubFolder ItemCount" -ForegroundColor Red
$tempcount = $folders[$etr].ItemCount
$subfolderitems += $tempcount
Write-Host
Write-Host
Write-Host "Total # of Document Libraries: " $DocLibsCount -ForegroundColor Green
Write-Host "Total # of Document Libraries that contain items: " $DocLibwItems -ForegroundColor Green
Write-Host "Total # of items: " $totalitems -ForegroundColor Green
Write-Host "Total # of items in DocLib\Subfolders: " $subfolderitems -ForegroundColor Green
$finishtime = Get-Date
Write-Host
Write-Host “Script Duration” –ForegroundColor Yellow
Write-Host “Started: “ $starttime –ForegroundColor Yellow
Write-Host “Finished: “ $finishtime –ForegroundColor Yellow
Stop-SPAssignment -Global -
OIM sql Query for getting the status of the task which got failed
Hi Everyone,
We have a requirement like we need to get the status of a particular task(say Create User in OID resource - Completed\Rejected status) for the particular user.We are able to get the status of the resource provisioed to the user but not the status of the particular task getting trigerred for the user.can someone put some light on this.We need to get the SQL query for this.
Thanks in Advance.
Regards,
MKNHi
Use this sample query to get the task status, also check the cooments
SELECT USR.USR_LOGIN, OSI.SCH_KEY,SCH.SCH_STATUS,STA.STA_BUCKET FROM
OSI,SCH,STA,MIL,TOS,PKG,OIU,USR,OBJ,OST
WHERE OSI.MIL_KEY=MIL.MIL_KEY
AND SCH.SCH_KEY=OSI.SCH_KEY
AND STA.STA_STATUS=SCH.SCH_STATUS
AND TOS.PKG_KEY=PKG.PKG_KEY
AND MIL.TOS_KEY=TOS.TOS_KEY
AND OIU.USR_KEY=USR.USR_KEY
AND OIU.OST_KEY=OST.OST_KEY
AND OST.OBJ_KEY=OBJ.OBJ_KEY
AND OSI.ORC_KEY=OIU.ORC_KEY
AND OBJ.OBJ_NAME='AD User'
AND OST.OST_STATUS = 'Provisioning' -- filter accordinglly
AND STA.STA_BUCKET = 'Pending' -- filter accordinglly
AND PKG.PKG_NAME='AD User' -- filter accordinglly
AND MIL.MIL_NAME='System Validation' ---- filter accordinglly
Thanks,
Kuldeep -
SQL query to get the monitor target on a monitor
Hi!
I have a list of some custom created Monitors. I need a list of which computers that are using the monitors, the "Monitor target". Please help me with this. It need to be a SQL Query because my powershell have stopped working.Yes that is what i have explained you with the screenshot right it is the one in your screen shot also which is mentioned as (This). If this is a default group then you will not get agents for that refer the below link on how to pull agent list of the Target
group
http://msdn.microsoft.com/en-us/library/bb960484.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
Or look at this. You can see what groups the agents are associated manually one by one by using the default SCOM Task.
Go to Administration==> Agent managed==> Select the agent ==> Right click it and click View ==> Select state view.
Once you select this you will have another window opened for that particular agent.
Then click on the name of the agent and on the right hand side bottom you will have a default made task to check to what group's or Targets this agent is associated to. Run that task and you will get the output.
Look at the ones highlighted in RED
Below is the screenshot for your reference. Hope this helps
Gautam.75801 -
SQL query to get the without SCCM agent for a Server
Hello every one,
Can I get the SQL query for a server without a SCCM agent .Here you go!!
Add the version for windows 2012 server if you have them as well in your environment
v_R_System.Netbios_Name0
,v_R_System.Full_Domain_Name0
,v_R_System.User_Name0
,case
When v_R_System.Operating_System_Name_and0 LIKE N'%Server 6.1'THEN 'Windows Server 2008 R2'
When v_R_System.Operating_System_Name_and0 LIKE N'%Server 6.0'THEN 'Windows Server 2008'
When v_R_System.Operating_System_Name_and0 LIKE N'%Server 5.2'THEN 'Windows Server 2003 R2'
ELSE 'Unknown Version' END AS 'OS version'
FROM
v_R_System
WHERE
v_R_System.Operating_System_Name_and0 LIKE N'%server%' and v_R_System.Client0 is null
Kindly mark as answer/Vote as helpful if a reply from anybody helped you in this forum. Delphin -
SQL Query to get the desired result
Can someone give the SQL to get this output.
input is like this in table.
cola colb fromdate todate
1 100 1/5/2010 1/9/2010
1 101 1/10/2010 1/25/2010
1 102 1/26/2010 12/31/2900
2 201 3/1/2011 3/10/2011
2 202 3/11/2011 12/31/2900
3 301 1/5/2010 1/9/2010
3 302 1/10/2010 1/25/2010
3 303 1/26/2010 1/28/2010
3 304 1/29/2010 12/31/2900
I want to get the output like this.
cola colb fromdate todate
1 100 1/5/2010 1/9/2010
2 201 3/1/2011 3/10/2011
3 301 1/5/2010 1/9/2010
More info:
I want to get the rows where fromdate is the min(fromdate) from each cola's unique values i.e. 1,2,3
Please let me know the SQL.
Thanks.
[email protected]This way!!!
with data(cola, colb, st_dt, ed_dt) as
select 1, 100, to_date('01/05/2010', 'MM/DD/YYYY'), to_date('01/09/2010', 'MM/DD/YYYY') from dual union all
select 1, 101, to_date('01/10/2010', 'MM/DD/YYYY'), to_date('01/25/2010', 'MM/DD/YYYY') from dual union all
select 1, 102, to_date('01/26/2010', 'MM/DD/YYYY'), to_date('12/31/2900', 'MM/DD/YYYY') from dual union all
select 2, 201, to_date('03/01/2011', 'MM/DD/YYYY'), to_date('03/10/2011', 'MM/DD/YYYY') from dual union all
select 2, 202, to_date('03/11/2011', 'MM/DD/YYYY'), to_date('12/31/2900', 'MM/DD/YYYY') from dual union all
select 3, 301, to_date('01/05/2010', 'MM/DD/YYYY'), to_date('01/09/2010', 'MM/DD/YYYY') from dual union all
select 3, 302, to_date('01/10/2010', 'MM/DD/YYYY'), to_date('01/25/2010', 'MM/DD/YYYY') from dual union all
select 3, 303, to_date('01/26/2010', 'MM/DD/YYYY'), to_date('01/28/2010', 'MM/DD/YYYY') from dual union all
select 3, 304, to_date('01/29/2010', 'MM/DD/YYYY'), to_date('12/31/2900', 'MM/DD/YYYY') from dual
select cola, colb, st_dt, ed_dt
from (
select cola, colb, st_dt, ed_dt,
row_number() over (partition by cola order by st_dt) rn
from data
) a
where a.rn = 1;
COLA COLB ST_DT ED_DT
1 100 05-JAN-10 09-JAN-10
2 201 01-MAR-11 10-MAR-11
3 301 05-JAN-10 09-JAN-10 -
Need SQL query to get the result.
Region
Month
Trx Type
Resolution Summary
AMERICAS
May-13
Adjustments
Correct
EMEA
May-13
Adjustments
Incorrect
AMERICAS
May-13
Credit Memo
Incorrect
EMEA
May-13
Invoice
Correct
AMERICAS
May-13
Credit Memo
Correct
OFD
May-13
Adjustments
Correct
AMERICAS
May-13
Invoice
Incorrect
LAD
May-13
Adjustments
Correct
LAD
May-13
Adjustments
Correct
OFD
May-13
Adjustments
Correct
Above is my Table and find below the required result.Similarly for other regions as well. Can anyone help me with the SQL Query?
Region
Resolution Summary
Adjustment
Credit Memo
Invoice
Grand Total
AMERICAS
Correct
1
1
2
Incorrect
0
1
1
2Like this?
SQL> select * from transaction_audit;
REGION MTH TRX_TYPE RESOLUTIO
AMERICAS may-13 ADJUSTMENTS CORRECT
EMEA may-13 ADJUSTMENTS INCORRECT
AMERICAS may-13 CREDIT MEMO INCORRECT
EMEA may-13 INVOICE CORRECT
AMERICAS may-13 CREDIT MEMO CORRECT
OFD may-13 ADJUSTMENTS CORRECT
AMERICAS may-13 INVOICE INCORRECT
LAD may-13 ADJUSTMENTS CORRECT
LAD may-13 ADJUSTMENTS CORRECT
OFD may-13 ADJUSTMENTS CORRECT
10 rows selected.
SQL> select region
2 , resolution_summary
3 , count(decode(trx_type, 'ADJUSTMENTS', trx_type)) adjustments
4 , count(decode(trx_type, 'CREDIT MEMO', trx_type)) credit_memo
5 , count(decode(trx_type, 'INVOICE' , trx_type)) invoice
6 from transaction_audit
7 group
8 by region
9 , resolution_summary
10 order
11 by region
12 , resolution_summary
13 /
REGION RESOLUTIO ADJUSTMENTS CREDIT_MEMO INVOICE
AMERICAS CORRECT 1 1 0
AMERICAS INCORRECT 0 1 1
EMEA CORRECT 0 0 1
EMEA INCORRECT 1 0 0
LAD CORRECT 2 0 0
OFD CORRECT 2 0 0
6 rows selected.
SQL> -
Regarding FMS query to get the account name and get it in the report
Dear all,
I have created a FMS query to pick the G/L account name in the payment voucher,But the name which i got through the FMS in an UDF is not coming properly.It comes only if am manually entering Shift+F2 in that field.
Pls give me a suggestion for that.
The FMS query is.
SELECT T1.[AcctName] FROM VPM1 T0 INNER JOIN OACT T1 ON T0.CheckAct = T1.AcctCode INNER JOIN OVPM T2 ON T0.DocNum = T2.DocEntry WHERE T2.[DocNum] = $[ovpm.docnum]hi,
try this:
SELECT T0.AcctName FROM OACT T0 WHERE T0.AcctCode=$[VPM1.CheckAct]
Thanks,
Neetu -
Hi There,
I want to append the SERVICE name to my email subject sent using UTL_SMTP. I am running it within PL/SQL so that it can change based on the instance. I can do a V$instance, but that shows the sid and not the service name.
Thankssys_context is the function which gives you such info:
SELECT sys_context('USERENV', 'SERVICE_NAME') FROM DUAL;Cheers,
Manik. -
I want a sql query to diffrentiate the column names between two schemas
The structure of the dba_tab_cols table is owner, table_name, column_name, data_type,.....
So I have a ACCT_ALT_ID table under owner SEODS01 and in that therse are column names
IBD_ID
ACCT_ALT_ID_CNTX_CDE
EODS_ACCT_ID
DATA_GRP_CDE
UPDT_DTE
AND I have a ACCT_ALT_ID table under owner SEODS02 and in that therse are column names
IBD_ID
ACCT_ALT_ID_CNTX_CDE
EODS_ACCT_ID
DATA_GRP_CDE
CRTE_PGM
CRTE_TSTP
UPDT_PGM
UPDT_TSTP
so I want select query to display like this
SEODS1_ACCT_ALT_ID SEODS02_ACCT_ALT_ID (COLUMN HEADER)
IBD_ID IBD_ID
ACCT_ALT_ID_CNTX_CDE ACCT_ALT_ID_CNTX_CDE
EODS_ACCT_ID EODS_ACCT_ID
DATA_GRP_CDE DATA_GRP_CDE
UPDT_DTE CRTE_PGM
CRTE_TSTP
UPDT_PGM
UPDT_TSTP
AND ALSO I NEED ONE MORE QUERY THAT I DO NOT WANT DISPLAY HAVING SAME COLUMN_NAME LIKE ACCT_ALT_ID_CNTX_CDE ,EODS_ACCT_ID,IBD_ID
DATA_GRP_CDEHi,
Welcome to the forum!
876793 wrote:
The structure of the dba_tab_cols table is owner, table_name, column_name, data_type,.....
So I have a ACCT_ALT_ID table under owner SEODS01 and in that therse are column names
IBD_ID
ACCT_ALT_ID_CNTX_CDE
EODS_ACCT_ID
DATA_GRP_CDE
UPDT_DTE
AND I have a ACCT_ALT_ID table under owner SEODS02 and in that therse are column names
IBD_ID
ACCT_ALT_ID_CNTX_CDE
EODS_ACCT_ID
DATA_GRP_CDE
CRTE_PGM
CRTE_TSTP
UPDT_PGM
UPDT_TSTP
so I want select query to display like this
SEODS1_ACCT_ALT_ID SEODS02_ACCT_ALT_ID (COLUMN HEADER)
IBD_ID IBD_ID
ACCT_ALT_ID_CNTX_CDE ACCT_ALT_ID_CNTX_CDE
EODS_ACCT_ID EODS_ACCT_ID
DATA_GRP_CDE DATA_GRP_CDE
UPDT_DTE CRTE_PGM
CRTE_TSTP
UPDT_PGM
UPDT_TSTPYou may have noticed that this site normally doesn't display multiple spaces in a row.
Whenever you post formatted text (such as query results) on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
That way, your message will look like this:SEODS1_ACCT_ALT_ID SEODS02_ACCT_ALT_ID (COLUMN HEADER)
IBD_ID IBD_ID
ACCT_ALT_ID_CNTX_CDE ACCT_ALT_ID_CNTX_CDE
EODS_ACCT_ID EODS_ACCT_ID
DATA_GRP_CDE DATA_GRP_CDE
UPDT_DTE CRTE_PGM
CRTE_TSTP
UPDT_PGM
UPDT_TSTP
This sounds like a jon for a FULL OUTER JOIN:SELECT s1.column_name AS seods1_acct_alt_id
, s2.column_name AS seods2_acct_alt_id
FROM dba_tab_cols s1
FULL OUTER JOIN dba_tab_cols s2 ON s1.column_name = s2.column_name
WHERE s1.owner = 'SEODS1'
AND s1.table_name = 'ACCT_ALT_ID'
AND s2.owner = 'SEODS2'
AND s2.table_name = 'ACCT_ALT_ID'
AND ALSO I NEED ONE MORE QUERY THAT I DO NOT WANT DISPLAY HAVING SAME COLUMN_NAME LIKE ACCT_ALT_ID_CNTX_CDE ,EODS_ACCT_ID,IBD_ID
DATA_GRP_CDESorry, I don;t understand.
Post the results you want (formatted, between \ tags, of course).
Do you want only the column names that appear in one table or the other, but not in both?
In that case, you can add a condition like this to the WHERE clause:
AND ( s1.column_name IS NULL
OR s2.column_name IS NULL
) -
SQL query to get the current session info
I've a query in my application to view the all the sessions within database
select
substr(a.spid,1,9) pid,
substr(b.sid,1,5) sid,
substr(b.serial#,1,5) ser#,
substr(b.machine,1,6) box,
substr(b.username,1,10) username,
-- b.server,
substr(b.osuser,1,8) os_user,
substr(b.program,1,30) program
from
v$session b,
v$process a
where
b.paddr = a.addr
and type='USER'
order by spid;
Can someone help me with a query to view the info of the session where I'm in currently?
Thanks,
Gabriel Stephen.here's one way to do it.
select
substr(a.spid,1,9) pid,
substr(b.sid,1,5) sid,
substr(b.serial#,1,5) ser#,
substr(b.machine,1,6) box,
substr(b.username,1,10) username,
-- b.server,
substr(b.osuser,1,8) os_user,
substr(b.program,1,30) program
from
v$session b,
v$process a
where
b.paddr = a.addr
and type='USER'
and b.sid=(select sid from v$mystat where rownum=1)
order by spid-------------
Anwar -
What is the sql query to know the database name having known table name?
when i am running the following query....error coming
select * from information_schema.tables where table_name = 'articles'
Error starting at line 1 in command:
select * from information_schema.tables where table_name = 'articles'
Error at Command Line:1 Column:33
Error report:
SQL Error: ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist"
*Cause:
*Action:
i am running the above query in SQLDeveloper tool against ORACLE database
plz give alternate solution.Hi,
select * from information_schema.tables where table_name = 'articles'You are trying query view ( information_schema.tables ) from MSSQL on ORACLE??!!
Each RDBMS have your own data dictionary... you must check documention of ORACLE to query the properly data dictionary.
Try it:
select * from users_tables where table_name = 'articles'
or
select * from all_tables where table_name = 'articles'
or
select * from dba_tables where table_name = 'articles'http://docs.oracle.com/cd/E11882_01/server.112/e25494/general011.htm#ADMIN11564
Regards,
Levi Pereira
Maybe you are looking for
-
I want to update to LION,on my Macbook Pro CORE 2 DUO, (october 2006) because Adobe CC needs at least that. I know my computer is old, but works perfect to me and I do not want to stay in Adobe CS6 since I have access to Adobe Cloud CC. Please help.
-
Adobe Camera Raw Save Settings and Lens Profile Corrections Help
I have been fooling around with Adobe Camera Raw's (ACR) ability to save settings so that I can apply them to other images. I'm able to set things such as clarity, vibrance, camera profile etc. What I want to do is enable Lens Profile Corrections and
-
Effect on PI Existing Scenarios When Java is Upgraded.
Hi Folks, In my PI 7.0 Quality Server, JAVA is upgraded by basis. Will it effect any existing PI Scenarios in PI Quality. If Yes, Please suggest me any solution. why because they are also planning to do java upgradation for PI Production . Thanks, Di
-
Error with OpenSearch result source in Sharepoint online
I have error with result sources that use the Opensearch protocol. I add them via Site Settings -> Edit Result Source -> New Result Source but everytime I test them in the Result Sources list I get error saying key is null or empty Parameter name: ke
-
Having problems with outlook 2007
I got outlook 2007 and am using it to receive my gmail account email and when it downloads a new message it deletes it from my phone. Does anyone have a fix for this?