Get the 10 questions back to the top using a query
Version 11g, Apex 4.1Hello
I have a table with the following structure
error_code date error_type
e1 10-jun-2012 P
e1 10-jun-2012 P
e2 10-jun-2012 C
e3 09-jun-2012 P
e4 09-jun-2012 D
.
.
e20 01-jan-2011 c
I have to get the top 10 mistakes as well as charges.I know how to get the counts, I don't know how he limited to the top 10 of the entire list
Thank you
Sun
Published by: sun1977 on June 12, 2012 06:13
Try something like that.
select error_code, cnt
from (
select error_code, cnt, rank() over(order by cnt) rk
from (
select error_code, count(*) cnt
from
)
)
where rk <= 10
Untested code
Tags: Database
Similar Questions
-
How to get the result using this query?
Hi using iam under query,
WITH CTE (SNO, ID, PNT)
AS
(SELECT ROWNUM as SNO, TRANS_ID, VCN_NO OF)
SELECT V.TRANS_ID, V.VCN_NO IN VSL_MOVES V
WHERE V.END_TIME > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24')) AND V.END_TIME < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24'))
AND V.MOVEMENT_TYPE_CODE NOT IN ORDER ("ATA") OF V.VCN_NO, V.END_TIME))
SELECT ROWNUM as SNO, TAB. VESSEL_NAME, TAB. FLAG, TAB. IMO_NO, TAB. ARRIVED_DATE, TAB. F_ROM,
NVL ((SELECT CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT TO_CHAR (NBV. ATD, "DD/MM/YYYY HH24") OF PNTS WHERE NBV. DOC_NO = TAB. VCN_NO AND ROWNUM < = 1) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT TO_CHAR (VBU. BRTH_ALL_FAST, "DD/MM/YYYY HH24") OF VSL_BERTH_UNBERTH VBU WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. (T_ID),'-') Sailed_Date,.
NVL ((SELECT CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT P.PORT_NAME OF RRS, PORT_MASTER P WHERE P.PORT_CODE = PNT. VSL_NXT_PRT_CALL AND PNT. DOC_NO = TAB. VCN_NO) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT CASE WHEN VBU. BERTH_CODE LIKE "% VOPK" AND THEN "VOPAK" WHAT VBU. BERTH_CODE AS "VSPM %" THEN "VOPAK" ELSE "POF" VBU VSL_BERTH_UNBERTH END WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. (T_ID), "-") DESTINATION
DE)
SELECT
VM. TRANS_ID,
VM. VCN_NO,
VM. MOVEMENT_TYPE_CODE,
(SELECT PNT. VSL_NAME OF PNTS WHERE NBV. DOC_NO = VM. VCN_NO AND ROWNUM < = 1) VESSEL_NAME;
(SELECT C.COUNTRY_NAME OF COUNTRY C, VESSEL_MASTER M WHERE C.COUNTRY_CODE = M.FLAG AND M.VSL_CODE = VM. VSL_CODE AND ROWNUM < = 1) AS FLAG,.
(SELECT M.VSL_IMO_NO FROM VESSEL_MASTER M WHERE M.VSL_CODE = VM. VSL_CODE AND ROWNUM < = 1) IMO_NO;
TO_CHAR (VM. END_TIME, "DD/MM/YYYY HH24") ARRIVED_DATE,.
WHEN VM BOX. MOVEMENT_TYPE_CODE = 'STA' THEN (SELECT P.PORT_NAME FROM RRS, PORT_MASTER P WHERE P.PORT_CODE = PNT. LST_PORT_CALL AND PNT. DOC_NO = VM. VCN_NO AND ROWNUM < = 1) WHEN VM. MOVEMENT_TYPE_CODE = 'UTA' THEN (SELECT VB. VSL_BERTH_UNBERTH VB BERTH_CODE WHERE VB. UNBERTH_TRANS_ID = VM. TRANS_ID AND ROWNUM < = 1) END F_ROM.
--(SELECT T2.ID DELE DE CTE T1 JOIN CTE T2 SUR T1.) SNO = T2. SNO + 1 WHERE T1.ID = VM. TRANS_ID AND T1. NBV = VM. VCN_NO AND T2. NBV = VM. ATD VCN_NO)
(SELECT T1.ID CTE T1 WHERE SNO = (SELECT T2. SNO + 1 ETC T2 WHERE T2.ID = VM. TRANS_ID AND T2. NBV = VM. T_ID VCN_NO))
OF VSL_MOVES VM
WHERE (VM. End_time > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24')) AND VM. End_time < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24')) or
((CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT TO_CHAR (NBV. ATD, "DD/MM/YYYY HH24") OF PNTS WHERE NBV. DOC_NO = TAB. VCN_NO AND ROWNUM < = 1) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT TO_CHAR (VBU. BRTH_ALL_FAST, "DD/MM/YYYY HH24") OF VSL_BERTH_UNBERTH VBU WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. Saileddate T_ID)) > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24')) and
(CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT TO_CHAR (NBV. ATD, "DD/MM/YYYY HH24") OF PNTS WHERE NBV. DOC_NO = TAB. VCN_NO AND ROWNUM < = 1) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT TO_CHAR (VBU. BRTH_ALL_FAST, "DD/MM/YYYY HH24") OF VSL_BERTH_UNBERTH VBU WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. T_ID) saileddate) < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24')))
--(Sailed_Date > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24 ')) AND Sailed_Date < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24')))
AND VM. MOVEMENT_TYPE_CODE IN ('STA', "UTA")
) TAB
now my Question is should I include Sailed date also starttime and endtime (ex: date range of pStartDate and pEndDate I need to display the date sailed respected records)
I mean the problem is solved, I found the solution
docks of pof-
WITH CTE (SL, VCN_NO, VESSEL_NAME, FLAG, IMO_NO, ARRIVED, FROM_, MOVEMENT_TYPE_, NEXT_MOVE, SAILED_DATE, DESTINATION, FID, TID)
AS
(SELECT T1.*,
WHEN T1 BOX. FROM_ = 'POF' THEN 1 OTHER 2 END FID,
WHEN T1 BOX. DESTINATION = "POF" THEN 1 OTHER 2 END TID
Of
(
SELECT ROW_NUMBER() OVER (PARTITION OF VM. VCN_NO ORDER BY VB. (SL BRTH_ALL_FAST),
VM. VCN_NO,
(SELECT M.VSL_NAME FROM VESSEL_MASTER M WHERE M.VSL_CODE = VM. VESSEL_NAME VSL_CODE),
(SELECT C.COUNTRY_NAME OF COUNTRY C, VESSEL_MASTER M WHERE C.COUNTRY_CODE = M.FLAG AND M.VSL_CODE = VM. VSL_CODE AND ROWNUM< =1="" )="" as="">
(SELECT M.VSL_IMO_NO FROM VESSEL_MASTER M WHERE M.VSL_CODE = VM. IMO_NO VSL_CODE),
VB. BRTH_ALL_FAST HAS ARRIVED,
(CASE WHEN VM. MOVEMENT_TYPE_CODE = 'ATB' THEN 'ANCHORAGE' WHAT VM. MOVEMENT_TYPE_CODE = "LTB" THEN 'LAND' WHEN VM. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. UNBERTH_TRANS_ID = VB. BERTH_TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE NOT IN ("VOPAK", "SPM")) THEN 'POF' WHEN VM. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. UNBERTH_TRANS_ID = VB. BERTH_TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE IN ("VOPAK", "SPM")) THEN "VOPAK" OTHER (SELECT P.PORT_NAME FROM RRS, P PORT_MASTER WHERE P.PORT_CODE = PNT. LST_PORT_CALL AND PNT. DOC_NO = VM. FROM_ VCN_NO END)).
VM. MOVEMENT_TYPE_CODE,
(SELECT THE VIRTUAL COMPUTERS. VSL_MOVES VMS MOVEMENT_TYPE_CODE WHERE VMS. TRANS_ID = VB. NEXT_MOVE UNBERTH_TRANS_ID),
VB. UB_LST_LNE_CASTOFF SAILED_DATE,
NVL ((SELECT CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'UTA' THEN 'ANCHORAGE' WHAT VMS. MOVEMENT_TYPE_CODE = 'BTL' THEN 'LAND' WHEN VMS. MOVEMENT_TYPE_CODE = "UTS" THEN (SELECT P.PORT_NAME FROM RRS, PORT_MASTER P WHERE P.PORT_CODE = PNT. VSL_NXT_PRT_CALL AND PNT. DOC_NO = VMS. VCN_NO) WHEN VMS. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. BERTH_TRANS_ID = VMS. TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE NOT IN ("VOPAK", "SPM")) THEN 'POF' WHEN VMS. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. BERTH_TRANS_ID = VMS. TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE IN ("VOPAK", "SPM")) THEN "VOPAK" OTHERWISE NULL END VSL_MOVES VMS WHERE VB. UNBERTH_TRANS_ID = VMS. (TRANS_ID), "-") DESTINATION
OF VM, VSL_BERTH_UNBERTH VB VSL_MOVES WHERE (VM. TRANS_ID = VB. BERTH_TRANS_ID)
AND VM. MOVEMENT_TYPE_CODE LIKE '% TB '.
AND ((VB. BRTH_ALL_FAST > = TO_TIMESTAMP(:pStartDate,'DD/MM/YYYY HH24:MI') AND VB. BRTH_ALL_FAST<= to_timestamp(:penddate,'dd/mm/yyyy="">=>
OR (VB. UB_LST_LNE_CASTOFF > = TO_TIMESTAMP(:pStartDate,'DD/MM/YYYY HH24:MI') AND VB. UB_LST_LNE_CASTOFF<= to_timestamp(:penddate,'dd/mm/yyyy="" hh24:mi'))="">=>
AND VB. BERTH_CODE (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE NOT IN ("VOPAK", "SPM"))
- AND VM. VCN_NO = 201510336
ORDER OF VB. BRTH_ALL_FAST
) T1
)
Select rownum AS SNO, tab2.* of)
SELECT
TAB1. VCN_NO, TAB1. VESSEL_NAME, TAB1. FLAG, TAB1. IMO_NO,
NVL (BOX WHEN TAB1. HAS ARRIVED< to_timestamp(:pstartdate,'dd/mm/yyyy="" hh24:mi')="" then="" '----------'="" else="" to_char(tab1.arrived,'dd/mm/yyyy="" hh24:mi')="" end,'----------')="">
NVL (BOX WHEN TAB1. HAS ARRIVED< to_timestamp(:pstartdate,'dd/mm/yyyy="" hh24:mi')="" then="" '----------'="" else="" (select="" t2.from_="" from="" cte="" t2="" where="" t2.sl="TAB1.FROM_" and="" t2.vcn_no="TAB1.VCN_NO)" end,'----------'="">
NVL (CASE WHEN (SELECT T2. DESTINATION OF THE CTE T2 WHERE T2.SL = TAB1. DEST AND T2. VCN_NO = TAB1. VCN_NO) = 'POF' THEN '-' ANOTHER BOX WHEN TAB1. SAILED_DATE > TO_TIMESTAMP (: pEndDate, ' DD/MM/YYYY HH24') THEN '-' ELSE TO_CHAR (TAB1. (SAILED_DATE, "DD/MM/YYYY HH24") A PIECE,'-') SAILED_DATE,.
NVL (BOX WHEN TAB1. SAILED_DATE > TO_TIMESTAMP (: pEndDate, ' DD/MM/YYYY HH24') THEN '-' ELSE (SELECT CASE WHEN T2. DESTINATION = 'POF' THEN '-' ANOTHER T2. THE END OF THE DESTINATION OF THE CTE T2 WHERE T2.SL = TAB1. DEST AND T2. VCN_NO = TAB1. (END OF VCN_NO), "-") DESTINATION
DE)
SELECT THE TAB. VCN_NO, TAB. VESSEL_NAME, TAB. FLAG, TAB. IMO_NO,
MIN (TAB. HAPPENED) ARRIVED,
MIN (TAB.SL) FROM_,
MAX (TAB. SAILED_DATE SAILED_DATE),
MAX (TAB.SL) DEST,
TAB. SNO
DE)
SELECT T1.*,
WHEN T1 BOX. FID = 2 AND T1. TID = 1 THEN 1 WHEN T1. FID = 1 AND T1. TID = 2 THEN 1 WHEN T1. FID = 1 AND T1. TID = 1 THEN 0
WHEN T1. FID = 2 AND T1. TID = ROWNUM THEN 2 + 1 END OF ANOTHER 3 SNO
T1 ETC
) GROUP OF TABS BY TABS. VCN_NO, TAB. VESSEL_NAME, TAB. FLAG, TAB. IMO_NO, TAB. SNO
) TAB1 WHERE TAB1. SNO<>0
) tab2
-
Someone was able to get the TOP of direct exec to show the other than 0% cpu %
Someone was able to get the TOP of direct exec to show the other than 0% cpu %
for all the processes... I've tried it on anf 3.2.6 now 4.0.3 and it still says 0%. Envoy in trouble months ago... Runnig im opensource hyperic on a system of ubnutu 6.06 linux
Architecture: x86_64
2.6.15 - 53-amd64-Server Mike,
Here is the bug report that I mentioned when I said that it should be fixed in 4.1. Now he says he's planned for 4.2. I swear it says 4.1 when I modified looked at him. :-( If all goes well a fix will make it in 4.2. Maybe a 4.1.x if we are lucky. :-)
http://JIRA.Hyperic.com/browse/HHQ-2678
Brian
-
How can I get the 'handles' using the Radial filter in Lightroom 6
How can I get the 'handles' using the Radial filter in Lightroom 6
Please press 'H' as advised by dj_paige.
-
How do you get the top left corner, orange to appear button
Some how I lost the orange button with Mozilla Firefox printed inside of the it in the upper left corner. I think I have tried everything I know how to get it back without success. Need help.
Firefox orange button with a limited set of menu items that has been used in Firefox 4.0 up through versions of Firefox 28.0 disappeared. The Menu bar that is used by default in Firefox prior to version 4.0 has still all the Menu items.
When the Menu bar is hidden, you can press the Alt key to temporarily show it and then select the various menus of the keyboard - F - E - V s - B - T - H
The menu bar is displayed by default on Windows XP, Vista, Win7, and Win8 have the hidden Menu bar. With all 4 Windows Menu bar can be displayed/hidden from any State of the OS, you want by right clicking at the top of the window and selecting or unselecting Menu bar, as was possible with previous versions.
-
How to get 'Print', 'Download' and 'Back' link when navigate using go the URL
I have a report R2, there a chart based on PivotTable. This report is called from another report R1 using the feature to the URL. Report R2 does not 'Print', 'Download' and 'back' link when it is called R1. But if I run R2 as it shows the report asandalone 'Print' and 'Download' links.
can you pls suggest how I can get 'Print', 'Download' and 'back' links when R2 is called from R1 using the feature to the URL. You will usually use GO Url to integrate with external portal, so there is no value 'return' for the parameter 'Options '.
The possible values for the link Options are:
m change request
f print version
d - download to Excel
r - refresh results
If you need to view back, you can add another parameter called Done like below and provide the explicit path to where you want to go. For example, in the example below, I would go back to answers to myreport
http://prakashj:7777/Analytics/saw.dll?go&path=/users/administrator/myreport2&options=rmfd&done=answers%26path=/users/administrator/MyReport
HTH,
Prakash
Published by: prakah on August 17, 2009 08:51
Published by: prakah on August 17, 2009 09:03
-
How to get the top users page?
Hello
How to build the top users page with which users are more recently logged_in to the application? Similar to the picture here
--
Thank you.
Venky_prs wrote:
How to build the top users page with which users are more recently logged_in to the application? Similar to the picture here
Create a report of region using a query like:
select
user_name
, max(access_date) most_recent
from
apex_workspace_access_log l
where
authentication_result = 'AUTH_SUCCESS'
and application_id = :app_id
group by
user_name
Use of the ' 16 hours ago" number / Date Format MOST_RECENT column.
-
How to get the nodename using GetVersionEx
My current code uses call unix ' uname ' to get the "struct utsname" nodename string. " I want to replace this call with equivalent windows. I discovered GetVersionEx in windows, but it does not give me the string nodename. Can anyone suggest me the replacement of exact windows for uname.
Hello
The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums
Link to the MSDN Forums is provided below.
-
How to get the path (using <; input type = "file" / >;)
Hello world
I create a HTML form that has an entry of type = "file". This will give you a dialog box browse for your user to search for a file on the operating system.
And my code:
function handleFileSelectForMyShop (evt)
{
var blnFileReaderSupported = false;
Try
{
Debug.log ("handleFileSelect", "start handleFileSelect");
reader of var = new FileReader();
blnFileReaderSupported = true;
var files = evt.target.files;
var size = files.length;
Debug.log ("handleFileSelect", "handleFileSelect # selected files:" + size, debug.info);
for (var i = 0; i)< size;="">
{
Debug.log ("handleFileSelect", "in the handleFileSelect analysis the index file" + i, debug.info ");
var f = files [i];
Reader.OnLoad = (function (theFile)
{
Debug.log ("handleFileSelect", "start reader.onload", debug.info);
return Function
{
Debug.log ("handleFileSelect", "start Function", debug.info);
Debug.log ("handleFileSelect", "reading file" + theFile.name + "(" + theFile.size + "") "" + theFile.type, debug.info);
If (theFile.type.match ('image.*')) {}
var path = e.target.result;
alert (path);
create the path
} else {}
jAlert ("Please select photo!', 'Error'");
}
};
})(f);
If ((f.type.match ('image.*')) |) (f.type.match ('audio.*')) | (f.type.match ('video.*')))
{
Debug.log ("handleFileSelect", "in handleFileSelect call reader.readAsDataURL for type" + f.type, debug.info);
Read in the media file in the form of a data URL.
reader.readAsDataURL (f);
}
}
Debug.log ("handleFileSelect", "Complete", debug.info);
}
{} catch (e)
Debug.log ("handleFileSelect", e, debug.exception);
If (! blnFileReaderSupported)
{
Alert('Error.) The FileReader API is not supported. ") ;
}
}
}
function doPageLoad()
{
Try
{
ELE var = document.getElementById ('txtFile_staffInfo');
If (ele)
{
ele.addEventListener ('change', handleFileSelectForMyShop, false);
}
imgSelectPictureClick = 0;
}
{} catch (e)
Debug.log ("doPageLoad", e, debug.exception);
}
}
window.addEventListener ("load", doPageLoad, false);
Note: And alert (path) leads to a Base64 string! It is not a path of the image that I browse a Spain file on the operating system.
I want to have a full path of the file. For example: file:///accounts/1000/appdata/WebWorksAppTemplate.testa3NBcHBUZW1wbGF0ZSAgICA/shared/camera/image01.jpg
I hope to see your reply soon!
Thank you and best regards,
A Pham
A Pham
I think that you can not get the absolute path of a file due to browser security, when you use the
It's something that you need probably a PlayBook extension for.
-
Unable to get the search using query RIDC idc on Protocol
Hi all
I'm having a strange problem when querying ucm using CRMI.
When I use the connection of client for the idc as protocol below
IdcClient idcClient = manager.createClient ("idc://abc.xyz.com: < port >");
result is null.
but when I use the connection of client for HTTP as below
IdcClient idcClient = manager.createClient ("http://abc.xyz.com:16200/cs/idcplg"); ")
game is not null. I get the content
I use the weblogic user to create the connection that my code is as below
IdcClientManager Manager = new IdcClientManager ();
try {}
Create a new connection to IdcClient idc on Protocol (i.e. connection socket for content server)
IdcClient idcClient = manager.createClient ("idc://hostname:intradocserverport"); It does not work
to use the connection through the web - start
IdcClient idcClient = manager.createClient ("http://abc.xyz.com:16200/cs/idcplg"); ")
UserContext IdcContext = new IdcContext ("weblogic", "weblogic1");
DataBinder dataBinder = idcClient.createBinder ();
dataBinder.putLocal ("IdcService", "GET_SEARCH_RESULTS");
dataBinder.putLocal ("QueryText", "xRegionDefinition < match > 'NEWS_RD' < AND > xWebsiteObjectType < match >"Data file"");
ServiceResponse response =
idcClient.sendRequest (dataBinder, userContext);
DataBinder responsed = response.getResponseAsBinder ();
DataResultSet = myDataResultSet
responsed.getResultSet ("SearchResults");
int i = myDataResultSet.getRows () .size ();
If (i == 0) {}
System.out.println ("found content no.");
} else {}
System.out.println ("content is present");
}
} catch (IdcClientException e) {}
System.out.println ("inside the exception" + e.getStackTrace ());
}
}
I cannot understand why its happening.
I spent we I could search using idc also, but then many use same AAU so someone might have changed some configurations that I can't understand Is your WLS server running and available to the managed server admin? Or you run the server managed mode the independence? If the server administrator is not available, applications via the Protocol of idc using "external" (like weblogic) users will fail. However the http requests will continue to work.
One way to test this is to use "sysadmin" as the user when it connects using the Protocol of the idc. If it works, then this probably means that WLS server admin is unavailable.
-
Getting the IP using a DDL trigger
I created a DDL trigger that is triggered AFTER the DDL on SCHEMA.
The unique attribute that seems to not work is the ORA_CLIENT_IP_ADDRESS
If I try to create the following:
CREATE OR REPLACE TRIGGER control_ddl
AFTER the DDL ON SCHEMA
BEGIN
RAISE_APPLICATION_ERROR (-20000, 'Id' |) ORA_CLIENT_IP_ADDRESS | "conducted a DDL");
END;
and then I try to create a table, I get:
ID made a DDL
Could the reason because I do not have the ip address? A problem of grant? A network configuration issue? What else?
I would like to get the IP address of the PC a person has made the DOF since and not the connection (by using the ORA_LOGIN_USER attribute), because all my colleagues use the same login to access DB
Thank you! This construction in funciton gives the ip address of the machine, you can save it into a varchar2 variable and use it in your trigger.
select sys_context('USERENV','IP_ADDRESS') from dual;
-
Hi all
I can't get the settings of resource by using APIs. Please find the below code snippet.
tcITResourceInstanceOperationsIntf itOptf = (tcITResourceInstanceOperationsIntf) Platform.getService (tcITResourceInstanceOperationsIntf .class);
Long ITResourceKey = null;
HashMap ITResource = new HashMap();
ITResource.put ("TI Resources.Name", "EBS-HRMS-APPS12");
Logger.Debug ("IT resource parameters set");
String usr = null;
String password = null;
String url = null;
resourceSet tcResultSet = itOptf.findITResourceInstances (ITResource);
for (int i = 0; i < resourceSet.getRowCount (); i ++) {}
resourceSet.goToRow (i);
ITResourceKey = resourceSet.getLongValue ("TI Resources.Key");
}
Logger.Debug ("IT Resource Key:" + ITResourceKey);
tcResultSet resourceParameters = (ITResourceKey) itOptf.getITResourceInstanceParameters;
for (int i = 0; i < resourceParameters.getRowCount (); i ++) {}
resourceParameters.goToRow (i);
If (resourceParameters.getStringValue("IT_Resource_Type_Definition.IT_Resource_Type_Parametr.Field_Name").equals ("JDBC URL")) {}
URL = resourceParameters.getStringValue ("TI Resource.Parameter.Value");
}
ElseIf (resourceParameters.getStringValue("IT_Resource_Type_Definition.IT_Resource_Type_Parametr.Field_Name").equals ("password of Admin")) {}
password = resourceParameters.getStringValue ("TI Resource.Parameter.Value");
} else if (resourceParameters.getStringValue("IT_Resource_Type_Definition.IT_Resource_Type_Parametr.Field_Name").equals ("Admin ID")) {}
usr = resourceParameters.getStringValue ("TI Resource.Parameter.Value");
}
}
Please let me know if something is missing.
Thank you
Bhavana Use:
Computer SCIENCE resources kind Parameter.Name
Instead of
Contact name the resource Type Definition.IT Type TI Parametr.Field
-
How to get the version using the Acrobat SDK
I have a plug-in for Adobe Reader and Adobe Acrobat.
Depending on the product and the version, the plug-in should perform few features.
I use ASGetConfiguration() to get the name of the product.
Is there an API to get the version of Reader and Acrobat?
Thanks in advance,
Vatsapal
AVAppGetVersion()
-
get the node of SQL query file name
Hi all
I have a concurrent request that requires the name of file as input. For example, when I connect to oracle on our test instance, I use http://moon1.oando-plc.com:8000. For this program at the same time, the node file name appears as moon1.oando - plc.com.
I need to use this argument to a PL/SQL procedure, that I write and I don't want to use any hard coding.
Is it possible to get this data into an SQL statement.
Thank you Hello
You can get table ICX_PARAMETERS (HOME_URL column). Orsearch profile options values for 'http' get the login page URL (or server name) - see (Note: 201945.1 - How E-Business Suite profile Option values list for all levels using SQLPlus).
Kind regards
Hussein
-
DB version: 10 gr 2
My query below is a union of two queries max. Currently, it returns two rows.
select max(to_timestamp(to_char(END_EFFECTIVE_DATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS'))
from SHIP_DTL
where SHIP_DTL.IS_ENABLED = 1 AND SHIP_DTL.IS_DELETED = 0
AND COMPANY_ID =1
and cost_event_id=1 and END_EFFECTIVE_DATE is not null
union
select max(to_timestamp(to_char(START_EFFECTIVE_DATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS')) from SHIP_DTL
where SHIP_DTL.IS_ENABLED = 1 AND SHIP_DTL.IS_DELETED = 0 AND COMPANY_ID =1
and cost_event_id=1 and END_EFFECTIVE_DATE is null;
MAX(TO_TIMESTAMP(TO_CHAR(END_EFFECTIVE_DATE,'YYYY-MM-DDHH24:MI:SS'),'YYYY-M
---------------------------------------------------------------------------
09-12-01 05:39:00.000000000
09-12-30 06:55:00.000000000
I want to get the most out of these two lines. So, I tried the following query using double. But I get the error messageSQL> select max (select max(to_timestamp(to_char(END_EFFECTIVE_DATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-M
M-DD HH24:MI:SS'))
2 from SHIP_DTL
3 where SHIP_DTL.IS_ENABLED = 1 AND SHIP_DTL.IS_DELETED = 0
4 AND COMPANY_ID =1
5 and cost_event_id=1 and END_EFFECTIVE_DATE is not null
6 union
7 select max(to_timestamp(to_char(START_EFFECTIVE_DATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:
MI:SS')) from SHIP_DTL
8 where SHIP_DTL.IS_ENABLED = 1 AND SHIP_DTL.IS_DELETED = 0 AND COMPANY
_ID =1
9 and cost_event_id=1 and END_EFFECTIVE_DATE is null) from dual;
select max (select max(to_timestamp(to_char(END_EFFECTIVE_DATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD
*
ERROR at line 1:
ORA-00936: missing expression
What I'm doing wrong here?
select max(dt) from (
SELECT MAX(to_timestamp(TO_CHAR(END_EFFECTIVE_DATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS')) dt
FROM SHIP_DTL
WHERE SHIP_DTL.IS_ENABLED = 1
AND SHIP_DTL.IS_DELETED = 0
AND COMPANY_ID =1
AND cost_event_id =1
AND END_EFFECTIVE_DATE IS NOT NULL
UNION
SELECT MAX(to_timestamp(TO_CHAR(START_EFFECTIVE_DATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS'))
FROM SHIP_DTL
WHERE SHIP_DTL.IS_ENABLED = 1
AND SHIP_DTL.IS_DELETED = 0
AND COMPANY_ID =1
AND cost_event_id =1
AND END_EFFECTIVE_DATE IS NULL
)
put in a sub query
Ravi Kumar
Maybe you are looking for
-
My Canon MP980 will not print 10.11
I just bought two sets of very expensive cartridges for my printer Canon MP980 to print some important documents. Guess what? Is no longer, it will print in El Capitan. It shows the document sent to the printer and the arrows go awry, but nothing hap
-
POWER_STATE_FAILURE BSOD on Windows 7 64-bit
Hi all I have a satellite P300, born with Vista-32 bit, which actually worked without any serious problems. I have improved the thing for Windows 7 Ultimate 64-bit, and now I have a particular problem, several times a day. I get the famous Blue Scree
-
Update to SP3 stuck on installing update 2 of 3 to 12 hours
The message installing update 2 of 3, without shutting down your computer. What should I do?Will it hurt if I shut down and re boot?
-
I have a Z3 with the latest f/w but I got calendar crashing on me for a year now through different Z3 2 and it has just occurred to me what is the problem. When you create an event on the phone, the maximum time of reminder, that you can set is 1 wee
-
How to remove the default save alert by pressing the "back" button
Hi all Scenario: I have a screen in which, after I press the back button, the default alert box appears with the options "save, delete, cancel. How do I remove this menu? I tried to find it on the forum, but I guess that I do not use the search words