How to get a unique row in a value set
How to get a unique row in a value set which is used in concurrent program.
Example if a table contains 10 unique rows i need only one row to show.
Thanks
add conditions in where clause to supress the duplicate values.
On how to supress the duplicate values follow the link
http://oracleschools.com/index.php?topic=40.msg76#msg76
Thanks
Prudhvi
www.erpschools.com
Similar Messages
-
How to get number of rows return in SELECT query
i'm very new in java, i have a question:
- How to get number of rows return in SELECT query?
(i use SQL Server 2000 Driver for JDBC and everything are done, i only want to know problems above)
Thanks.make the result set scroll insensitve, do rs.last(), get the row num, and call rs.beforeFirst(), then you can process the result set like you currently do.
String sql = "select * from testing";
PreparedStatement ps =
con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs = ps.executeQuery();
rs.last();
System.out.println("Row count = " + rs.getRow());
rs.beforeFirst();~Tim
NOTE: Ugly, but does the trick. -
How to get count of rows for a table?
Hi,
How to get count of rows for a table and secondly, how can i have access to a particular cell in a table?
Regards,
DevashishHi Devashish,
WdContext.node<Your_node_name>().size() will give you the no: of rows.
This should be the node that is bound to the table's datasource property.
WdContext.node<Your_node_name>().get<node_name>ElementAt(index_value); will select the row at that particular index.
You can access an attribute of a particular row as
WdContext.node<Your_node_name>().get<node_name>ElementAt(index_value).get<attribute_name>();
Hope this helps,
Best Regards,
Nibu.
Message was edited by: Nibu Wilson -
How to get the "last changed by" for a set of function modules?
How to get the "last changed by" for a set of function modules?
is there any table to get it??See [this|Re: Date of creation of function module] I posted earlier.
>TFDIR will give you the name of the function group program and the include number.
>E.g. SAPLZFUNCGROUP Include 01.
>From this you can construct the include name: LZFUNCGROUPU01.
>You can look this up in TRDIR to find the creation date (CDAT) of the function module.
In your case, you need unam and udat.
matt -
How to get a single row column from a viewobject in java?
I have a class file that goes out and gets a viewobject and sets its where clause
this is it:
vcRow = vc.createViewCriteriaRow();
vcRow.setAttribute("LogonId", "='" + strPcis_Login.toUpperCase() + "'");
vc.addElement(vcRow);
vo.applyViewCriteria(vc);
vo.executeQuery();
I know this working cause I can watch it in debug..
but now the problem.
I've looked in the docs and don't see how one can pull the value of the row it found and place it in a uix page in a textinput area
how can I get a single row column, in this case the UserName that is in the view object to a string and then place it into my
uix page? I've looked and looked and don't see a method for this.
is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
what way do you do this and where is it documented?is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
what way do you do this and where is it documented? What you can do is get the value from your VO and set it somewhere that UIX can data bind to -- as a Page proprety, on HttpSession, etc. This is documented in Chapters 4 (Data Binding) and 5 (Controller) of the UIX Developer's Guide.
To set a property, you use Page.setProperty(String key, String value). Then, in your UIX file, to make a textInput that has the value pulled from a given page property, use:
<textInput data:text="key@ctrl:page" />
-brian
Team UIX -
How to get the selected rows & columns in the table?
hi everybody,
In my application the table is kept inside the event structure.I select the cells in the table (using mouse) on running time.How to get the selected number of rows & columns in that table?Hello,
You can fill selected values of the table by writing to it or the corresponding property using a property node - the table is just a 2D array of strings. I think for your "disable" question you are referring to the shortcut menu (when you right click). If you are using LabVIEW 8.x, you can edit or disable that shortcut menu - just right click on your table at edit time and choose Advanced >> Run-Time Shortcut Menu.
Best Regards,
JLS
Best,
JLS
Sixclear -
Check box als column in a standard table, how to get the selected row
Dear experts,
I habe standard tablt with check box as column. Now I want to get the current selected row structure and do some changes. How could I solve this problem? till now I just know to get the structure via lead selection.
lo_node->get_element().
lo_element = lo_node->get_static_attributes ( static_attributes = ls_row).
How could I get the element through check-box in stead of lead selection. Many thanks!check this code
To get the selected row number
data: lr_element type ref to if_wd_context_element,
lv_index type i.
lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
lv_index = lr_element->get_index( ).
Thanks
Bala Duvvuri -
How to get a specific Row based on filter on a specific column value
Friends,
I have a requirement to fetch a row, maximum salary of an employee row from employee table using ADF View object, I have a view object with result set based on some critieria, now I have to get a row out of result set which is having maximum employee salary.
Please put your thoughts or experiences!!
ThanksYou should be able to add a transient attribute called maxSalary and use groovy functions to find vo.max(Salary) like -
https://blogs.oracle.com/adf/entry/using_groovy_aggregate_functions_in
How to calculate ADF table column [check Laura Akel's post]Then you can create a view criteria which equates the salaryfield to maxSalary and returns just one row. -
How to get number of rows in tableview
Hello,
Could anybody help me on how to get the number of rows in a tableview? Sort of using DESCRIBE TABLE in classic ABAP.
Thanks,
RickyThere is an attribute of the class CL_HTMLB_TABLEVIEW named
ROWCOUNT.
Inside an event u need to get this info use this code:
Replace 'Monitor' for the ID of your tableview
DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW,
r_count type i,
tv ?= CL_HTMLB_MANAGER=>GET_DATA(
request = runtime->server->request
name = 'tableView'
id = 'Monitor' ).
IF tv IS NOT INITIAL.
DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
tv_data = tv->data.
r_count = tv_data->rowcount.
ENDIF. -
V v urgent ... how to get the selected rows in the vl02n transaction
Hi ,
I have requirement that i have selected the line items in the vl02n transaction.
If I select only one row there is option gs_get_cursor-line.
If I select more than one line item at a time I am getting only the last value in to gs_get_cursor-line.
Can anybody let me know how to get the multiple line items that are selected
It is very urgent ..
Plz HelpHi,
can you check the E_row_id .
v_row type LVC_S_ROW
read table itab index E_ROW-index.
regards,
Ajay
Edited by: Ajay on Feb 14, 2008 6:22 PM -
How to get the selected rows in a table
Hi,
How to get the ids of all the selected rows. On Page load a query is executed that shows the data in a table with a checkbox in the first column to select the rows and delete. Now if a user select multiple rows how do I get the ids of selected rows in the backend code.
ThanksPlease search the forum before posting questions.
refer following thread for table selection.
Re: Record selection with MessageCheckBox and print the selected record.
--Prasanna -
How to get h:datatable rows in the managed bean
Hi All,
I am showing a table with some columns in a page. I have submit button in that page.
After submission of page,I need to get the rows displayed in the page.
how can i acheive it?
is binding attribute helps?
please provide some info..
thanks in advance..
chenna........BalusC,
thanks for ur reply..
Let me reframe my question..
here is my code snippet..
// bean
private ArrayList<MyVO> myList;
// setter and getter methods for myList......
ArrayList<MyVO> getRows(){
resultFromDB=getMyRows();// call getMyRows() DAO method for results
this.myList=resultsFromDB;
return resultFromDB;
In the jsp and displaying all the rows using<h:datatable id="someId" value="#{someBean.rows}"
so far good.
In this page i have one submit button which will call confirm() of my managed bean.
In the confirm() i need to get all the rows. i.e; i need to get the myList.
I dont want to call the getRows() method again(since it is DB hit)
But myList is empty in my confirm method.
my managed bean is in request scope.
if i change it to session it is working.but i need request scope only.
I tried with <t:saveState value="#{someBean}" /> but no luck..
Later i have taken HtmlDataTable reference with setter and getters in the bean and bind this reference in <h:datatable>.
and tried to disply the htmlDataTable rowCount...
then im getting NotSerializableException though my bean is implementing Serializable interface..
Please give some suggestion in this
thanks.... -
Hi,
SELECT main_grp_name,category,sub_category,commodity_name
FROM category_list
WHERE main_grp_name IN(
SELECT main_grp_name
FROM category_list
GROUP BY main_grp_name
HAVING COUNT (distinct category)<=3 )
This is a query which should give me unique main_grp_name and category..
For a main_grp_name there can be three category name or less but it should be unique... But now I hve a case where there are two rows with same main_grp_name and same category_name.. In this case I should look for sub_category and based on that I should pick up only one row
eg: the query returns the following
MAIN_GRP_NAME CATEGORY SUB_CATEGORY COMMODITY_NAME
MEDICINE whole_sale Trauma ABC
MEDICINE whole_sale Anxiety SYX
MEDICINE retail Trauma SSS
MEDICINE mail Anti_psy GGG
Here I should get only one out of first two rows as I am considering only MAIN_GRP_NAME and CATEGORY as the criteria.
If I have two rows with same value for these fields then I should look for SUB_CATEGORY and select the row with VALUE 'ANXIETY'
eventually I should have only
MEDICINE whole_sale Anxiety SYX
MEDICINE retail Trauma SSS
MEDICINE mail Anti_psy GGG
Anybody please help
regardsSQL> WITH t AS
2 (SELECT 'MEDICINE' main_grp_name, 'whole_sale' CATEGORY,
3 'Trauma' sub_category, 'ABC' commodity_name
4 FROM DUAL
5 UNION ALL
6 SELECT 'MEDICINE', 'whole_sale', 'Anxiety', 'SYX'
7 FROM DUAL
8 UNION ALL
9 SELECT 'MEDICINE', 'retail', 'Trauma', 'SSS'
10 FROM DUAL
11 UNION ALL
12 SELECT 'MEDICINE', 'mail', 'Anti_psy', 'GGG'
13 FROM DUAL)
14 SELECT main_grp_name, CATEGORY, sub_category, commodity_name
15 FROM (SELECT t.*,
16 ROW_NUMBER () OVER (PARTITION BY main_grp_name, CATEGORY ORDER BY sub_category)
17 rn
18 FROM t)
19 WHERE rn = 1;
MAIN_GRP CATEGORY SUB_CATE COM
MEDICINE mail Anti_psy GGG
MEDICINE retail Trauma SSS
MEDICINE whole_sale Anxiety SYX
SQL> Edited by: Salim Chelabi on 2009-02-12 09:57 -
How to get No. of rows affected by Update or Delete in Oracle in Java Code?
All,
I know that sql%rowcount can give me the rows affected. But I want to get this number directly after OracleCallableStatement.ExecuteUpdate?
Thank you.kellerer,
I appologize for what I said.
I gave a not clear question. And some rude words.
One my colleague wrote below code in order to get the affected rows after update data in Stored Procedure in Oracle. But it didn't work, so another colleague had to change the code. I think the best way is not to change Java code but change code in Stored Procedure. You know it was Friday, we all supposed to fix that change this week, I got the link you gave and tried to fix that using return in Stored Procedure. But still couldn't work after tried many times. Because I told my colleague how to change code, I had to take the responsibility, I was too impatient to write those rude words. Sorry.
int success = cs.executeUpdate(); -
How to get number of rows and columns in a two dimensional array ?
Hello,
What would be the simplest way to get number of rows and columns in a two dimensional array represented as integers ?
I'm looking for another solution as For...Each loop in case of large arrays.
Regards,
PetriHi Petri,
See a attached txt file for obtaining two arrays with upper and lower index values
Regards
Ray
Regards
Ray Farmer
Attachments:
Get2DArrayIndex.txt 2 KB
Maybe you are looking for
-
i'm not a Java expert but i like to think i'm not a beginner. I've been working on a University Project now for a week and it must be submitted tomorrow . It is a Lexical Analyzer of sorts but for some reason the program freezes and kicks out this er
-
Error when creating transport request in Charm for Portal
Hello Guru's, I'm configuring ChaRM for our Portal environment using CTS+ When I create a transport request I get the following error message: Parameter EPD not in version of tp configuration. Any thoughts???? Regards, David
-
Restore iPod touch 4g from iPhone 4 sync file
My brother bought an iPod Touch 4g. He wants his apps (and the app data) which are on my dad's iPhone ATM, on his new iPod. Is it possible to restore a iPod Touch from an iPhone Sync?
-
I assume it is wishful thinking that iPhoto will allow an upload to Google Picasaweb, other than individual emails? Simon
-
Can i use data merge with pdf images in indesign?
Hi need to do a data merge but with pdf's not jpg or tifs. I am having the result with jpgs but not with pdf's. Can i do it with pdf's?