Rank on the series value
Hello
I want to display the result as below.
drop table test5;
create the table test5 (tno number);
Start
because loop me in 1.10
If I in (4,7,8) then
null;
on the other
Insert into values test5 (i);
end if;
end loop;
commit;
end;
Select * from test5.
required result.
NWT, rankVal
1 1
2 2
3 3
5 1
6 2
9 1
2 of 10
You haven't posted on the logic to assign rank.
Your data, if we draw the logic, your query will be like
Select tno, rank () over (partition by order of rn by tno)
de)
Select the NWT, rn (round(tno/4,1)) floor of test5
);
Tags: Database
Similar Questions
-
write the multiple value series buffer using the structure of the case
In this VI, I am generating waves by using the sliding bar. After that I compare it to a value as 0.6. If the value of wave is higher than 0.6 then led flashes and structure case written 1 value serial buffer. If it is less than 0.6 became led off and structure written case value 0 in the stamp series. now, I want to add another condition if the chart value is between 0.2 to-0.2 written structure case 2 series buffer value. can you tell me how can I do this?
-
Hi all
I have a system of LabVIEW which takes advantage IMAQ tools and features of the Vision Development Module. A useful feature that I put in place is to be able to take a snapshot of the video stream and then subtract this single image among the subsequent images.
What I want to do is to collect a series of images instead of one, and then create a unique image of these frameworks is just the maximum value of pixels in each pixel (a bit like a display persistent).
It would probably be very easy to be implemented by converting the image to a table and then by doing math number on the table and then turning into an image, but I hope that someone here may know how to use the IMAQ/VDM tools to do this in a way more compact.
Thank you very much
MK
How about using Max comparison IMAQ operation?
-
Is there a way to get the new value assigned to a column of series (DG4IFMX)
Hi people,
I need to insert records into a table whose primary key is a column of series (even as a trigger on a primary key in Oracle). I have been informed that the way to trigger the next value is to insert a zero in the column, which is fine. The problem is, that I need to know what the next value that has been assigned, and there is not enough time between the transaction to do a 'select max (column_name)', for example. Is there something (maybe a function) that responds to this need, and I don't know about it?
Thanks, any idea would be appreciated.
-Adam vonNiedaThe gateway offers the PASSTHROUGH - described in more detailed manual - package which allows you to send anything to the foreign database without being touched by Oracle.
Depending on your function, you can use the DBMS_HS_PASSTHROUGH. The EXECUTE_IMMEDIATE package and if you need to retrieve something that you could use:
dbms_hs_passthrough. Parse
DBMS_Hs_Passthrough.fetch_row
dbms_hs_passthrough.get_Value -
I have a multithreaded C ++ Builder program that acquires data analog with a wire and output of analog and digital data with a second thread. The inputs and outputs occurs in blocks of data every 0.1 seconds.
On the advice of M - and X-Series PCI and PCIe this output is smooth, but on a Board of USB-6259, admission is VERY NERVOUS waiting on every 0.3 seconds or more. This makes the use of USB M-Series cards with my program basically unacceptable.
In an attempt to reduce nervousness and smooth the input/output of data, I tried to use the DAQmx features
DAQmxSetAIUsbXferReqSize(),
DAQmxSetAOUsbXferReqSize(), andDAQmxSetDOUsbXferReqSize()
for my USB-6259. However, the pieces of data and therefore smooth data inputs/outputs, these functions in different values to SUPPOSIDLY decrease of entry and exit to 0.1 second is no. DIFFERENCE OBSERVABLE versus normal code without them.
My question is: these functions only designed to do something on the new X - Series USB series cards, but not the boards of the series M USB? And is there a detailed documentation on these functions beyond C DAQmx help?
Thank you.
Bill Anderson
Hi Bill
I started looking into questions about the USB-6259 and functions of the required size. Since your post I understand you have two tasks at the same time, one is a task of entry and the other is data ouputting. If you could send me more details of your request, so I can look into this again, would be great. You can specify how tasks are put in place, so if you use synchronization, buffering etc so I can look into the issue for you.
With regard to the questions you have asked.
(1) these functions are not limited to the X series, so they should work as you would expect, and I was not able to find other problems with these features on our system.
(2) unfortunately aid DAQmx is the extent of documentation on these functions, even when there is nothing on our system to go further in the functions.
When you run your program if other programs and applications are open, it can cause treatment slow down, so that bare in mind also. If you run the task, how would this affect the use of the CPU?
I found a few documents concerning your application which can help you to grow and to develop your code.
What makes a High Performance Bus?
and
Streaming of signals of NEITHER: support the flow of data at high speed on external PC buses
in this document, the external challenges of the bus for the Data Acquisition section has some good information on what is feasible with USB devices.
If you have any questions or any other questions or would like some additional information, thanks for posting on this forum and I'll get back to you.
Thank you
-
How to choose the time of conversion on a module in the series C NI 9207?
I have a NI 9207 C series module that is currently attached to a cDAQ chassis 9181 (it moves to a cRIO soon, however). The manual States that there are two modes of conversion time, high resolution and high speed. Apparently, the default value of the plant's mode high resolution since my maximum acquisition rate is less 20 Hz single channel. I have read the manual to research how to define it, but the manual does not cover the intangible aspects of the implementation. I think that there should be a way to do in the two MAX and LabVIEW. It is enough to affect the rate of acquisition you want something that is supported only by the mode high speed does not switch automatically, because LabVIEW generates an error when you do this (frequency of acquisition application exceeds the maximum acquisition rate).
Can someone tell me how do to it. I would like to know how to do it in LabVIEW and Max (if supported).
Thanks in advance for any help you can provide!
Well, I guess I just need to do some more digging and DIY.
I didn't understand how to proceed to the MAX, but in LabVIEW, you can use a property DAQmx Channel node. I don't check the channel palette because I thought that it was configured per device / channel... I was looking on the property DAQmx Device node.
Thus, in case anyone else is looking for this answer to the LabVIEW environment, set this value using one of THE. ADCTimingMode on a node property DAQmx input channel.
-
Initialization of the default values of the elements VI
Hi all
I know how to set the default values on the front panel. However, when I run a VI several times without closing, I need to re - initialize some values of the façade of their value at the end of the last execution in the default values used in the next series. In general, I do that using the "Init" State in a state machine or a first image of a stacked sequence. In both cases, I just created a bunch of local variables and sets the values to zero, or any other initial value they need.
When I was in training 1 Core and Core 2 recently, the Professor showed us a way to reset these values without using local variables, as described above. But, for the life of me, I don't remember what he says to do.
Any help my rapidly aging memory jogging would be much appreciated.
Thank you!
Invoke the node on the VI reset default values.
-
Get the default value for class LV 1498 error
I call get the Default Value.vi LV class to dynamically load a class.
It was working fine until I added Open Config Data.vi to read an .ini file.
The application works fine when I press the button RUN in the LabView development environment, but when I create the executable file with Application Builder and then run it, I get:
"1498 error occurred getting class LV Default Value.vi"
Possible reasons:
LabVIEW: Library has errors. Correct the errors before performing this operation.
«"" "String of full appeal:»»"»
Download LV class by default Value.vi
Test.VI
LabVIEW has tried to load the class in this path:
g:\cal\devices\Digital300Meter\Digital300Meter.lvclass
I narrowed the problem down to open Config Data.vi included in the application, not in the class. I don't have to call the Open Data of Config vi to get this error.
I have a Subvi, called "SelectDevice" which refers to Open Data from Config. In my main Test.vi SelectDevice is in the true case of a true/false case structure, which is set to False.
If I put a design schema off around the Open Data of Config vi, I do not get the error.
I suspect that including Open Config Data include a VI in the application that interferes with the LV ranks by default.
Thank you, it works!
I also put the additional Exclusions page as follows:
Disconnect the type definitions - verified
Remove unused polymorphic instances of VI - verified
Remove unused libraries project - members verified
Change the project library file after removing unused members - unaudited
-
Remove the button missing in the series 'e' portable computers Dell
Cannot get the logout button to appear in a laptop computer from dell e6400 Start Menu
create a new DWORD (NoStartMenuEjectPC) under HKEY_Currrent_User or HKEY_Local_Machine value does not
Using gpedit.msc: taskbar and Start Menu are not listed under admin... Templates
Standard Image: WSP3 with all security updates
Hello
· Where exactly you create the DWORD (exact location)?
Embedded and not embedded hardware profiles do not exist on laptops Dell (with XP) from the series 'e '.
To further support, I suggest you to contact Dell technical support.
http://support.euro.Dell.com/support/index.aspx
Advice and WARNING:
§ It is extremely important to disconnect your laptop computer in the start menu before you eject from the docking station.
§ Ejection for a laptop computer to the station before being released on the start menu may cause loss of data.
§ It can also cause damage to your laptop or other devices connected to the docking station.
§ Read the manufacturer's manual for detailed instructions undocking.
Note: If the laptop is not connected to the docking station, and then the pc disconnect button is not available on the start menu.
Thanks and regards.
Thahaseena M
Microsoft Answers Support Engineer.
Visit our Microsoft answers feedback Forum and let us know what you think. -
Remove the NULL values and update the value according to the logic
Hello
The problem data
CREATE TABLE VOLA (SRNO, NUMBER, zero NUMBER, A NUMBER); INSERTION of REM in VOLA
TOGETHER TO DEFINE
Insert in VOLA (SRNO, ONE) values (1,237.94);
Insert in VOLA (SRNO, ONE) values (2, null);
Insert in VOLA (SRNO, ONE) values (3,203.565);
Insert in VOLA (SRNO, ONE) values (4,170.69);
Insert in VOLA (SRNO, ONE) values (5,113.67);
Insert in VOLA (SRNO, ONE) values (6,93.6);
Insert in VOLA (SRNO, ONE) values (7,82.03);
Insert in VOLA (SRNO, ONE) values (8,66.675);
Insert in VOLA (SRNO, ONE) values (9,63.59);
Insert in VOLA (SRNO, ONE) values (10,61.415);
Insert in VOLA (SRNO, ONE) values (11,60.015);
Insert in VOLA (SRNO, ONE) values (12,58.235);
Insert in VOLA (SRNO, ONE) values (13,57.805);
Insert in VOLA (SRNO, ONE) values (14,56.965);
Insert in VOLA (SRNO, ONE) values (15, null);
Insert in VOLA (SRNO, ONE) values (16, null);
I have to remove the NULL values in column 1, the problem is that the position of the NULL values are not fixed, and it can be any position. If all the lines of the columns are null, then throw it away.
If multiple NULL values are here so I have to do the math as follows to update null with the eigenvalues
1. If the first line is null then take the 2nd value in row and update it.
2. If the lines between both is null then take avg of prev and next value not null and refresh it.
3. If the last value in the column is null, then then take prev and update, in this case last two are null, so I have to take value of prev 14 value line update in
15th and 16th ranks.
I want to put this pl/sql logic, somehow, that I thought have loop and counter aapproach and loops through the elements and check and update.
But always looking for something better before looking to write code. No idea or help will be useful for me.
I * think * you are looking for something like:
WITH VOLA (SRNO, ONE)
AS (select 1,237.94 from all the double union)
Select 2, union null value double all the
Select 3,203.565 from all the double union
Select 4,170.69 from all the double union
Select 5,113.67 from all the double union
Select 6,93.6 from all the double union
Select 7,82.03 from all the double union
Select 8,66.675 from all the double union
Select 9,63.59 from all the double union
Select 10,61.415 from all the double union
Select 11,60.015 from all the double union
Select 12,58.235 from all the double union
Select 13,57.805 from all the double union
Select 14,56.965 from all the double union
Choose 15, null of union double all the
SELECT 16, NULL FROM dual)
GET_VALUES (SELECT SRNO, ONE ACE,
, LAST_VALUE (WE IGNORE NULLS) (ORDER BY SRNO CSA ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING) AS PREVIOUS_VALUE
, first_VALUE (ONE IGNORE NULLS) over (ORDER OF SRNO CSA ROWS BETWEEN 1 SUITE AND FOLLOWS without TERMINALS) AS NEXT_VALUE
FROM VOLA)
SELECT SRNO, ONE, CASE
WHEN IT IS NOT NULL, THEN WE
OTHER CASES
WHEN PREVIOUS_VALUE IS NOT NULL AND IS NOT NULL THEN (PREVIOUS_VALUE + NEXT_VALUE) NEXT_VALUE / 2
WHEN THE PREVIOUS_VALUE IS NOT NULL, THEN PREVIOUS_VALUE
WHEN THE NEXT_VALUE IS NOT NULL, THEN NEXT_VALUE
END
END AS NEW_VALUE
OF GET_VALUES
/
HTH
-
HypGetMemberInformation in VBA. Does not return the property values.
I tried to use HypGetMemberInformation in VBA to find the level of a member of the grid.
I continued to get zeros even for members who are not level 0 ones.
I went to test HypGetMemberInformation a test connected grid that has members in the first column (column A).
I packed a test routine I ran after you connect the grid manually:
Void TestMemberLevelFind()
Dim line As Integer
Dim MemberProperties Collection As
Dim vtMemberName As String
' Dim vtPropertyName As String
Dim vtPropertyValue As Long
Dim vtPropertyValueString As String
Dim ErrorCode as long
Dim ErrorMessage As String
Define MemberProperties = new Collection
MemberProperties.Add HYP_MI_NAME
MemberProperties.Add HYP_MI_DIM
MemberProperties.Add HYP_MI_LEVEL
MemberProperties.Add HYP_MI_GENERATION
MemberProperties.Add HYP_MI_PARENT_MEMBER_NAME
MemberProperties.Add HYP_MI_CHILD_MEMBER_NAME
MemberProperties.Add HYP_MI_PREVIOUS_MEMBER_NAME
MemberProperties.Add HYP_MI_NEXT_MEMBER_NAME
MemberProperties.Add HYP_MI_CONSOLIDATION
MemberProperties.Add HYP_MI_IS_TWO_PASS_CAL_MEMBER
MemberProperties.Add HYP_MI_IS_EXPENSE_MEMBER
MemberProperties.Add HYP_MI_CURRENCY_CONVERSION_TYPE
MemberProperties.Add HYP_MI_CURRENCY_CATEGORY
MemberProperties.Add HYP_MI_TIME_BALANCE_OPTION
MemberProperties.Add HYP_MI_TIME_BALANCE_SKIP_OPTION
MemberProperties.Add HYP_MI_SHARE_OPTION
MemberProperties.Add HYP_MI_STORAGE_CATEGORY
MemberProperties.Add HYP_MI_CHILD_COUNT
MemberProperties.Add HYP_MI_ATTRIBUTED
MemberProperties.Add HYP_MI_RELATIONAL_DESCENDANT_PRESENT
MemberProperties.Add HYP_MI_RELATIONAL_PARTITION_ENABLED
MemberProperties.Add HYP_MI_DEFAULT_ALIAS
MemberProperties.Add HYP_MI_HIERARCHY_TYPE
MemberProperties.Add HYP_MI_DIM_SOLVE_ORDER
MemberProperties.Add HYP_MI_IS_DUPLICATE_NAME
MemberProperties.Add HYP_MI_UNIQUE_NAME
MemberProperties.Add HYP_MI_ORIGINAL_MEMBER
MemberProperties.Add HYP_MI_IS_FLOW_TYPE
MemberProperties.Add HYP_MI_AGGREGATE_LEVEL
MemberProperties.Add HYP_MI_FORMAT_STRING
MemberProperties.Add HYP_MI_ATTRIBUTE_DIMENSIONS
MemberProperties.Add HYP_MI_ATTRIBUTE_MEMBERS
MemberProperties.Add HYP_MI_ATTRIBUTE_TYPES
MemberProperties.Add HYP_MI_ALIAS_NAMES
MemberProperties.Add HYP_MI_ALIAS_TABLES
MemberProperties.Add HYP_MI_FORMULA
MemberProperties.Add HYP_MI_COMMENT
MemberProperties.Add HYP_MI_LAST_FORMULA
MemberProperties.Add HYP_MI_UDAS
' For line 8 to 83 =
For row = 8-10
vtMemberName = ThisWorkbook.ActiveSheet.Cells (rank 1). Value
For each vtPropertyName in MemberProperties
Code of error = HypGetMemberInformation(ThisWorkbook.ActiveSheet.Name, vtMemberName, vtPropertyName, vtPropertyValue, vtPropertyValueString)
If ErrorCode = 0 Then
MsgBox _
"The worksheet name:" & ThisWorkbook.ActiveSheet.Name & Chr (13) & _ "."
"Member name:" & vtMemberName & Chr (13) & _ "."
"Property type:" & vtPropertyName & Chr (13) & _ "."
"Property value:" & vtPropertyValue & Chr (13) & _ "."
"The property string:" & vtPropertyValueString ".
On the other
ErrorMessage = GetReturnCodeMessage (ErrorCode)
MsgBox "SmartView API function HypGetMemberInformation returned an error message:" & Chr (13) & ErrorMessage, vbOKOnly, PrivateConnectionDescription
End If
Next
On the next row
End Sub
The routine produces no result expected.
Only of zeros.
For all properties and all members.
There must be something fundamentally wrong with my code.
The function arguments are correct with regard to the name of journal, the member name and property name.
Value of the property is always 0 and the property value string is always empty.
Two property value arguments are expected to be passed by reference, so I should get some useful information.
No error is generated so that the return error code is always 0.
I guess that some prerequisite so that this function is not satisfied, but what is?
Concerning
Problem solved.
The cause of all evil, as ususal, type mismatch...
Arguments by reference:
vtPropertyValue, vtPropertyValueString
must be declared as variants but returned it to the values are ARRAYS...
After the function call, to loop through these berries extract the real info returned!
In the case of unique value of parameters such as the level of Member just use index 0, for example:
vtPropertyValue (0)
The corrected code is less with parts modified trhe parked in Green:
Void TestMemberLevelFind()
Dim line As Integer
Dim index As Integer
Dim MemberProperties Collection As
Dim vtMemberName As String
Dim vtPropertyName As Variant
Dim vtPropertyValue As Variant
Dim vtPropertyValueString As Variant
Dim ErrorCode as long
Dim ErrorMessage As String
Define MemberProperties = new Collection
MemberProperties.Add HYP_MI_NAME
MemberProperties.Add HYP_MI_DIM
MemberProperties.Add HYP_MI_LEVEL
MemberProperties.Add HYP_MI_GENERATION
MemberProperties.Add HYP_MI_PARENT_MEMBER_NAME
MemberProperties.Add HYP_MI_CHILD_MEMBER_NAME
MemberProperties.Add HYP_MI_PREVIOUS_MEMBER_NAME
MemberProperties.Add HYP_MI_NEXT_MEMBER_NAME
MemberProperties.Add HYP_MI_CONSOLIDATION
MemberProperties.Add HYP_MI_IS_TWO_PASS_CAL_MEMBER
MemberProperties.Add HYP_MI_IS_EXPENSE_MEMBER
MemberProperties.Add HYP_MI_CURRENCY_CONVERSION_TYPE
MemberProperties.Add HYP_MI_CURRENCY_CATEGORY
MemberProperties.Add HYP_MI_TIME_BALANCE_OPTION
MemberProperties.Add HYP_MI_TIME_BALANCE_SKIP_OPTION
MemberProperties.Add HYP_MI_SHARE_OPTION
MemberProperties.Add HYP_MI_STORAGE_CATEGORY
MemberProperties.Add HYP_MI_CHILD_COUNT
MemberProperties.Add HYP_MI_ATTRIBUTED
MemberProperties.Add HYP_MI_RELATIONAL_DESCENDANT_PRESENT
MemberProperties.Add HYP_MI_RELATIONAL_PARTITION_ENABLED
MemberProperties.Add HYP_MI_DEFAULT_ALIAS
MemberProperties.Add HYP_MI_HIERARCHY_TYPE
MemberProperties.Add HYP_MI_DIM_SOLVE_ORDER
MemberProperties.Add HYP_MI_IS_DUPLICATE_NAME
MemberProperties.Add HYP_MI_UNIQUE_NAME
MemberProperties.Add HYP_MI_ORIGINAL_MEMBER
MemberProperties.Add HYP_MI_IS_FLOW_TYPE
MemberProperties.Add HYP_MI_AGGREGATE_LEVEL
MemberProperties.Add HYP_MI_FORMAT_STRING
MemberProperties.Add HYP_MI_ATTRIBUTE_DIMENSIONS
MemberProperties.Add HYP_MI_ATTRIBUTE_MEMBERS
MemberProperties.Add HYP_MI_ATTRIBUTE_TYPES
MemberProperties.Add HYP_MI_ALIAS_NAMES
MemberProperties.Add HYP_MI_ALIAS_TABLES
MemberProperties.Add HYP_MI_FORMULA
MemberProperties.Add HYP_MI_COMMENT
MemberProperties.Add HYP_MI_LAST_FORMULA
MemberProperties.Add HYP_MI_UDAS
' For line 8 to 83 =
For row = 8-10
vtMemberName = ThisWorkbook.ActiveSheet.Cells (rank 1). Value
For each vtPropertyName in MemberProperties
Code of error = HypGetMemberInformation (ThisWorkbook.ActiveSheet.Name, vtMemberName, vtPropertyName, vtPropertyValue, vtPropertyValueString)
If ErrorCode = 0 Then
If IsArray (vtPropertyValue) then
For index = LBound (vtPropertyValue) to UBound (vtPropertyValue)
MsgBox _
"The sheet name:" & ThisWorkbook.ActiveSheet.Name & Chr (13) & _ "."
"Member name:" & vtMemberName & Chr (13) & _ "."
"Property type:" & vtPropertyName & Chr (13) & _ "."
"Property" & index & "value table:" & vtPropertyValue (index) & Chr (13) & _
"Property" & index & "string array:" & vtPropertyValueString (index)
Next
On the other
MsgBox _
"The sheet name:" & ThisWorkbook.ActiveSheet.Name & Chr (13) & _ "."
"Member name:" & vtMemberName & Chr (13) & _ "."
"Property type:" & vtPropertyName & Chr (13) & _ "."
"Property value:" & vtPropertyValue & Chr (13) & _ "
"The property string:"& vtPropertyValueString"
End If
On the other
ErrorMessage = GetReturnCodeMessage (ErrorCode)
MsgBox "SmartView API function HypGetMemberInformation returned an error message:" & Chr (13) & ErrorMessage, vbOKOnly, PrivateConnectionDescription
End If
Next
On the next row
End Sub
Fortunately we can someone find this useful.
I wish documentation Oracle was a little clearer with more extensive code examples.
Gustaw
-
Getting the closest value output
I have the table as below
with t as)
Select 1 n double union
Select 2.71 double Union
Select 2.72 double Union
Select 3 from dual union
Select 4 double)
Select * from t
I have the input as 2 value. As there is no such thing as value 2 in my table, I ve to choose the nearest value max exists in my table.
From the above table, I need to get the result as 2.71 only.
Could you please suggest the same thing.
Thank you.
variable number of val
exec: val: = 2;
with t as)
Select 1 n double union
Select 2.71 double Union
Select 2.72 double Union
Select 3 from dual union
Select 4 double
),
x as)
Select n,
Rank() over (order of abs (n -: val)) rn
t
)
Select n
x
where rn = 1
/
N
----------
2.71SQL >
SY.
-
Call a method before the following operation to set the selected values
Use case: I display a VO as an ADF multiple checkbox select. This VO is the detail of a master/detail. I managed to store the selection state in a bean managed on autoSubmit. Then the user navigate to the record of the master, and then goes back to the previous record. The buttons next and previous were created using operations in data controls. I want to back up the State of the selection by clicking previous or next.
There are a lot of tutorial on how to get the selected values, but none on how to set the selected values. How would you do it?
11 GR 1 material JDev
What I ended up doing:
1 redefine listener action for the navigation buttons
{} public void nextQuestion (ActionEvent event)
saveSelectedState();
navigateQuestion ("Next");
restoreSelectedState();
}
{} private void navigateQuestion (string operation)
OperationBinding operationBinding = ADFUtils.findOperation (operation);
operationBinding.execute ();
}
2 Save and restore the selection state using bindings
Guava Multimap
Private ListMultimap
selectedIndices. private void saveSelectedState() {}
Get id question
DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");
Question of rank = questionBinding.getCurrentRow ();
Number questionId = (Number) question.getAttribute ("Id");
JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");
int [] valueIndices = listBinding.getSelectedIndices ();
selectedIndices.putAll (questionId, Ints.asList (valueIndices));
}
private void restoreSelectedState() {}
Get id question
DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");
Question of rank = questionBinding.getCurrentRow ();
Number questionId = (Number) question.getAttribute ("Id");
int [] valueIndices = Ints.toArray (selectedIndices.get (questionId));
JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");
listBinding.setSelectedIndices (valueIndices);
}
-
Hi team,
I have the following query where I need to find the max value
[code]
with t as)
Select 'L1' R_nm, R_Data 'Data', 'Obj' R_Obj, r_prec 'Wd', '2' double val
Union of all the
Select 'L1', 'Data', 'Obj', 'No', '4' double
Union of all the
Select 'L2', 'Data', 'Obj', 'No', '4' double)
Select t.*, max (val) on rk (partition r_nm, r_data, r_obj) of t
[/ code]
My results should be
[code]
r_nm r_data r_obj r_prec rk val
L1 Data Obj 1 2 Wd
L1 data Obj 4 No.2
L2 Data Yes 1 1 Obj
[/ code]
Thank you
Hello
It seems that you are not interested in the MAX at all. Looks like you want to classify the lines, such as one that has the lowest value is assigned the number 1, the 2nd line with the lowest values gets 2,... and line with him gets N-th lowest value N. If is not serious if the MAX is 4, 2 or 420.
Here's a way to do it:
SELECT T.*
, RANK () OVER (PARTITION BY r_nm, r_obj)
ORDER BY val
) AS rk
T
ORDER BY r_nm, r_obj
val
;
Depending on how you want to deal with links, you can use ROW_NUMBER or DENSE_RANK instead of RANK.
-
Is it possible to rank with the condition of a group?
Is it possible to rank with the condition of a group? for example, I have following dataset.
I want to group founded by transaction ID. For ex, '09 'and '10' as a game and ' 06' one '07' as another set. Instead of the beginning rank, rank I want continue for any occurrence of the ' 09 'or ' 10'. In the example above, for the next line, I expect to grade 3 that there are transaction 2 '10' already exist for the same COV_CHG_EFF_DATE.RANK() OVER (partition BY PC.POLICY_NUMBER, PC.TRANSACTION_TYPE, COV_CHG_EFF_DATE order by PC.POLICY_NUMBER, COV_CHG_EFF_DATE, PC.TIMESTAMP_ENTERED) AS RNK, POLICY_NUMBER TRANSACTION_TYPE COV_CHG_EFF_DATE TIMESTAMP_ENTERED Rank 10531075PQ 01 01/FEB/2009 15/SEP/2009 01:16:09.356663 AM 1 10531075PQ 01 01/FEB/2009 15/SEP/2009 01:16:09.387784 AM 2 10531075PQ 02 15/OCT/2009 16/OCT/2009 04:40:24.564928 PM 1 10531075PQ 02 15/OCT/2009 16/OCT/2009 04:40:24.678118 PM 2 10531075PQ 10 15/OCT/2009 16/OCT/2009 04:45:20.290117 PM 1 10531075PQ 10 15/OCT/2009 16/OCT/2009 04:40:29.088737 PM 2 10531075PQ 09 15/OCT/2009 16/OCT/2009 04:40:29.088737 PM 1 (expected 3) 10531075PQ 06 17/OCT/2009 17/OCT/2009 04:45:20.290117 PM 1 10531075PQ 07 17/OCT/2009 17/OCT/2009 04:40:29.088737 PM 1 (expected 2)
09 10531075PQ October 15, 2009 October 16, 2009 04:40:29.088737 PM 1 (3 planned)
I wonder if it's possible with the rank or another another analytic function. Not looking for exact labour code, I will appreciate if someone can give me idea/advice. Example of table and the test data, if someone wants to experience
Published by: 966820 on October 30, 2012 19:26drop table PC_COVKEY_PD; create table PC_COVKEY_PD ( POLICY_NUMBER varchar(30), TERM_IDENT varchar(3), COVERAGE_NUMBER varchar(3), TRANSACTION_TYPE varchar(3), COV_CHG_EFF_DATE date, TIMESTAMP_ENTERED timestamp ); delete from PC_COVKEY_PD; commit; insert into PC_COVKEY_PD values ('10531075PQ', '021', '002', '01', to_date('01/FEB/2009','DD/MM/YYYY'), cast('15/SEP/2009 01:16:09.356663 AM' as timestamp)); insert into PC_COVKEY_PD values ('10531075PQ', '021', '001', '01', to_date('01/FEB/2009','DD/MM/YYYY'), cast('15/SEP/2009 01:16:09.387784 AM' as timestamp)); insert into PC_COVKEY_PD values ('10531075PQ', '021', '004', '02', to_date('15/OCT/2009','DD/MM/YYYY'), cast('16/OCT/2009 04:40:24.164928 PM' as timestamp)); insert into PC_COVKEY_PD values ('10531075PQ', '021', '004', '02', to_date('15/OCT/2009','DD/MM/YYYY'), cast('16/OCT/2009 04:40:24.264928 PM' as timestamp)); insert into PC_COVKEY_PD values ( '10531075PQ', '021', '005', '10', to_date('15/OCT/2009','DD/MM/YYYY'), cast('16/OCT/2009 04:40:24.364928 PM' as timestamp)); insert into PC_COVKEY_PD values ('10531075PQ', '021', '002', '10', to_date('15/OCT/2009','DD/MM/YYYY'), cast('16/OCT/2009 04:40:24.464928 PM' as timestamp)); insert into PC_COVKEY_PD values ( '10531075PQ', '021', '004', '09', to_date('15/OCT/2009','DD/MM/YYYY'), cast('16/OCT/2009 04:40:24.564928 PM' as timestamp)); insert into PC_COVKEY_PD values ('10531075PQ', '021', '004', '06', to_date('22/NOV/2011','DD/MM/YYYY'), cast('17/OCT/2009 04:40:24.564928 PM' as timestamp)); insert into PC_COVKEY_PD values ('10531075PQ', '021', '004', '07', to_date('22/NOV/2011','DD/MM/YYYY'), cast('17/OCT/2009 04:40:24.664928 PM' as timestamp)); commit; SELECT POLICY_NUMBER, TERM_IDENT, COVERAGE_NUMBER, TRANSACTION_TYPE, COV_CHG_EFF_DATE, TIMESTAMP_ENTERED, RANK() OVER (partition BY PC.POLICY_NUMBER, PC.TERM_IDENT, PC.TRANSACTION_TYPE, PC.COV_CHG_EFF_DATE order by PC.POLICY_NUMBER, PC.TERM_IDENT, PC.COV_CHG_EFF_DATE, PC.TIMESTAMP_ENTERED) AS RNK FROM PC_COVKEY_PD PC ORDER BY PC.POLICY_NUMBER, PC.TERM_IDENT, PC.COV_CHG_EFF_DATE, PC.TIMESTAMP_ENTERED ;
Maybe you are looking for
-
iPhone 6s recorded with someoneelse's media profile
Hi all I tried to find an answer to my questions, but could not find anything with the same details. Here is my case: I bought an iPhone 6 a couple of days from an online retailer who buys and sells iPhones used companies in bulk. The iPhone itself i
-
Satellite L20-153 may not get the WLAN to work
Hello world I have a problem with my laptop wifes that I've not been able 2 fix. Its windows had crashed and wouldn't start in 'BACK' keept marker just flashes and nothing happened, I tried to restore to later work windows, but that did not help, nor
-
P7 - 1446 s: limited access - unable to load web pages
Even though I am connected to the internet, web pages does not load. Fault-finding, he said: I have "limited access" (I tried the rigid cable and the woman - same deal, no go). Thought it could be my ISP, I was on the phone with support from AT & T a
-
(Urgent) Operating system drivers went
Hello friends, how are you? My name is BILAL and I'm basically trubble. In fact I bought a brand new HP Pavilion dv6-6170se laptop. but the compnay made stetup the new laptop. but do not give me any CD or DVD of Windows and drivers. A few days ago my
-
Windows Update error code 80072EE2. Update Windows Journal shows he's looking for a proxy in spite that the intenet access is direct. How can I find out Windows Update that I don't use any proxy? Proxycfg would probably help, but there are more with