How to get higher and second higher value of a line?
Hello worldI want more solid and second upper sal from emp in a line,
Thank you
Hello
Whenever you have a problem, after the results you want.
Always tell what version of Oracle you are using.
Are you looking for this?
HIGHEST_SAL SECOND_HIGHEST_SAL
----------- ------------------
5000 3000
If so, follow these steps:
WITH got_r_num AS
(
SELECT sal
, ROW_NUMBER () OVER (ORDER BY sal DESC) AS r_num
FROM scott.emp
)
SELECT MAX (CASE WHEN r_num = 1 THEN sal END) AS highest_sal
, MAX (CASE WHEN r_num = 2 THEN sal END) AS second_highest_sal
FROM got_r_num
;
It works in Oracle 9 (and), but can easily be adapted for Oracle 8.1.
From Oracle 11, you can also use SELECT... PIVOT.
It is unclear how you want to handle links. Say there were only 3 rows, with 100, 200 and 200 sals. What do you consider being the second highest?
Tags: Database
Similar Questions
-
Mr President
If I have the two LOV in the same table then how to connect when I select first and second LOV value also change?
My two fields are FLOW AND DR_NAME
FLOW = ACCT_ID
DR_NAME = ACCT_NAME
I created with success of LOV for these fields.
First LOV gives acct_id in the debit field and second LOV gives the value of acct_name to dr_name.
How can I report these lov, it's that when I change my acct_id then acct_name also change
I have these two tables
CREATE TABLE "NOM" ( "ACCT_ID" VARCHAR2(7) NOT NULL ENABLE, "ACCT_NAME" VARCHAR2(50) NOT NULL ENABLE, "O_BAL" NUMBER(13,2), CONSTRAINT NOM_PK PRIMARY KEY ("ACCT_ID")ENABLE ); CREATE TABLE "VOUCHERDET" ( "V_ID" VARCHAR2(9) NOT NULL ENABLE, "LINEITEM" NUMBER , "DEBIT" VARCHAR2(7) , "DR_NAME" VARCHAR2(50), "CREDIT" VARCHAR2(7) , "CR_NAME" VARCHAR2(50), "PARTICULARS" VARCHAR2(100), "AMOUNT" NUMBER(21,2), CONSTRAINT VOUCHERDET_PK PRIMARY KEY ("V_ID","LINEITEM")ENABLE, CONSTRAINT PUR_SAL_LINE_POD_FK FOREIGN KEY(PROD_ID) REFERENCES PRODUCTS (PROD_ID)ENABLE, CONSTRAINT VOUCHERDET_DEBIT_FK FOREIGN KEY ("DEBIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_CREDIT_FK FOREIGN KEY ("CREDIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_V_FK FOREIGN KEY ("V_ID") REFERENCES "VOUCHER" ("V_ID") ON DELETE CASCADE ENABLE );
Concerning
so, instead of this second ActId, choose ACCT_NAME:
-
What is Belarc Advisor and how to get it and use it?
What is Belarc Advisor and how to get it and use it?
Don't try real hard to figure that one out yourself, huh? Heh
http://www.Google.com/search?q=what+is+Belarc+Advisor
Search example:
- http://www.Hoax-Slayer.com/Belarc-review.html
- 8078 order, http://www.PCWorld.com/downloads/file/FID, 4/description.html
- http://fileforum.betanews.com/detail/Belarc-Advisor/1042897635/1
- http://www.TechRepublic.com/article/gather-detailed-system-information-with-Belarc-Advisor/6177700
The best place, probably, for more information about the application/utility is probably:
http://www.Belarc.com/free_download.htmlMore directly:
The Belarc Advisor generates a detailed profile of your installed software and hardware, network inventory, missing of patches Microsoft anti-virus status, safety criteria and displays the results in your Web browser. All of your PC profile information is kept private on your PC and is not sent to any web server.
- Operating systems: runs on Windows 7, 2008 R2, Vista, 2008, 2003, XP, 2000, NT 4, Me, 98 and 95. 32-bit and 64-bit Windows are supported.
- Browsers: works on Internet Explorer, Firefox, Safari, Opera and many others.
- File size: 3062 KB.
- License: the license associated with this product allows for free personal use. Use on multiple computers in a business, educational, military or Government facility is prohibited. See the license agreement for more details.
DOWNLOAD TIPS:- Click the click here to download .
- Click run in the file download of Internet Explorer pop up.
- Belarc Advisor automatically install, build a profile of your hardware and software and display in your Web browser.
-
We have a hierarchy of DRM, we want to push to a Dimension of sharing EPMA. In DRM, selecting the hierarchy and by changing the 'Dimension' shared property, the drop-down list box previously had values in there (some have been our shared Dimensions EPMA, but several us not the Shared Dimensions) but no longer has any selectable values. How do we get DRM to sort the list of the Shared Dimensions of our EPMA instance in the drop-down list of properties shared Dimension?
Hello
I could be wrong completely here, but that's what I discovered trying to look for EPMA. Property of SharedDimension.
This property gives me drop-down list without having to do anything and the drop down menu is the list of groups available in hierarchy, but if I'm putting some values manually in the definition of ownership--> the list of values is not showing me all the values (list of groups of hierarchies and not the value created manually) in the drop-down list.
I think that this property will not take a different list than list of group hierarchy as the Data Type defined for that property in the model of the APP is "Group of the hierarchy". Once again this property is used in the export "EPMA. E.M.P. architect Shared Library"to penetrate the hierarchies EPMA Shared Library.
Then you can try to see if all values are entered in the definition of the property--> list and try to delete it OR to check if the required groups in the hierarchy are created in consequence.
Let me know if it helps
Thank you
TFDC
-
How to get the whole text of value special hashi
Hello
can someone let me know how to get the full text of sql data hash_value in report statsapck...
SQL> select SQL_TEXT from v$sql where HASH_VALUE=3102119461;
SQL_TEXT
--------------------------------------------------------------------------------
SELECT ROWID,AR_DT,AR_TXN_CODE,AR_NO,AR_AMD_NO,AR_REF_FROM,AR_REF_TXN_CODE,AR_RE
F_NO,AR_DAK_CODE,AR_DED_SYS_ID,AR_COMP_CODE,AR_ACNT_YR,AR_AMD_DT,AR_AMD_UID,AR_A
MD_RES_CODE,AR_REF_SYS_ID,AR_STUD_SRN,AR_APPL_DT,AR_ISSUE_DT,AR_ENROL_FRM_COURSE
,AR_ENROL_DT,AR_JOURNAL_YN,AR_TYPE,AR_TITLE,AR_VACANCY_CODE,AR_MRH_MRN,AR_INDUST
RY_FIRM,AR_DEED_FM_DT,AR_DEED_TO_DT,AR_IT_TR_YN,AR_IT_START_DT,AR_CONDN_YN,AR_RE
MARKS,AR_IT_END_DT,AR_CONDN_DAYS,AR_CONDN_AMT,AR_CONDN_DT,AR_CONDN_BY,AR_46_FLAG
,AR_RE_REG_YN,AR_DOC_STATUS,AR_ART_TERM_COMPLN,AR_TERMN_COMPLNPLN_DT,AR_CORRES_A
DDR_LINE_1,AR_CORRES_ADDR_LINE_2,AR_CORRES_ADDR_LINE_3,AR_CORRES_CITY_CODE,AR_CO
RRES_ZIP_POSTAL_CODE,AR_CORRES_BR_CODE,AR_CORRES_REGION_CODE,AR_CORRES_STATE_COD
E,AR_CORRES_COU_CODE,AR_CORRES_TEL,AR_CORRES_EMAIL,AR_CORRES_MOBILE,AR_PER_ADDR_
LINE_1,AR_PER_ADDR_LINE_2,AR_PER_ADDR_LINE_3,AR_PER_ADDR_LINE_4,AR_PER_CITY_CODE
SQL_TEXT
--------------------------------------------------------------------------------
,AR_PER_ZIP_POSTAL_CODE,AR_PER_BR_CODE,AR_PER_REGION_CODE,AR_PER_STATE_CODE,AR_P
ER_COU_CODE,AR_PER_TEL,AR_APPR_DT,AR_AP
SQL>You can query V$ SQLTEXT or V$ SQLTEXT_WITH_NEWLINES
Thus
select sql_text from v$sqltext where hash_value='&hash_value' and address='&address' order by piece;
Note: In 10g and more, you can use instead of HASH_VALUE SQL_ID and ADDRESS.
Additonally, in 10g and above, you can also query V$ SQLSTATS where the text is stored in a CLOB called 'SQL_FULLTEXT', we must therefore DEFINE the LONG value when using SQLPlus.
-
This sentence is the last thing on my list of contacts and appears only when I use the contacts list to send an email.
I don't know how to remove and how it get there in the first place. I can delete it at the time, however, it
y at - it next time. I can't click on it and there is no address attached.
Can you help me? IT IS SAID HORNEY GIRL HERE
BEA Harrison
Hello
you say not what e-mail program, you use
you use Hotmail?
I'm sorry, but we cannot help with hotmail problems in these forums in response to vista
Please repost your question in hotmail in the hotmail link below forums
http://windowslivehelp.com/product.aspx?ProductID=1
ForumsConsult with Microsoft Certified Solutions -
Get alarms and change default values
My question is two really, I was just read the previous thread http://communities.vmware.com/thread/230786?tstart=0 and I was wondering how to get the list of existing alarms, after have stuck in the SDK for awhile, I thought I would ask experts.
I see how they relate to the CROWD, but can not put it in the code.
Also, is there a way to modify each alarm 5 by default that are created to add an action to send a snmp trap?
Thank you
Alan Renouf
The first part of your question is easy.
The following script will display just the name of the alarm, but you can find all the properties in the object of the alarm ($t variable).
$serviceInstance = get-view ServiceInstance $alarmMgr = get-view $serviceInstance.Content.alarmManager $alarms = $alarmMgr.GetAlarm($null) $alarms | %{ $t = Get-View -Id $_ Write-Host $t.Info.Name }
For the 2nd part of the question, yes you can change the preset alarms (as you can from the VIC).
You'd use the ReconfigureAlarm method to do this.
$predefined = "Host connection state","Host CPU Usage","Host Memory Usage","Virtual Machine CPU Usage","Virtual Machine Memory Usage" $serviceInstance = get-view ServiceInstance $alarmMgr = get-view $serviceInstance.Content.alarmManager $alarms = $alarmMgr.GetAlarm($null) $alarms | % { $alarm = Get-View -Id $_ if($predefined -contains $alarm.Info.Name){ $spec = New-Object VMware.Vim.AlarmSpec $spec.Action = New-Object VMware.Vim.GroupAlarmAction $spec.action.action = @(New-Object VMware.Vim.AlarmTriggeringAction) $spec.Action.Action[0].action = New-Object VMware.Vim.SendSNMPAction $spec.Action.Action[0].Green2yellow = $true $spec.Action.Action[0].Red2yellow = $false $spec.Action.Action[0].Yellow2green = $false $spec.Action.Action[0].Yellow2red = $true $spec.Name = $alarm.Info.Name $spec.Description = $alarm.Info.Description $spec.Expression = $alarm.Info.Expression $spec.Enabled = $alarm.Info.Enabled $spec.Setting = $alarm.Info.Setting $alarm.ReconfigureAlarm($spec) } }
Alarms, listed in $predefined, will now send an SNMP trap when the State goes from green to yellow and when the State goes from yellow to red.
-
How Adobe gets DATE and its format?
Hello
I'm current date (today) to below JS in some flds and below using FormCalc for some flds in my_form;
JS:
var currentTime = new Date()
Form Calc:
$.rawValue = num2date (date (), DateFmt(MM/DD/YYYY))
But I have not much idea how adobe is at that date? For my business it is the first form, that's why they ask me how adobe gets so, date format and its
1) count local address IP/Internet provider, format?
(2) or PREMISES of the portable PC/computer user settings, date format? If Yes, for example, if the user (the laptop settings) Germany has a DD. MM YYYY configured, if this user is delivered to the United States on a business trip and if the user opens the form, and then how the date looks like for this user? Depending on the settings of computer laptop user JJ. MM YYYY or local internship provider date format MM/DD/YYYY?
Thank you
Go to PDF... No!
-
Feature: How to get subtotals and total general whole?
I am wrtiting a report using SQL and SQL * more to get subtotals and a total general. The COMPUTE function allows me to CALCULATE SUM on a group, but it only gives me subtotals. I am interested in getting a report with subtotals and a final OVERALL TOTAL. Is this possible using SQL * more?
Here is my current code that gives me subtotals:
Here is the code for a grand total:COMPUTE SUM LABEL subtotal OF sal ON deptno SELECT ename, sal, deptno FROM emp ORDER BY deptno; ENAME SAL DEPTNO ---------- ---------- ---------- CLARK 2450 10 VOLLMAN 5000 MILLER 1300 ---------- ********** 8750 subtotal SMITH 800 20 ADAMS 1100 FORD 3000 SCOTT 3000 JONES 2975 ---------- ********** 10875 subtotal ALLEN 1600 30 BLAKE 2850 MARTIN 1250 JAMES 950 TURNER 1500 WARD 1250 ---------- ********** 9400 subtotal
How can I combine the two on a single report?Column DUMMY NOPRINT COMPUTE SUM OF sal ON DUMMY BREAK ON DUMMY SELECT NULL DUMMY, ename, sal, deptno FROM emp ORDER BY deptno; ENAME SAL DEPTNO ---------- ---------- ---------- CLARK 2450 10 VOLLMAN 5000 10 MILLER 1300 10 SMITH 800 20 ADAMS 1100 20 FORD 3000 20 SCOTT 3000 20 JONES 2975 20 ALLEN 1600 30 BLAKE 2850 30 MARTIN 1250 30 JAMES 950 30 TURNER 1500 30 WARD 1250 30 ---------- 29025
Hello
If you want to do with the SQL * Plus COMPUTE command, just give another CALCULATION order "CARRY ON".
Add 'REPORT ON' to the PAUSE command, also.BREAK ON deptno ON REPORT COMPUTE SUM LABEL subtotal OF sal ON deptno COMPUTE SUM LABEL grandtotal OF sal ON REPORT SELECT ename, sal, deptno FROM scott.emp ORDER BY deptno;
Output:
ENAME SAL DEPTNO ---------- ---------- ---------- CLARK 2450 10 KING 5000 MILLER 1300 ---------- ********** 8750 subtotal JONES 2975 20 FORD 3000 ADAMS 1100 SMITH 800 SCOTT 3000 ---------- ********** 10875 subtotal WARD 1250 30 TURNER 1500 ALLEN 1600 JAMES 950 BLAKE 2850 MARTIN 1250 ---------- ********** 9400 subtotal ---------- grandtotal 29025 14 rows selected.
-
Ramp and soak application - may not know how to get once a second calendar event
I am trying to create a heating control in LabView SignalExpress 2009 (oddly shown in the remarks as v3.5.0).
It's a control algorithm simple ramp and dipping.
Every fifteen minutes, I would like to increase heating set value.
I tried to use a Sweep controlling the offset (V) of a step create an analog Signal. This generates a step function, but the short scan fast-as-possible. I need the scanned value to change only one time every 15 seconds.
The equipment I use is the casing USB-6009. There not all counter functions or a clock.
Am I out of luck? SignalExpress is simply not suitable real-time-based operations?
I know how to make what I need in LabView (I have available 8.6) but there are all sorts of warnings on the attempt to import of clock-relelated screw in SignalExpress.
Any help would be greatly appreciated.
I tried using software timing with my card for the Acquisition of data in the same way your 6009 will generate the waveform. I was able to make it work, while controlling the points under development using the synchronization in step of the ADO. I included a screenshot of my release and my SignalExpress project in SE compared to my output in the Test panels for my device. Let me know if you still have problems with the 6009, and we might have to resolve problems and ensure that the device is working properly. Thank you!
-
How to get higher on the Satellite P200-144 resolutions
Hello
The X 200 is released a few days ago. I read the card and he said the support for the resolutions of screen until 1680 * 1050. Since the P200 has the same screen is there anyway that you can go to these resolutions?
Hello
I agree with Johnny. You can use only the display resolutions that appear in display properties.
Unfortunately, the other resolutions are not selectable. -
How to define legend and margins of value (dashes) for the drop?
I have searched the archives but couldn't find a specific answer. Could someone show me how to set the indent for the legends and values beneath the pallet section of a drop-down list, please? Thank you.
For some reason, they get rid of the ability to edit dashes for the drop-down lists since version 8 of the designer. NO idea why.
So, here's what you do:
1) click on your menu drop-down
2) go to view > Source XML
(3) by inserting part of field
or other length/unit, you need to know. That's the value. (4) for the legend, do the same thing under the legend item.
If the para element already exists (which it should), just add the attribute marginleft = "in 1".
Here is an example:
Drop-down List test test Kyle
-
I have an Acrobat only plugin, developed in 2005 VS. Originally with Acrobat 7 SDK, now updated to use Acrobat 9 SDK. The ultimate goal of this feature is to open a PDF file from a web server Agile: If a user string, a URL is created, a request sent to the URL, then pay back the answer. The answer can be either the PDF itself or a string path to the PDF file. I thought it would be easier to use the version of PDF path to simply open the new PDF of the http:// address.
I created a folder level javascript with a call to Net.HTTP.request confidence. I have a script that works when invoked from a menu item added by the folder level javascript file. But when you use this same command in my C++ with AFExecuteThisScript code, I can't get the HTTP response to finish pending in the code for the result.
The Net.HTTP.request and the asynchronous callbacks confuse me, so maybe that's my big problem. I could not Net.HTTP.request to return a value in a service simple javascript right now, I'm trying to use a "global" variable in the JavaScript folder level and two calls. The first call "sets" the global variable, the other "becomes" it. But this seems to be the issue. When I have my code debugging or stop execution, the part of the response of the Net.HTTP.request is never called. But when I left to go beyond this step with error recovery, the answer appears later.
So how kick off of the Net.HTTP.request and be notified when it's over? either in JavaScript or VC ++?
Any help is appreciated. Even if the best option is to stream the file from the web server to a local file and then open the (this is the option that I take in another tool that runs outside of Acrobat).
Here's the code.
Javascript controls at the level of the files (urls truncated for the post)
var THE_PATH = ''; function setTHE_PATH ( gURL ) { console.println('setTHE_PATH Begin'); var params = { cVerb: 'GET', cURL: gURL, oHandler: { response: function( msg, uri, e) { console.println('response method: Setting Path'); THE_PATH = SOAP.stringFromStream( msg ); console.println('<<' + THE_PATH + '>>'); } } }; console.println('URL: ' + params.cURL + '\n oHandler: ' + params.oHandler ); console.println('Path: ' + THE_PATH ); var netResult = trustedNetHTTPrequest(params); console.println('setTHE_PATH End'); return THE_PATH; }; trustedNetHTTPrequest = app.trustedFunction( function ( params ) { console.println('trustedNetHTTPrequest begin'); app.beginPriv(); var netResult = Net.HTTP.request( params ); app.endPriv(); console.println('trustedNetHTTPrequest end'); return netResult; } );
Added MenuItems with JavaScript at the folder level
app.addMenuItem( { cName: "mysetTHE_PATH", cUser: "set THE_PATH", cParent: "Tools", cExec: "setTHE_PATH('http://......&getURL=true');", nPos: 0 } ); app.addMenuItem( { cName: "mygetTHE_PATH", cUser: "get THE_PATH", cParent: "Tools", cExec: "console.println( THE_PATH );", nPos: 0 } );
Here's the JavaScript Console output when you run these two commands:
setTHE_PATH Begin URL: http://......&getURL=true oHandler: [object Object] Path: trustedNetHTTPrequest begin trustedNetHTTPrequest end setTHE_PATH End response method: Setting Path <<https://......DesiredFilename.pdf>>
Here is the function in the plugin C++, with additional measures to prove AFExecuteThisScript works here
sprintf(jsScript, "testVal='%s';event.value = testVal;", strURL.c_str() ); AFExecuteThisScript( aPdDoc, jsScript, &pReturnValue ); // After this, pReturnValue is the passed-in URL, as expected. sprintf(jsScript, "setTHE_PATH('%s');event.value = 'Step 1 Worked!!';", strURL.c_str() ); AFExecuteThisScript( aPdDoc, jsScript, &pReturnValue ); // After this, pReturnValue is 'Step 1 Worked!!', as expected. sprintf(jsScript, "event.value = THE_PATH;", strURL.c_str() ); AFExecuteThisScript( aPdDoc, jsScript, &pReturnValue ); // After this, pReturnValue is NULL
This is the JavaScript Console output when you run the commands using the plugin (mode debugger, to wait after step 1)
setTHE_PATH Begin URL: http://......&getURL=true oHandler: [object Object] Path: trustedNetHTTPrequest begin trustedNetHTTPrequest end setTHE_PATH End
Note that he never gets to the part of the "method of response.
Thank you!
Tim James
You need not limit yourself to the plugin API. The requests HTTP from C/C++ is a fairly common condition, just observe the restrictions in my answer.
-
Double y axis scales - how to get the right second scale indicator
I'm tracing the density compared to the speed and pressure compared to the speed on the same graph XY. Field Multi-XY seemed the perfect way to do it, until I discovered there is no way to display a scale for the second y-axis (data cannot reasonably be displayed at the same scale). I looked at assignments and examples, but with the exception of the mention of a semi-mythical double y-axis library of controls in the new 5.0 version, I'm not finding anything. This seems to be a fundamental characteristic of graphing calculator, so I hope someone can tell me where he is currently. I use the 2013 LabVIEW Development package.
Any ideas to suggest?
I found the answer on this help page.
http://zone.NI.com/reference/en-XX/help/371361J-01/lvhowto/configuring_the_x_and_y_sc/
I had to use a combination of Swap faces and scale to duplicate, and then juggle scale values.
It doesn't seem to be a way to make this work with field Multi - XY.vi, but the standard XY graph function should work for me.
I consider the answer to this question.
-
How to get latitude and longitude from a specific location
Hi, we can get card giving the latitude and longitude. But I need to get the card when I give the specific location, like New York etc.. So how do you get the particular location points. I use the 8820 Simulator in eJDE4.5.
can someone help me solve this problem.
Thank you
There
integer
Latitude in decimal degrees x 100,000x
integer
longitude in decimal degrees x 100,000See GPS and BlackBerry Maps Development Guide.pdf
Maybe you are looking for
-
We lived in Singapore for two years and I bought a Time Capsule while we were there. Now, back in the States, I have no option for the USA under the country code that affects the performance of the network? What is indicative in any way? I have to bu
-
My A30 Satellite stops on its own
Since the last 3-4 days my laptop, toshiba satellite A30, just stopped automatically. I noticed that maybe it's overheating is because I can hear the fan moving at high speed.Can anyone help?
-
EliteBook 840: Elitebook 840 G1
I have a HP Elitebook 840. The hard drive has failed. I got a replacement he mounted and installed the operating system very well. There is a fast Intel storage option that fake upward on the screen just prior to loading of the operating system. CTRL
-
My his default keeps beeping while I'm on my lap top
My his default beep warning while I have on my lap top How to find why he do this?
-
The new Concept of Media Sync blackBerry smartphones
Hello I love my BB and recently upgraded to the latest version of the desktop management software. This all sounds good and is visually very significant improvements... but the Media Sync feature unusable. I'm not particularly fond of the new way of