How NOT to restrict no rows from two tables
I have two identical paintings invoice and payment. The only difference is Invoice_id Payment_id, Invoice_Amt and Payment_Amt columns displaying the amounts and different IDS. Bank_ids, names, account_types are the same. Table Invoice has 3 rows and payment 2. Just, which means that there are 3 generated invoices, but the Bank has received 2 payments. I want to show Invoice_Amt and Payment_Amt using the sql query. But its gives me total 6 rows. Whereas, I want 3 of the invoice and 2 rows of table of payment to show by-side.CREATE TABLE Bill
(invoice_id NUMBER
bank_id NUMBER,
bank_name VARCHAR2 (256),
invoice_amount NUMBER);
/
-Invoice table has 3 lines showing 3 invoice AMT
Payment of CREATE TABLE
(payment_id NUMBER
bank_id NUMBER,
bank_name VARCHAR2 (256),
Payment_amount NUMBER);
/
-Payment table has 2 lines showing 2 payments
After executing this statement sql below, I get 6 rows:
Select inv.invoice_amount, pymt.payment_amount in the invoice inv, dated payment where inv.bank_id = pymt.bank_id;
How can I show 3 rows for the invoice and 2 payment... ?
Thank you.
select inv.invoice_amount,
pymt.payment_amount
from (
select invoice_amount,
bank_id,
row_number() over(partition by bank_id order by invoice_id) rn
from invoice
) inv FULL OUTER JOIN
(
select payment_amount,
bank_id,
row_number() over(partition by bank_id order by payment_id) rn
from payment
) pymt
ON (inv.bank_id = pymt.bank_id and inv.rn = pymt.rn)
/
SY.
Tags: Database
Similar Questions
-
Hello
My main table is:
create table CvProperties( cv_id number(14) primary key, user_id number(14) constraint Cv_fk1 references users(user_id), cat_id number(14) constraint Cv_fk2 references CvCategories(cat_id), employerOrAgent_id number(14) constraint Cv_fk3 references employerOrAgent(employerOrAgent_id), staff_id number(14) constraint Cv_fk4 references staff(staff_id), cvDate timestamp(0) default sysdate, cvName varchar2(230), status number(3), prev_cvId number(14), isEdited number(2), cvSource number(2) /**website, employer, agent, staff**/ );
Detail table is:
create table cvDetails( cd_id number(14) primary key, cv_id number(14) constraint education_fk references CvProperties(cv_id), nationality varchar2(230), objectives varchar2(3900), name varchar2(230), fatherName varchar2(230), motherName varchar2(230), dob varchar2(230). gender varchar2(230), mStatus varchar2(230), passportNo varchar2(110), email varchar2(230), phone varchar2(45), mobile varchar2(25), address varchar2(2500), state varchar2(230), zipCode varchar2(230), city varchar2(230), education clob, experience clob, skills clob, languages varchar2(1400), hobbies varchar2(3200), achievements varchar2(3900), references varchar2(3900));
I'm trying to delete the cvs that have no email + mobile + phone:
select COUNT(*) from cvDetails where email is NULL AND mobile IS NULL AND phone IS NULL;
This query shows 4814 CVs.
How can I run that check if the e-mail, phone mobile, is null then remove cv of the two tables in query?
Please notify
https://www.Google.com/webhp?hl=en&tab=WW#hl=en&q=Oracle+on+delete+cascade
-
How to truncate 1000 rows from a table of 7000 lines?
Hello
Please give me a quick answer to truncate the 1000 rows from a table of 7000 lines... I don't want to truncate the entire table
Thank you all for the valuable support,
My activity is still ongoing... Somehow my client was not specific about what lines are deleted. It has no date column in the table to delete records by date...
The table contains information about the error logs, so he wanted to keep a few lines and remove the rest... and then copy the table to another database.
So right now using this query:
SQL > delete (select * from
) where rownum<> ; Once again thank you to all...
-
Extraction of data from two tables without discounting
Hi friends,
I have a problem I want to extract data from two tables without discount in the text field when I will enter any value in a text field, then the value of corressponding must come to textfield corressponding.
for example. There are two table A and B.
Table A has Colunm
S_ID number;
C_ID Varchar2 (30);
VARCHAR2 (4) s;
Second table B Colunm name
S_ID number;
What varchar (30);
L_Name varchar (20);
When I enter in a text field then the c_id 101 s_id, dry, first_name and last_name should come to corressponding text without refresh fields.
How can I do that.
Thank you
MauryYou can use Ajax and there are tons of good examples out there for this purpose;
For example [http://apex.oracle.com/pls/otn/f?p=31517:236:1876567353842241] -
How to match columns from two tables with
Hello:
I have two tables as below:
Table1::(Base Table)
Country | Prefix | Prefix_Length
Travel | 001 | 3
CountryB. 0012 | 4
PaysC | 00443 | 5
CountryD | 0091 | 4
:(Detail Table) table2
The population | Area | Prefix
500 | AreaA | 0015921
1000 | AreaB | 00122
400. AreaC. 00443743
300. ALIS | 0091333
100. AreaA | 001
I need to match these two tables with prefix columns (whose length is not fixed in the two tables: but it starts with 00 in the two tables). Two different countries the prefix may be similar up to a certain length. Thus, Prefix_Length can be used to determine (exactly) how much time should be taken in the search of Table2.
Output:
Country | Prefix | Area | Population
Travel | 001 | AreaA | 600
CountryB. 0012 | AreaB | 1000
PaysC | 00443 | AreaC. 400
CountryD | 0091 | ALIS | 300
Please help me with your valuable comments.
-TenderTry this
with base_table as ( select 'CountryA' country,'001' prefix,3 prefix_length from dual union all select 'CountryB','0012',4 from dual union all select 'CountryC','00443',5 from dual union all select 'CountryD','0091',4 from dual ), detail_table as ( select 10 no_of_call,'0015921' prefix from dual union all select 3,'00122' from dual union all select 50,'00443743' from dual union all select 50,'00443643' from dual union all select 300,'0091333' from dual union all select 60,'001' from dual ) SELECT country, prefix,sum(no_of_call) FROM ( select country, b.prefix,no_of_call, decode(no_of_call,lead(no_of_call,1,0) over(partition by no_of_call order by b.prefix,no_of_call),'y','n') y_or_no from base_table b, detail_table d where b.prefix = substr(d.prefix,1,prefix_length)) where y_or_no !='y' group by country, prefix order by country, prefix;
Published by: Vi on 20 February 2012 01:07
-
Delete rows in a table when the columns from two tables match
Hello
I have following two tables.
===========================================
create the table empbooth as
(
Select 1 empid, 1 double cabin Union all the
Select option 2, Union 1 double all the
Select 3, Union 1 double all the
Select option 4, Union 2 double all the
Select option 5, 2 double
);
create the table attsht as
(
Select 1 empid, 240 reg, 0 unpaid all double union
Select option 2, reg 200, 0 unpaid of all the double union
Select 3, 240 reg, 0 unpaid all double them union
Select 4 480 reg, 0 unpaid all double union
Select 5 240 reg, unpaid double 0
);
=================================================
I want to remove rows from attsht where corresponding booth (which is stored in the empbooth table) is 1.
The condition is 'where attsht.empid = empbooth.empid and empbooth.booth = 1 '.
I use oracle 10g.
Help, please
delete from attsht where a.empid in (select b.empid from empbooth b where b.booth = 1)
or
remove from attsht a
where exists (select null
of empbooth b
where b.booth = 1
and b.empid = a.empid)
-
How to migrate from two tables
Hello
I have three tables.
Issue table 1)
QID text
1. What is the capital of the India?
2 who is our PM?
(2) table answer
response to help qid
1 1 Chennai
2 1 Delhi
3 1 Bangulore
4 2 kamal Singh
5 2 Sonia
6 2 Manmohan Singh
(3) table c
question A B C qid
1. What is the capital of the India? Bangulore of Delhi from Chennai
2 who is our PM? Kamal Singh Sonia Manmohan Singh
Please tell me how to insert data from the first two tables in the third table by using a procedure?
I tried, I get answers in the columns...
Thank you
SAILook at this post.
(1) I used row_number to retrieve the columns, for which the data are intended
(2) I used the PIVOT to convert data into columns. -
Display data from two tables based on date criteria
Hi all
I have two tables, using these two tables and a few conditions I want to recover under result. Oracle version is (Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production)
logon_histories_r table records the information of each user who connects to the system. Subscriber Details table contains all the information corresponding to subscriber_no, only 1 row should be returned.LOGON_ID USER_ID LOGON_TIME LOGON_TYPE SUBSCRIBER_NO CUSTOMER_ID 26063548 4528890298 4/5/2010 12:03:58 AM MSISDN GSM04528890298 581751708
I'm confused usage date condition for the table of the Subscriber, the input parameter date 04/04/2006 to 15/04/06
Select lh.logon_id, lh.user_id, lh.logon_time, lh.logon_type, subs.subscriber_no, subs.customer_id
of logon_histories_r lh, subscribed subs
where lh.logon_time > = to_date('05-04-2010','dd-mm-yyyy')--to_date('04-04-2006','dd-mm-yyyy')
and lh.logon_time < to_date('06-04-2010','dd-mm-yyyy')--to_date('15-01-2007','dd-mm-yyyy')
and lh.user_id = substr (subs.subscriber_no,-10);
If the date range is 04/05/2010 to 04/06/2010 then the data related to the BAN 581751708 must be the result,
If the date range is 04/04/2006 to 15/01/2007 data related to the BAN 502499502 must be the result.
Please find DDL and data relevant to these results. There are millions of records of Subscriber & logon_histories_r table, I am given appropriate providing a subscriber_id.
CREATE TABLE LOGON_HISTORIES_R ( LOGON_ID NUMBER(12) NOT NULL, USER_ID VARCHAR2(15 BYTE) NOT NULL, LOGON_TIME DATE NOT NULL, LOGOUT_TIME DATE, LOGOUT_METHOD VARCHAR2(15 BYTE), LOGON_TYPE VARCHAR2(15 BYTE) DEFAULT 'MSISDN' ); CREATE TABLE SUBSCRIBER ( SUBSCRIBER_NO VARCHAR2(20 BYTE) NOT NULL, CUSTOMER_ID NUMBER(9) NOT NULL, SYS_CREATION_DATE DATE NOT NULL, SYS_UPDATE_DATE DATE, OPERATOR_ID NUMBER(9), APPLICATION_ID CHAR(6 BYTE), DL_SERVICE_CODE CHAR(5 BYTE) NOT NULL, DL_UPDATE_STAMP NUMBER(4), EFFECTIVE_DATE DATE NOT NULL, INIT_ACTIVATION_DATE DATE NOT NULL, SUB_STATUS CHAR(1 BYTE) NOT NULL, SUB_STATUS_DATE DATE NOT NULL, ORIGINAL_INIT_DATE DATE NOT NULL, SUB_STATUS_LAST_ACT CHAR(3 BYTE), SUB_STATUS_RSN_CODE CHAR(4 BYTE), PRODUCT_TYPE CHAR(3 BYTE), CUSTOMER_BAN NUMBER(9), CTN_SEQ_NO NUMBER(9), REQ_ST_GRACE_PERIOD DATE, REQ_END_GRACE_PERIOD DATE, COMMIT_START_DATE DATE, COMMIT_END_DATE DATE, COMMIT_REASON_CODE CHAR(3 BYTE), COMMIT_ORIG_NO_MONTH NUMBER(3), SUSP_RC_RATE_TYPE CHAR(1 BYTE), CONTRACT_NO VARCHAR2(10 BYTE), CNT_SEQ_NO NUMBER(9), DEALER_CODE CHAR(5 BYTE), ORG_DEALER_CODE CHAR(5 BYTE), SALES_AGENT CHAR(5 BYTE), ORG_SALES_AGENT CHAR(5 BYTE), REQ_DEPOSIT_AMT NUMBER(13,2), LEADING_NUMBER VARCHAR2(20 BYTE), PABX_IND CHAR(1 BYTE), NEXT_CTN VARCHAR2(20 BYTE), NEXT_CTN_CHG_DATE DATE, PRV_CTN VARCHAR2(20 BYTE), PRV_CTN_CHG_DATE DATE, NEXT_BAN NUMBER(9), NEXT_BAN_MOVE_DATE DATE, PRV_BAN NUMBER(9), PRV_BAN_MOVE_DATE DATE, SUB_STS_ISSUE_DATE DATE, ACTIVATE_WAIVE_RSN CHAR(6 BYTE), EARLIEST_ACTV_DATE DATE, SUB_ACTV_LOCATION CHAR(4 BYTE), CUST_WATCH_LMT NUMBER(11,2), CUST_WATCH_DATE DATE, BASIC_WATCH_LMT NUMBER(11,2), CREDIT_WATCH_PIN_CD NUMBER(4), SUB_MARKET_CODE CHAR(3 BYTE) NOT NULL, LIMIT_RESERVED_DAYS NUMBER(4), FF_EXPIRATION_DATE DATE, FLEX_IND CHAR(1 BYTE), DUO_IND CHAR(1 BYTE), LISTED_IND CHAR(1 BYTE), SUB_DEPARTMENT_CD CHAR(4 BYTE), LAST_SUBS_DISC_DT DATE, LAST_SUBS_DISC_DT_UD DATE, LAST_SUBSCR_DISC_SN NUMBER(3), LAST_SUBSCR_DISC_SN_UD NUMBER(3), PNI VARCHAR2(10 BYTE), RMS_REF_STORE_ID CHAR(4 BYTE), RMS_REF_TYPE CHAR(1 BYTE), RMS_REF_OD NUMBER(9), DLR_ACT_FEE NUMBER(11,2), PREP_AMOUNT NUMBER(11,2), SUBSCRIBER_ID NUMBER(9) NOT NULL, SUB_LANG CHAR(2 BYTE), SMS_RCV_STYLE_CODE CHAR(2 BYTE), CONV_RUN_NO NUMBER(3), ALLOW_ADVERTISING_IND CHAR(1 BYTE), IVR_WRONG_ACCESS_NO NUMBER(2), THRESHOLD_AMT NUMBER(11,2), PUBLISH_LEVEL CHAR(30 BYTE), AUTO_RELEASE_IND CHAR(1 BYTE), CUST_WATCH_EFF_DATE DATE, CUST_WATCH_EXP_DATE DATE, OPERATOR_CW_LMT NUMBER(11,2), SEND_SMS_FOR_MATCH CHAR(1 BYTE), CPS_STATUS CHAR(1 BYTE), CPS_TRANSACTION NUMBER(3), CPS_TYPE NUMBER(3), ISP_PASS VARCHAR2(30 BYTE), ISP_TYPE CHAR(2 BYTE), OPERATOR_TMP_DATE DATE, OPERATOR_TMP_LMT NUMBER(11,2), SUB_ORG_CD CHAR(10 BYTE), ORG_MEMBER_NO VARCHAR2(20 BYTE) ); Insert into LOGON_HISTORIES_R (LOGON_ID, USER_ID, LOGON_TIME, LOGOUT_TIME, LOGOUT_METHOD, LOGON_TYPE) Values (26063548, '4528890298', TO_DATE('04/05/2010 00:03:58', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('04/05/2010 00:06:58', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'MSISDN'); Insert into logon_histories_r (LOGON_ID, USER_ID, LOGON_TIME, LOGOUT_TIME, LOGOUT_METHOD, LOGON_TYPE) Values (2649592, '4528890298', TO_DATE('04/10/2006 19:19:20', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('04/10/2006 19:19:48', 'MM/DD/YYYY HH24:MI:SS'), 'TIMEOUT', 'MSISDN'); Insert into SUBSCRIBER (SUBSCRIBER_NO, CUSTOMER_ID, SYS_CREATION_DATE, SYS_UPDATE_DATE, OPERATOR_ID, APPLICATION_ID, DL_SERVICE_CODE, DL_UPDATE_STAMP, EFFECTIVE_DATE, INIT_ACTIVATION_DATE, SUB_STATUS, SUB_STATUS_DATE, ORIGINAL_INIT_DATE, SUB_STATUS_LAST_ACT, SUB_STATUS_RSN_CODE, PRODUCT_TYPE, CUSTOMER_BAN, CTN_SEQ_NO, REQ_ST_GRACE_PERIOD, REQ_END_GRACE_PERIOD, COMMIT_START_DATE, COMMIT_END_DATE, COMMIT_REASON_CODE, COMMIT_ORIG_NO_MONTH, SUSP_RC_RATE_TYPE, CONTRACT_NO, CNT_SEQ_NO, DEALER_CODE, ORG_DEALER_CODE, SALES_AGENT, ORG_SALES_AGENT, REQ_DEPOSIT_AMT, LEADING_NUMBER, PABX_IND, NEXT_CTN, NEXT_CTN_CHG_DATE, PRV_CTN, PRV_CTN_CHG_DATE, NEXT_BAN, NEXT_BAN_MOVE_DATE, PRV_BAN, PRV_BAN_MOVE_DATE, SUB_STS_ISSUE_DATE, ACTIVATE_WAIVE_RSN, EARLIEST_ACTV_DATE, SUB_ACTV_LOCATION, CUST_WATCH_LMT, CUST_WATCH_DATE, BASIC_WATCH_LMT, CREDIT_WATCH_PIN_CD, SUB_MARKET_CODE, LIMIT_RESERVED_DAYS, FF_EXPIRATION_DATE, FLEX_IND, DUO_IND, LISTED_IND, SUB_DEPARTMENT_CD, LAST_SUBS_DISC_DT, LAST_SUBS_DISC_DT_UD, LAST_SUBSCR_DISC_SN, LAST_SUBSCR_DISC_SN_UD, PNI, RMS_REF_STORE_ID, RMS_REF_TYPE, RMS_REF_OD, DLR_ACT_FEE, PREP_AMOUNT, SUBSCRIBER_ID, SUB_LANG, SMS_RCV_STYLE_CODE, CONV_RUN_NO, ALLOW_ADVERTISING_IND, IVR_WRONG_ACCESS_NO, THRESHOLD_AMT, PUBLISH_LEVEL, AUTO_RELEASE_IND, CUST_WATCH_EFF_DATE, CUST_WATCH_EXP_DATE, OPERATOR_CW_LMT, SEND_SMS_FOR_MATCH, CPS_STATUS, CPS_TRANSACTION, CPS_TYPE, ISP_PASS, ISP_TYPE, OPERATOR_TMP_DATE, OPERATOR_TMP_LMT, SUB_ORG_CD, ORG_MEMBER_NO) Values ('GSM04528890298', 110069191, TO_DATE('12/04/2001 17:06:17', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('01/01/2004 22:42:49', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'FUTRX ', 'CS016', NULL, TO_DATE('01/02/2004 00:08:32', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/31/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'C', TO_DATE('01/02/2004 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/31/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CAN', 'CNP3', 'GSM', 110069191, 7013986, NULL, NULL, TO_DATE('07/31/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('01/31/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'PPD', 6, NULL, NULL, 1008631, 'DCNV ', 'DCNV ', 'DFLT ', 'DFLT ', 0, NULL, 'S', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TO_DATE('01/02/2004 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), NULL, TO_DATE('07/31/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'TEMO', 0, NULL, 0, NULL, 'TEL', NULL, NULL, 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 8635, 'DK', '01', 1, 'N', NULL, 0, '1234', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); Insert into SUBSCRIBER (SUBSCRIBER_NO, CUSTOMER_ID, SYS_CREATION_DATE, SYS_UPDATE_DATE, OPERATOR_ID, APPLICATION_ID, DL_SERVICE_CODE, DL_UPDATE_STAMP, EFFECTIVE_DATE, INIT_ACTIVATION_DATE, SUB_STATUS, SUB_STATUS_DATE, ORIGINAL_INIT_DATE, SUB_STATUS_LAST_ACT, SUB_STATUS_RSN_CODE, PRODUCT_TYPE, CUSTOMER_BAN, CTN_SEQ_NO, REQ_ST_GRACE_PERIOD, REQ_END_GRACE_PERIOD, COMMIT_START_DATE, COMMIT_END_DATE, COMMIT_REASON_CODE, COMMIT_ORIG_NO_MONTH, SUSP_RC_RATE_TYPE, CONTRACT_NO, CNT_SEQ_NO, DEALER_CODE, ORG_DEALER_CODE, SALES_AGENT, ORG_SALES_AGENT, REQ_DEPOSIT_AMT, LEADING_NUMBER, PABX_IND, NEXT_CTN, NEXT_CTN_CHG_DATE, PRV_CTN, PRV_CTN_CHG_DATE, NEXT_BAN, NEXT_BAN_MOVE_DATE, PRV_BAN, PRV_BAN_MOVE_DATE, SUB_STS_ISSUE_DATE, ACTIVATE_WAIVE_RSN, EARLIEST_ACTV_DATE, SUB_ACTV_LOCATION, CUST_WATCH_LMT, CUST_WATCH_DATE, BASIC_WATCH_LMT, CREDIT_WATCH_PIN_CD, SUB_MARKET_CODE, LIMIT_RESERVED_DAYS, FF_EXPIRATION_DATE, FLEX_IND, DUO_IND, LISTED_IND, SUB_DEPARTMENT_CD, LAST_SUBS_DISC_DT, LAST_SUBS_DISC_DT_UD, LAST_SUBSCR_DISC_SN, LAST_SUBSCR_DISC_SN_UD, PNI, RMS_REF_STORE_ID, RMS_REF_TYPE, RMS_REF_OD, DLR_ACT_FEE, PREP_AMOUNT, SUBSCRIBER_ID, SUB_LANG, SMS_RCV_STYLE_CODE, CONV_RUN_NO, ALLOW_ADVERTISING_IND, IVR_WRONG_ACCESS_NO, THRESHOLD_AMT, PUBLISH_LEVEL, AUTO_RELEASE_IND, CUST_WATCH_EFF_DATE, CUST_WATCH_EXP_DATE, OPERATOR_CW_LMT, SEND_SMS_FOR_MATCH, CPS_STATUS, CPS_TRANSACTION, CPS_TYPE, ISP_PASS, ISP_TYPE, OPERATOR_TMP_DATE, OPERATOR_TMP_LMT, SUB_ORG_CD, ORG_MEMBER_NO) Values ('GSM04528890298', 502499502, TO_DATE('12/05/2006 15:55:13', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('01/12/2007 00:45:22', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'FUTRX ', 'CS058', NULL, TO_DATE('01/12/2007 00:45:22', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/05/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'C', TO_DATE('01/12/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/05/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CCN', 'NP ', 'GSM', 502499502, 14419730, NULL, NULL, TO_DATE('12/05/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('06/04/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'PPD', 6, NULL, '1035393', 6976424, '2311 ', '2311 ', 'DFLT ', 'DFLT ', NULL, '045', 'S', 'GSM04525210338', TO_DATE('01/12/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), NULL, NULL, NULL, NULL, NULL, NULL, TO_DATE('01/12/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), NULL, TO_DATE('12/05/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'TEMO', NULL, NULL, NULL, NULL, 'TEL', NULL, NULL, 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 6834900, 'DK', '01', NULL, 'N', NULL, 9999999.99, '4321', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); Insert into SUBSCRIBER (SUBSCRIBER_NO, CUSTOMER_ID, SYS_CREATION_DATE, SYS_UPDATE_DATE, OPERATOR_ID, APPLICATION_ID, DL_SERVICE_CODE, DL_UPDATE_STAMP, EFFECTIVE_DATE, INIT_ACTIVATION_DATE, SUB_STATUS, SUB_STATUS_DATE, ORIGINAL_INIT_DATE, SUB_STATUS_LAST_ACT, SUB_STATUS_RSN_CODE, PRODUCT_TYPE, CUSTOMER_BAN, CTN_SEQ_NO, REQ_ST_GRACE_PERIOD, REQ_END_GRACE_PERIOD, COMMIT_START_DATE, COMMIT_END_DATE, COMMIT_REASON_CODE, COMMIT_ORIG_NO_MONTH, SUSP_RC_RATE_TYPE, CONTRACT_NO, CNT_SEQ_NO, DEALER_CODE, ORG_DEALER_CODE, SALES_AGENT, ORG_SALES_AGENT, REQ_DEPOSIT_AMT, LEADING_NUMBER, PABX_IND, NEXT_CTN, NEXT_CTN_CHG_DATE, PRV_CTN, PRV_CTN_CHG_DATE, NEXT_BAN, NEXT_BAN_MOVE_DATE, PRV_BAN, PRV_BAN_MOVE_DATE, SUB_STS_ISSUE_DATE, ACTIVATE_WAIVE_RSN, EARLIEST_ACTV_DATE, SUB_ACTV_LOCATION, CUST_WATCH_LMT, CUST_WATCH_DATE, BASIC_WATCH_LMT, CREDIT_WATCH_PIN_CD, SUB_MARKET_CODE, LIMIT_RESERVED_DAYS, FF_EXPIRATION_DATE, FLEX_IND, DUO_IND, LISTED_IND, SUB_DEPARTMENT_CD, LAST_SUBS_DISC_DT, LAST_SUBS_DISC_DT_UD, LAST_SUBSCR_DISC_SN, LAST_SUBSCR_DISC_SN_UD, PNI, RMS_REF_STORE_ID, RMS_REF_TYPE, RMS_REF_OD, DLR_ACT_FEE, PREP_AMOUNT, SUBSCRIBER_ID, SUB_LANG, SMS_RCV_STYLE_CODE, CONV_RUN_NO, ALLOW_ADVERTISING_IND, IVR_WRONG_ACCESS_NO, THRESHOLD_AMT, PUBLISH_LEVEL, AUTO_RELEASE_IND, CUST_WATCH_EFF_DATE, CUST_WATCH_EXP_DATE, OPERATOR_CW_LMT, SEND_SMS_FOR_MATCH, CPS_STATUS, CPS_TRANSACTION, CPS_TYPE, ISP_PASS, ISP_TYPE, OPERATOR_TMP_DATE, OPERATOR_TMP_LMT, SUB_ORG_CD, ORG_MEMBER_NO) Values ('GSM04528890298', 581751708, TO_DATE('03/31/2010 19:10:33', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('04/01/2010 16:17:40', 'MM/DD/YYYY HH24:MI:SS'), 10077, NULL, 'CS009', NULL, TO_DATE('03/31/2010 19:10:33', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/31/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'A', TO_DATE('03/31/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/31/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'NAC', 'CA ', 'GSM', 581751708, 24798333, NULL, NULL, TO_DATE('03/31/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('09/29/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), NULL, 6, NULL, NULL, 12093584, '2357 ', '2357 ', 'DFLT ', 'DFLT ', NULL, '045', 'S', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TO_DATE('03/31/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), NULL, TO_DATE('03/31/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'TEMO', NULL, NULL, NULL, NULL, 'TEL', NULL, TO_DATE('12/31/4700 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9474437, 'DK', '01', NULL, 'N', NULL, 999999999.99, '12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); Insert into SUBSCRIBER (SUBSCRIBER_NO, CUSTOMER_ID, SYS_CREATION_DATE, SYS_UPDATE_DATE, OPERATOR_ID, APPLICATION_ID, DL_SERVICE_CODE, DL_UPDATE_STAMP, EFFECTIVE_DATE, INIT_ACTIVATION_DATE, SUB_STATUS, SUB_STATUS_DATE, ORIGINAL_INIT_DATE, SUB_STATUS_LAST_ACT, SUB_STATUS_RSN_CODE, PRODUCT_TYPE, CUSTOMER_BAN, CTN_SEQ_NO, REQ_ST_GRACE_PERIOD, REQ_END_GRACE_PERIOD, COMMIT_START_DATE, COMMIT_END_DATE, COMMIT_REASON_CODE, COMMIT_ORIG_NO_MONTH, SUSP_RC_RATE_TYPE, CONTRACT_NO, CNT_SEQ_NO, DEALER_CODE, ORG_DEALER_CODE, SALES_AGENT, ORG_SALES_AGENT, REQ_DEPOSIT_AMT, LEADING_NUMBER, PABX_IND, NEXT_CTN, NEXT_CTN_CHG_DATE, PRV_CTN, PRV_CTN_CHG_DATE, NEXT_BAN, NEXT_BAN_MOVE_DATE, PRV_BAN, PRV_BAN_MOVE_DATE, SUB_STS_ISSUE_DATE, ACTIVATE_WAIVE_RSN, EARLIEST_ACTV_DATE, SUB_ACTV_LOCATION, CUST_WATCH_LMT, CUST_WATCH_DATE, BASIC_WATCH_LMT, CREDIT_WATCH_PIN_CD, SUB_MARKET_CODE, LIMIT_RESERVED_DAYS, FF_EXPIRATION_DATE, FLEX_IND, DUO_IND, LISTED_IND, SUB_DEPARTMENT_CD, LAST_SUBS_DISC_DT, LAST_SUBS_DISC_DT_UD, LAST_SUBSCR_DISC_SN, LAST_SUBSCR_DISC_SN_UD, PNI, RMS_REF_STORE_ID, RMS_REF_TYPE, RMS_REF_OD, DLR_ACT_FEE, PREP_AMOUNT, SUBSCRIBER_ID, SUB_LANG, SMS_RCV_STYLE_CODE, CONV_RUN_NO, ALLOW_ADVERTISING_IND, IVR_WRONG_ACCESS_NO, THRESHOLD_AMT, PUBLISH_LEVEL, AUTO_RELEASE_IND, CUST_WATCH_EFF_DATE, CUST_WATCH_EXP_DATE, OPERATOR_CW_LMT, SEND_SMS_FOR_MATCH, CPS_STATUS, CPS_TRANSACTION, CPS_TYPE, ISP_PASS, ISP_TYPE, OPERATOR_TMP_DATE, OPERATOR_TMP_LMT, SUB_ORG_CD, ORG_MEMBER_NO) Values ('GSM04528890298', 816370100, TO_DATE('09/03/2005 10:12:13', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/14/2006 12:20:09', 'MM/DD/YYYY HH24:MI:SS'), 14462, NULL, 'CS016', NULL, TO_DATE('03/14/2006 12:20:08', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('09/03/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'C', TO_DATE('03/14/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('09/03/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CAN', 'CNP3', 'GSM', 816370100, 12575966, NULL, NULL, TO_DATE('09/03/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/02/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'PPD', 6, NULL, '690925', 3436964, '4243 ', '4243 ', 'DFLT ', 'DFLT ', NULL, '045', 'S', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TO_DATE('03/14/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), NULL, TO_DATE('09/03/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'TEMO', NULL, NULL, NULL, NULL, 'TEL', NULL, NULL, 'N', 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1436383, 'DK', '01', NULL, 'N', NULL, 9999999.99, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
Hello
Welcome to the froum!
Thanks for posting the CREATE TABLE and INSERT! It's very nigra.
user12990691 wrote:
...
logon_histories_r table records the information of each user who connects to the system. Subscriber Details table contains all the information corresponding to subscriber_no, only 1 row should be returned.Do you mean a line by the user, or a line every time that you run the report, regardless of the number of users connected during the period that interests us?
Anyway, if there are multiple logons, how do you decide that one? Or the output of logon_histories_r columns will be a sort of composite?I'm confused usage date condition for the table of the Subscriber, the input parameter date 04/04/2006 to 15/04/06
Select lh.logon_id, lh.user_id, lh.logon_time, lh.logon_type, subs.subscriber_no, subs.customer_id
of logon_histories_r lh, subscribed subs
where lh.logon_time > = to_date('05-04-2010','dd-mm-yyyy')--to_date('04-04-2006','dd-mm-yyyy')
and lh.logon_time< to_date('06-04-2010','dd-mm-yyyy')="" --="">
and lh.user_id = substr (subs.subscriber_no,-10);Must LH.LOGON_TIME match something in the subscruber table? If so, you need to addsome extra join pathological.
For example, if lh.logon_time must be between d1 and d2 (where d1 and d2 are DATE columns), then:select lh.logon_id , lh.user_id , lh.logon_time , lh.logon_type , subs.subscriber_no , subs.customer_id from logon_histories_r lh , subscriber subs where lh.logon_time >= to_date ('05-04-2010','dd-mm-yyyy') -- to_date('04-04-2006','dd-mm-yyyy') and lh.logon_time < to_date ('06-04-2010','dd-mm-yyyy') -- to_date('15-01-2007','dd-mm-yyyy') and lh.user_id = substr (subs.subscriber_no, -10) and lh.logon_time >= subs.d1 -- New condition added and lh.logon_time <= subs.d2 -- New condition added ;
Please find DDL and data relevant to these results. There are millions of records of Subscriber & logon_histories_r table, I am given appropriate providing a subscriber_id.
That's smart, don't not post each row of the table: looks like you posted just enough to show what the problem is.
Try to do the same thing with the columns. Do not post every single column, just the columns that have something to do with the problem. -
Extract single line transformed from two tables
I have two tables T1 and T2 with the same set of columns. The columns are C1, C2, C3, COND1. I need to issue a query that returns a line transformed in order to respect the following rules:
1. the returned line may contain values from both tables based on the values of column in table T1.
2 return the column C1 in table T1; If it is NULL, then return to any value is present in the column C1 of T2.
3. article 2 above apply to all columns like C1, C2 etc.
I published the following query. The problem is that if a subquery does not reach the entire query fails. Someone help me please. Probably there is another simple method.
SELECT NVL (T1.c1, T2.c1) c1, c2 (T1.c2, T2.c2) NVL NVL (T1.c3, T2.c3) c3
FROM (SELECT c1, c2, c3
FROM T1
WHERE cond1 = 'T10') T1
(SELECT c1, c2, c3
THE T2
WHERE cond1 = "T200") T2;
Hello
user4274403 wrote:
I have two tables T1 and T2 with the same set of columns. The columns are C1, C2, C3, COND1. I need to issue a query that returns a line transformed in order to respect the following rules:
1. the returned line may contain values from both tables based on the values of column in table T1.
2 return the column C1 in table T1; If it is NULL, then return to any value is present in the column C1 of T2.
3. article 2 above apply to all columns like C1, C2 etc.
I published the following query. The problem is that if a subquery does not reach the entire query fails. Someone help me please. Probably there is another simple method.
SELECT NVL (T1.c1, T2.c1) c1, c2 (T1.c2, T2.c2) NVL NVL (T1.c3, T2.c3) c3
FROM (SELECT c1, c2, c3
FROM T1
WHERE cond1 = 'T10') T1
(SELECT c1, c2, c3
THE T2
WHERE cond1 = "T200") T2;
Are you saying that if there is no row in t1 that satisfy the condition cond1 = "T10", then you want to keep seeing the lines (and values) of the t2?
And even, if there is no row in t2 that satisfy the cond1 = "T200" condition, then you want to keep seeing the lines (and values) from t1?
If so, this looks like a job for a full outer join.
You can change the join in a full outer join as follows:
SELECT NVL (T1.c1, T2.c1) AS c1
, NVL (T1.c2, T2.c2) C2
NVL (T1.c3, T2.c3) AS c3
FROM T1
FULL OUTER JOIN T2 ON t1.cond1 = 'T10 '.
AND t2.cond1 = 'T200.
WHERE t1.cond1 = 'T10 '.
OR t2.cond1 = "T200"
;
If you would care to post CREATE TABLE and INSERT instructions for some examples of data, then I could test this.
What happens if no table has all the lines that have good values in cond1?
-
LOV in richeTableau resets the value after the deletion of rows from the table
Hello. I'm on 11g R2
I have a table with columns in the box and a button in the toolbar that removes the lines checked
I have build it based on the following article in her string code
http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html
When I run the "delete" button I execute the following code (taken as is article)
public void deleteSelectedRows() {}
create a second line, the value do not affect all lines
used in ADF
Set of rows duplicateRowSet = this.createRowSet ("duplicateRowSet");
first row to avoid "the attempt to access the value of lines."
exception line was dead.
duplicateRowSet.first ();
retrieve the current row of the table for after
re-running the VO
Line currentRow = this.getCurrentRow ();
Boolean currentRowDeleted = false;
get all rows that have the transoent attribute
"MarkForDelete' set to true
Row [] rowsToDelete =
duplicateRowSet.getFilteredRows ("MarkedForDelete", true);
If (rowsToDelete.length > 0) {}
run only throizgh this code, if there is something to
delete
for (line rw: rowsToDelete) {}
If the row is marked as the current in VO, ts value
Boolean flag
If (rw.getKey () .equals (currentRow.getKey ())) {}
currentRowDeleted = true;
}
remove the line - do not yet commit
RW. Remove();
}
rerun VO
this.executeQuery ();
reset the current line if it has not been removed
If (! currentRowDeleted) {}
this.setCurrentRow (currentRow);
}
duplicateRowSet.closeRowSet ();
}
}
"MarkedForDelete" is a transient attribute used to mark the line delete
The lines are removed very well.
The problem is with lines that I do not delete.
For example I LOV column. I chose the value LOV in a few lines, and after that choose to delete several lines (not the same lines where I modified the LOV) but some other lines.
After I click "delete", the lines that I marked to remove deleted indeed, but the value of the LOV in other rows (I have not scored for delete) are disabled.
How to preserve value LOV so it will remain also after I deleted some lines?
P.S. I've tried autosubmit = "true" - it did not help
It is expected because I see that you rerun the query.
Once you re - run, it retrieves from the database again. Thus, your values are lost because they are not posted.
I don't think that run query is necessary, try to have a programmatic part trigger on the table after you remove all of the lines.
Thank you
Alisson.
-
Hello, I have a problem writing to a specific SELECT statement and I hope you can help me.
I have two tables:
Customer:
-Integer ID (PK)
-Name_SecondName varchar (20)
-Char sex
-Full scale
Investments:
-Integer ID (PK)
-Whole amount
-Interest Numeric (3.2)
-Client_ID (FK)
My job is to display a number of men and a few women who have at least a $ 1000 investment. I'll jump to add data to the table, my point is simply to find a correct interpretation of the SQL query. Right now I have this:
SELECT COUNT (DISTINCT Client_ID), COUNT (DISTINCT Client_ID)
SOME customers JOIN investments
WE Clients.ID = Investments.Client_ID
WHERE amount > 1000;
Of course, it displays twice the number of clients thanks to an investment of more than $ 1000. But how do I specify that the first indictment counts men (sex = am') and second - women (sex = 'F')? Can someone help me?
Published by: 934019 2012-05-13 12:10Hello
Here's a way to do
SELECT COUNT (DISTINCT CASE WHEN c.gender = 'M' THEN c.client_id END) AS men , COUNT (DISTINCT CASE WHEN c.gender = 'F' THEN c.client_id END) AS women FROM clients c JOIN investments i ON c.client_id = i.client_id WHERE i.amount >= 1000 ;
This query will work in Oracle 8.1 or more.
Since you have Oracle 11, you can also use the SELECT... Function pivot, but in this case, it's more complicated. That's because what to CHOOSE... PIVOT includes automatically by each column that is not involved in the pivot. (In this case, this means that all except sex and client_id columns.) Often, you do sort of a subquery to get the dynamic no cross data, so it is easy to include only the relevant columns. In this case, however, you need not any kind of subquery, so you should add a fair to exclude the additional columns if you want to use SELECT... PIVOT.As you say in your original post, this account of customers who have any single investment of 1000 or more. In your last post, you posted a query that looks for investments of more than 15,000. You can change the WHERE clause to say
WHERE i.amount > 15000
but which would produce 0 men and 0 women, given that all of the amounts in the sample data are 10000.
934019 wrote:
Is it possible to display the entire word 'Genre' and not only "G"?Sure.
SQL * automatically sizes string columns to their maximum size. Since between the sexes are defined as CHAR (1), its maximum size is 1 character, then SQL * Plus allocates only 1 space for her, truncate the heading after 1 character. You can explicitly set the width on anything it is large enough to show the entire title, like this:
COLUMN gender FORMAT A6
Include this command before you run the query. Then, SQL * Plus uses 6 places to display the sex, so there will be place for all 6 characters in the heading.
-
Find unmatched columns from two tables
Hello guys,.
I am trying to compare two tables based on a key of the indexed columns.
Here is an example of what I'm trying to achieve:
Table A: A_ID A_Name A_Income A_housecount
Jess 11 9 2
Rauny 4 6 22
Table b: B_ID B_Income B_housecount
11-5-2
22 6 4
In the example above data columns A_ID and B_Id are same in both tables. I'm trying to compare A_Income with B_Income & & A_housecount with B_housecount. The results of this series of samples would be:
11-9-2
11-5-2
as income in the same id is different.
As I have large amount of data in the two tables can you please give me some ideas on how I can get my results? Let me know if the explanation is not clear for you.
Thanks in advanceselect hshold_id,hsold_income,hshold_size, 'abc.' || case count(src1) when 0 then 'demo' else 'hshold' end the_source from (select hshold_id,hsold_income,hshold_size, 1 src1, to_number(null) src2 from abc.hshold union all select hshold_id,hsold_income,hshold_size, to_number(null) src1, 2 src2 from abc.demo ) group by hshold_id,hsold_income,hshold_size having count(src1) != count(src2)
Concerning
Etbin
Edited by: Etbin on 11.2.2011 18:00
correction of alignment -
help in registration of the records from two tables
HI: I have two tables joined the first field. The field is the primary key in the first table. Need help listing records from both tables with each a line/record results.
I want to print each record in the table of EVENTS such as a line and the corresponding records in EVENT_UPDATES as a line like this recordcreate table EVENTS ( event_key varchar2(64) primary key, event_description varchar2(64), create_time int ); create table EVENT_UPDATES ( event_key varchar2(64) NOT NULL , update_description varchar2(64), update_time int ); insert into EVENTS values('Event1', 'This is event1', 1); insert into EVENT_UPDATES values('Event1', 'Ticket created', 3); insert into EVENT_UPDATES values('Event1', 'Event cleared', 10); insert into EVENTS values('Event2', 'This is event2', 4); insert into EVENT_UPDATES values('Event2', 'Ticket created', 6); insert into EVENT_UPDATES values('Event2', 'Event cleared', 8);
TIAEvent1 1 This is event1 3 Ticket created 10 Event cleared Event2 4 This is event2 6 Ticket created 8 Event cleared
Raviselect case weight when 1 then event_key end key, time_val, description from ( select event_key, create_time time_val, event_description description, 1 weight from events union all select event_key, update_time, update_description, 2 weight from event_updates ) order by event_key, weight / KEY TIME_VAL DESCRIPTION ---------- ---------- ------------------------- Event1 1 This is event1 3 Ticket created 10 Event cleared Event2 4 This is event2 6 Ticket created 8 Event cleared 6 rows selected. SQL>
SY.
-
How to identify the current row in the table of selectOneChoice compact mode
Hello
I have an af:table in which one of the columns is selectOneChoice in compact mode. When you select the point in this selectOneChoice, valueChangeListener fires and do some work based on this line. However, my problem is that it is difficult to identify the current line, because the selectOneChoice is in compact mode. If the selectOneChoice is not in compact mode, when the user selects an item in selectOnechoice, af selectionListener: table is triggered to identify the current row. But if selectOneChoice is in compact mode, user has the option to choose from selectOneChoice and valueChangeListener fires before af selectionListener: table is triggered. Therefore, not able to identify the current row.
As a workaround is not so perfect, I tried to put the line identifier (in my case it is DetailSeq) in shortDesc and do it from there. But users complain seeing this not user-friendly in shortDesc/hintText. I tried to put DetailSeq as the id of the selectOneChoice, but it works not (cannot get the selectOneChoice in the table Id)
< af:table >
....
< af:column = 'Action' id headerText = "c5" width = "30" >
< af:selectOneChoice id = "has$ {row.» AutoSubmit DetailSeq}' = 'true' valueChangeListener = "#{viewScope.backing_requestOverview.onSelectAction}" label = "Action" mode = "compact" shortDesc = "#{row." " DetailSeq} ">"
< f: selectItems value = "#{backing_requestOverview.requestActionsMap [row." StatusUid]}"id ="si333"/ >
< / af:selectOneChoice >
< / af:column >
....
< / af:table >
In the valueChangeListener:
{} public void onSelectAction (ValueChangeEvent valueChangeEvent)
RichSelectOneChoice actionChoice = (RichSelectOneChoice) valueChangeEvent.getComponent ();
LOGGER.info ("Short Desc:" + actionChoice.getShortDesc ());
LOGGER.info ("Id of the component:" + actionChoice.getId ());
}
Any advice?
Thank you
-Mina
Have you tried the setPropertyListener?
Timo
-
How to select all the rows in a Table
Hello
JDEV 11.1.1.2.0 work.
I need to select all the lines all in the click of a button, how can I achieve this? Here is table unique selection/multi selection.
someone can help me.
Published by: user5802014 on June 30, 2010 08:32Rather than try to direct you to the message that I want to say, I'll just copy the code here with credit to Frank Nimphius
The post is a hyperlink on the word present in the step 5 post of my "how to search in the forum" :)
RichTable _table = employeesBackingBean.getEmployeeTable1(); RowKeySet rks = new RowKeySetImpl(); CollectionModel model = (CollectionModel)_table.getValue(); int rowCount = model.getRowCount(); for (int i = 0; i < rowCount; i++) { model.setRowIndex(i); //note that in the simple POJO case, the row key is the same //as the index. However, it would be wrong to just rely on this //because other models or custom table models my return a more //comples key. Therefore we iterate over the available rows to //obtain the keys. Object key = model.getRowKey(); //add the row keys to the RowKeySet to mark selected rks.add(key); } _table.setSelectedRowKeys(rks); AdfFacesContext.getCurrentInstance().addPartialTarget(_table);
Maybe you are looking for
-
Hi all I tried manipulate a table but failed. At the present time, I have an array Ref: 1 2 3 4 5 6 7 8 9 10 and a measurement range: 4.2, 5.2, 8.2, 9.2. The measured table will be compared with the ref and table if the table falls in the Ref, the va
-
Problem running lvlibp architecture plugin with DAQ
Hi all We are trying to build a plugin (https://decibel.ni.com/content/docs/DOC-15014) architecture, using lvlibp (https://decibel.ni.com/content/docs/DOC-19176) and DataTranslation Lvlink 3.0 drivers for cards DAQ translation of data (for those inte
-
Trying to move from XP to Vista Ultimate. During installation, the installation gets to 21% on the files and then closes and I get the error "Windows could not update the configuration to start the computer. Installation cannot continue. Can someon
-
Hello is it possible to see the contents of the directory implemented through telnet or SSH on the Codec C20? I want to be able to tell if the system is to learn a repertoire of MSDS and whats inside without really physically go to the system. On old
-
Test command of the AAA for EAP - TLS authentication for wireless users
Hi all Can anyone suggest me the test command to verify the eap - tls authentication for the Cisco WAP's wireless. If it's an authetication jump we can use the command to test the connection below Radius of group aaa Testwap-01 #test [email protected