Joining Two Tables with a DISTINCT column value
I have two tables I need to join, but the 'left' table I only need DISTINCT for a column.
create table t1
bid number(8),
b_number number(8),
dset varchar2(20),
misc varchar2(20)
create table t2
cid number(8),
track number(8)
select bid, cid
from ( select bid, b_number
from t1
where dset = 'ABC1234'
and misc = 'TEXT'
) x,
( select cid, track
from t2
where exists ( select 1 from t2 where t2.track = t1.b_number )
) z
where x.b_number = z.trackI only need records with DISTINCT cid values, but I keep getting multiple instanced of cid.
Any suggestions?
Thanks!
Maybe this?
select distinct cid
from t2
where track in
select b_number
from t1
where dset = 'ABC1234'
and misc = 'TEXT'
)
Similar Messages
-
How to join two tables with no similar columns
Hi all,
I have two tables as follows:
Table T1 have Attributes as follows:
GLCODE,
BRANCH,
ITEM_NUMBER,
DEMAND_DATE,
QUANTITY,
SOURCE
Table T2 have Attributes as follows:
FORECAST_DATE
Now in SQL if run the following stattement iam getting out put.
SELECT GLCODE,BRANCH,ITEM_NUMBER,DEMAND_DATE,QUANTITY, SOURCE,(SELECT DISTINCT FORECAST_DATE FROM T2) FROM T1
The above SQL Statement giving correct results for me.
The same SQL Statement how can we implement in mapping level?
Regards,
AvaJaap van,
>
You have to specify an outer join, but how do you do that if there is no join to begin with? I would do the following (which I didn't test yet):
add an extra column (say C_JOIN) to the T2-ingroup of the join operator and fill it with from a constant operator with say value 1. Then use T2.C_JOIN (+) = 1 as the join condition.
If every record in T2 is guaranteed to have the same value, instead of using a deduplicator, which will read all records, sort them and deduplicate them, you can use a filter with filter condition ROWNUM < 2, which only will read one record.
I am facing almost the same problem but not entirely thou and I was wondering if you have an idea how to even start.
Problem:
I got this table:SQL> desc ita.tpis32_job_status
Name Null? Type
JOBID NOT NULL NUMBER
T1_ID NUMBER
QID NUMBER
REQ_TYPE VARCHAR2(10)
SUBMIT_TIME DATE
OWNERID VARCHAR2(30)
DESCRIPTION VARCHAR2(150)
STARTTIME DATE
ENDTIME DATE
STATUS VARCHAR2(50)
ERROR_ID NUMBER
TABLE_NAME VARCHAR2(30)
SERVER_ID VARCHAR2(10)
DATABASE VARCHAR2(20)
PRIORITY NUMBER
NUM_LINES NUMBER
PROCESS_ID NUMBER
QUE_TIME NUMBER
STATUS_CODE NUMBER
ERROR_MSG VARCHAR2(500)
NUM_LINES_TS NUMBER
REMOTE_STATUS NUMBER
This the above table, i am looking for JOBID (a five digit number) like 25875.
What I want to do is add or append this five digit number to a string to find the corresponding table in dba_tables or all_tables. The only way I have try to do this is by writing PLSQL as you see from here:
Re: Use PLSQL to delete tables dynamically
When the select is writing properly, the result of the five digit number from JOBID and the string should look like the below result (job_(five digit_%).
My problem is there is no relationship between ALL_TABLES and the my own table (ita.tpis32_job_status). Any help will be appreciated.
TABLE_NAME
JOB_58871_OUTDATA
JOB_58868_TS
JOB_58868_OUTDATA
JOB_58867_TS
JOB_58867_CMDLBL_2
JOB_58867_OUTDATA
JOB_58866_TS -
Combining two tables without any distinct columns between them
Folks,
Hi sidy2j,
According to your description, we need to verify your table structures, and the actual results which you want to get from your tables. Please post more information for analysis.
Assume, if you want to a one to one record mapping between two tables without any common column between them for joining, you can refer to the following scripts to implement your requirement. For more information, see:
http://sqlhints.com/2013/09/07/joining-two-tables-without-any-common-column-between-them-sql-server/
If you want to match every row in the first table with every row in the second table, you can refer to the following detail.
http://stackoverflow.com/questions/1198124/combine-two-tables-that-have-no-common-fields
Hope it can help you.
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Cartesian of data from two tables with no matching columns
Hello,
I was wondering – what’s the best way to create a Cartesian of data from two tables with no matching columns in such a way, so that there will be only a single SQL query generated?
I am thinking about something like:
for $COUNTRY in ns0: COUNTRY ()
for $PROD in ns1:PROD()
return <Results>
<COUNTRY> {fn:data($COUNTRY/COUNTRY_NAME)} </COUNTRY>
<PROD> {fn:data($PROD/PROD_NAME)} </PROD>
</Results>
And the expected result is combination of all COUNTRY_NAMEs with all PROD_NAMEs.
What I’ve noticed when checking query plan is that DSP will execute two queries to have the results – one for COUNTRY_NAME and another one for PROD_NAME. Which in general results in not the best performance ;-)
What I’ve noticed also is that when I add something like:
where COUNTRY_NAME != PROD_NAME
everything is ok and there is only one query created (it's red in the Query plan, but still it's ok from my pov). Still it looks to me more like a workaround, not a real best approach. I may be wrong though...
So the question is – what’s the suggested approach for such queries?
Thanks,
Leszek
Edited by xnts at 11/19/2007 10:54 AMWhich in general results in not the best performanceI disagree. Only for two tables with very few rows, would a single sql statement give better performance.
Suppose there are 10,000 rows in each table - the cross-product will result in 100 million rows. Sounds like a bad idea. For this reason, DSP will not push a cross-product to a database. It will get the rows from each table in separate sql statements (retrieving only 20,000 rows) and then produce the cross-product itself.
If you want to execute sql with cross-products, you can create a sql-statement based dataservice. I recommend against doing so. -
Join two tables with no matching records
Hi All,
I have two tables which have got data as below. Now I need to join those two tables but there are no matching rows or columns in those tables. I have used OUTER JOIN but query was taking more than 5 mnts to run. Whats the best way to join two tables where
there are no matching records.
Table : Sections &Table : orders
I am expecting the final output like I have mentioned below.
How can i write a JOIN. Note there are no matching records from both the tables.
Pls.This is a very urgent requirement.Regards
-pepThanks Elrand. I have one question. What if I want to add 10 more parameters in @Section table then
the logic I have written below will not work. I will have to make it dynamic. Any suggestions.?
declare @test table (RowNo INT,CokeType NVARCHAR(MAX),BeginUsage dateTIME)
declare @Section table (SectionName NVARCHAR(100))
insert into @Section values ('CokeType')
insert into @Section values ('BeginUsage')
insert into @test values (1,'OMV - 02E (04/2012)','01-02-2014')
insert into @test values (2,'OMV - 02E (04/2012)','01-03-2014')
insert into @test values (3,'PCIC - 01 (01E/2013)','01-04-2014')
insert into @test values (4,'PCIC - 01 (01E/2013)','01-05-2014')
insert into @test values (5,'PCIC - 01 (E) - 07/2011 & Alba /2010 (C/F) 05/2011','01-06-2014')
select * from @Section
select * from @test
SELECT
RowNo,SectionName,
CASE
WHEN(SectionName = 'CokeType') THEN CokeType
ELSE
CAST (BeginUsage AS VARCHAR(MAX))
END
AS DATA
FROM @Section AS S
CROSS APPLY
(SELECT T.RowNo,T.CokeType,T.BeginUsage FROM @test T) P
ORDER BY SectionName DESC -
Want to Join two tables with cursors
Can anyone tell me how to join two tables only by cursors.
Not with:
1.Joining condition
2.Procedure etc.
Only cursors with passing parameters.
SowmyaThis is my assignment. I want to get the matching records from both tables. I have pk, fk for both tables for deptno.Can I pass parameter for this.
dept table:
deptno deptname
10 sales
20 Erp
30 hr
40 marketing
emp table:
Empno deptno Name
1 10 lee
2 20 hans
3 10 peter
4 30 james
5 30 king
Output should be:
deptno empname empno deptname
10 lee 1 sales
10 peter 3 erp
30 james 4 hr
30 king 5 marketing -
Joining Two Tables with Total Amount
Hi All,
I'm trying to join to tables P02 and P30 on the invoice no fields but getting duplicates. In table P30 we need to sum the payment column per invoice to get the actual payment amount. This then needs to Join to table P02. I have uploaded sample
data on this link and provided an example on how the output should like.
https://app.box.com/s/pu8oa4f3jhrhm0ylshdz2fuo7541vn4z
Thanks
JagI figured out why the duplicates appear. I'm attaching another table supplier to fill in the missing propcode when running the query below
SELECT P02.P02_UNIQUE, p30.PROP_CODE, P02.SUPP_ALPHA+P02.SUPP_NUMERIC As SupplierCode, P02.INV_ALPHA+P02.INV_NUMERIC AS InvoiceNo,TotalPayment, Year, Month
FROM P02
CROSS APPLY (
SELECT PROP_CODE, SUM(TOTAL_AMOUNT) AS TotalPayment, P30.INVOICE_NUMB, DATEPART(year,[CREATED_DATE_SQL]) AS [Year], DATEName(Month,[CREATED_DATE_SQL]) AS [Month]
FROM dbo.P30
WHERE P02.INV_ALPHA+P02.INV_NUMERIC = P30.INVOICE_NUMB
GROUP BY PROP_CODE, COST_CENTRE, DATEPART(year,[CREATED_DATE_SQL]), DATEName(Month,[CREATED_DATE_SQL]), P30.INVOICE_NUMB
)P30
Where P02.SUPP_ALPHA+P02.SUPP_NUMERIC = '668'
Result below and the last row the prop_code is missing
I have another table supplier which has the suppliercode and propcode so was trying to use the prop_code field from supplier table instead of P30 table to fill in the gap. But when i do that i get duplicates and wrong values.
I have updated the sample data with supplier table. -
Merge Two Tables with the same columns but different data
I have a table that has the following columns:
Current Table Definition
commonname
family
genus
species
subspecies
code
I have a number of entries that donât fit the current table definition â that is that they only have a common name or description and a code. These records donât actually represent a species but are needed for data entry because they represent an object that may be encountered in the study (Bare Ground â which isnât a species but would need to be recorded if encountered). So I would really like 2 tables:
Table 1 Miscellaneous
name
code
Table 2 Plant Species
commonname
family
genus
species
subspecies
code
I would like two tables so I can enforce certain constraints on my species table like requiring that the family, genus, species, subspecies combination is unique. I canât do this if I have all the âotherâ records that donât have a family, genus, species, or subspecies unless I put in a lot of dummy data into the fields to make each record unique. I donât really want to do this because these miscellaneous records really donât represent a specific species.
So â the problem is that while I want this data separate I will need to point a column from another table to the code column in both tables.
How is this best done? Table? View? Merge?Hi,
Actually you don't have to use scope refs. Sorry but I misunderstood you earlier. Here is a complete example that does exactly what you want. Notice how I added the constraint to the materialized view. Also notice when we try to insert a code in tbl3 that doesn't exist in the view, we get an error. HTH.
SQL> create table tbl1 (name varchar2(10), code varchar2(3) primary key);
Table created.
SQL> create table tbl2 (commonname varchar2(10), code varchar2(3) primary key);
Table created.
SQL> insert into tbl1 values ('n1','c1');
1 row created.
SQL> insert into tbl1 values ('n2','c2');
1 row created.
SQL> insert into tbl1 values ('n3','c3');
1 row created.
SQL> insert into tbl2 values ('name1','c1');
1 row created.
SQL> insert into tbl2 values ('name2','c2');
1 row created.
SQL> insert into tbl2 values ('name3','c3');
1 row created.
SQL> commit;
Commit complete.
SQL> create materialized view view1 as select name, commonname, tbl1.code from tbl1, tbl2 where tbl1.code = tbl2.code;
Materialized view created.
SQL> select * from view1;
NAME COMMONNAME COD
n1 name1 c1
n2 name2 c2
n3 name3 c3
SQL> create table tbl3 (code varchar2(3), record varchar2(1));
Table created.
SQL> alter table view1 add constraint view1pk primary key (code); -- <-Note how I added a constraint to the view
Table altered.
SQL> alter table tbl3 add constraint tbl3fk foreign key (code) references view1(code);
Table altered.
SQL> insert into tbl3 values ('c1','r');
1 row created.
SQL> insert into tbl3 values ('c99','r');
insert into tbl3 values ('c99','r')
ERROR at line 1:
ORA-02291: integrity constraint (RAJS.TBL3FK) violated - parent key not found
SQL> spool of;
-Raj Suchak
[email protected] -
Need to update a single column in a table with some other column value
Hi experts,
I was about to change one column data type in a table. Then I renamed that column name to "old_column_name" . Later I added new column name with required datatype( My case its NCLOB). Now I want to update the new column value with old column value.I mean i have to copy the data. But data amount is very huge. Its more than 1.5 crores of data. But on promote day, I have only 1 hr of outage. Please suggest the effective solution to achieve this.Hi Stew
I have 1 primary key in my table and 11 foreign keys in my table.there are 20 check constraints as well.
If i go for an online redefine of a table, these objects will be created back automatically?
Please clarify.
This is my table. Here Remarks is the column with CLOB datatype. To support multi language, I need to change it to NCLOB. That column having data so i cant rename it.
So I added new column , after renaming that remarks to old_remarks. Now new column remarks is ready with NCLOB data type, but no data in it.
To copy the old remarks column into new remarks column, i thought to write one script. But how it is achievable using "DBMS_REDEFINITION". Please explain me,
create table XXXXXXXXXX
ID NUMBER(8),
COMPLETED_DATE DATE,
COMMUNICATION_MEDIUM VARCHAR2(32),
REMARKS1 VARCHAR2(4000),
COPY VARCHAR2(1),
IO_MARKER VARCHAR2(3),
EVENT_DATE DATE,
CON_REF_NO NUMBER(8),
DEP_CODE VARCHAR2(6),
SFM_STAFF_NO NUMBER(8),
CRPD_ID NUMBER(8),
CRPD_ID_COPY NUMBER(8),
STATUS VARCHAR2(2),
COMEBACK_NO NUMBER(2),
ADD_ADD_ID NUMBER(10),
AEV_ID NUMBER(8),
OLAY_ID NUMBER(8),
COE_TYPE VARCHAR2(3),
CET_CODE VARCHAR2(6),
DEP_CODE_RAISED_BY VARCHAR2(6),
SFM_STAFF_NO_RAISED_BY NUMBER(8),
USR_CREATED VARCHAR2(30),
CREATED DATE,
USR_CHANGED VARCHAR2(30),
CHANGED DATE,
EXT_REF_ID VARCHAR2(150),
REPLY_EXPECTED_DATE DATE,
SEC_ID VARCHAR2(8) not null,
PROTECTED VARCHAR2(1),
APPROVED_BY NUMBER(8),
DOCUMENT BLOB,
OLD_REMARKS CLOB,
CTS_ID NUMBER(8),
MESSAGE_STATUS VARCHAR2(4),
WORD_DOCUMENT NCLOB,
REMARKS NCLOB
Edited by: Hema on Jul 2, 2012 8:31 AM
Edited by: Hema on Jul 2, 2012 8:31 AM -
Join two tables with an aggrefate funtion in it
say I have two tables defined as
t1(id1 number primary key, val1 varchar2(10));
t2(id1 number, id2 number, val2 varchar2(10),
constraint primary key(id1, id2),
constraint foreign key id1 references t1(id1));
The values in T1 are
id1, val1
1, abc
2, def
3, xyz
The values in T2 are
id1, id2, val2
1, 1, pqr
1, 2, mno
2, 1, efg
3, 1, def
3, 2, fgh
3, 3, hij
i.e for each id1 in t1 there could be mulltiple values in T2.
i need to get the val2 from t2 for each id1 in t1 where id2 is maximum
The results should be
1, 2, mno
2, 1, efg
3, 3, hij
I can open a cursor for the records in t1 and can query for each row in T2 where id2 is maximum.
but, how do I do this one join query.
i did soem thing like
select t1.id1, t2.id2, t2.val2
from t1, t2
where t1.id1 = t2.id1
and exists (select 1 from t2 X where t2.id1 = t1.id1 and X.id2 = max(t2.id2)
but it did not work!select t1.id1, t2.id2, t2.val2
from t1, t2,
(select id1, max(id2) id2
from t2
group by id1) t3
where t1.id1 = t2.id1
and t2.id1 = t3.id1
and t2.id2 = t3.id2
[\code]
In this case you don't really need to reference t1 at all, but I'm assuming that this is a simplified version of what you need, and are pulling other values of t1 too. -
Joining two tables with different DB
Hi
We have 2 sources DB2 and Oracle.
In DB2 we have two tables which stores.
Tbl1
Case_no Information1 Information2 Information3
11112 sddf asd null null
11113 asd asd null null
Tbl2
Inf Info1 Code Info3
Xedy Asdf 111 afder
Mad Tag 123 top
The above tables are complex join with this condition
Tbl1.case_no=Tbl1.case_no.
Oracle tbl
Code Code_desc
111 Very good
123 bad
My requirement is to join the tbl2 with Oracle tbl. Based on the codes in DB2 table I should display the Code_desc in my reports. Like this
Case_no Code Code_desc
11112 111 Very good
11113 123 bad
But I am getting the Cartesian result.
Case_no Code Code_desc
11112 111 Very good
11112 123 bad
11113 111 Very good
11113 123 bad
Please help to resolve.
Regards
MDSelect Oracletbl and tbl2, right click on them open physical diagram, selected objects. In the physical diagram page Create a join between Oracletbl and tbl2 with the condition code=code.
In business model create a complex join between these two. Now reload metadata/restart services check output.
Let me know if this does not work you. -
Outer join two tables with query search record attached to both tables
When I create a query with two tables that have query search records attached with outer join, PS seems to do a natural join (cartesian). We are on PT8.48.
Is there a workaround for this issue. I do not want to remove query search record on either of the tables.
I am trying to create an Emergency contact report. I am using two tables PS_EMPLOYEES and PS_EMERGENCY_CNTCT. Here is the sql PeopleSoft query generated when I did Left outer Join.
Query SQL:
SELECT A.EMPLID, A.NAME, A.ADDRESS1, A.CITY, B.PRIMARY_CONTACT, B.ADDRESS1, B.CITY, B.STATE, B.POSTAL, B.RELATIONSHIP, A.DEPTID, A.JOBCODE, A.COMPANY, A.EMPL_TYPE
FROM (PS_EMPLOYEES A LEFT OUTER JOIN PS_EMERGENCY_CNTCT B ON A.EMPLID = B.EMPLID ), PS_EMPLMT_SRCH_QRY A1, PS_PERS_SRCH_QRY B1
WHERE A.EMPLID = A1.EMPLID
AND A.EMPL_RCD = A1.EMPL_RCD
AND A1.OPRID = 'SREESR'
AND (B.EMPLID = B1.EMPLID OR B.EMPLID IS NULL )
AND B1.OPRID = 'PS'
Appreciate any help.I think there are fixes for this issue in later tools releases (Report ID 1544345000). I'm not sure about 8.48, but you might try the workaround documented in
E-QR: Left Outer Joins with Security Records are returning unexpected results [ID 651252.1]
on Oracle Support.
Regards,
Bob -
Join two tables with the same information
I have a registration database. It references two other tables. I accept registrations from Faculty and from Students, but their information is in two different tables. Both have fname and lname. If they have people_id filled in, I want the fname and lname from the People table. If they have student_id filled in, I want it from the Student table.
I've never done this sort of IF situation. Here are the tables:
create table passport_registration (
passport_registration_id NUMBER Primary Key,
date_added date,
student_id NUMBER REFERENCES students(student_id),
people_id NUMBER REFERENCES people(id),
passport_listing_id NUMBER REFERENCES passport_listing(passport_listing_id)
create table PEOPLE (
id NUMBER Primary Key,
dateModified date,
fname VARCHAR2(100),
lname VARCHAR2(100)
create table students (
student_id NUMBER Primary Key,
date_added date,
s_uid VARCHAR2(50),
fname VARCHAR2(50),
lname VARCHAR2(50)
Any sort of assistance is appreciated.
Thank you.
daniel(It'd be helpful if you could edit your post and stick {noformat} before and after your sql statement - that will format it so that the (+){noformat} show correctly instead of being converted to the (+) symbol!)
As to the questions:
1. You've got two columns that have a decision to be made on them; you're going to need to write two sets of decision-making code, one for each column. I guess you could also do something like:select a.col1, d.col2, d.col3
from table1 a, (select 'table2' cola, b.col1, b.col2, b.col3 from table2 b
union all
select 'table3' cola, c.col1, c.col2, c.col3 from table3 c) d
where a.col1 = d.col1
and nvl2(a.col2, 'table3', 'table2') = d.cola;
nb, not tested, and I'm up far too late, so could have made an easy mistake!
2. Yes, {noformat} (+){noformat} is the oracle method of doing outer joins; it could be rewritten into ansi joins if you like; I'm just not that familiar with them to do it myself! -
Outer join two tables with two keys
Hi,
I have a question regard outer join,
I have table A (Aid, ADesc), Table B(Bid, Bdesc), and Table C (Aid, Bid, Cdesc)
There is data in Table A and B, but Table C is empty
I want to outer join C with A and B with below query
select ADesc,Bdesc, Cdest
from A, B, C
where A.Aid=C.Aid(+) and B.Bid(+)=C.Bid
and A.Aid='XXX' and B.Bid(+)='ZZZ'
The query result show only data in column Adesc , but column BDesc is empty even though there are some data in table B.
How should the query been modified to correctly show ADESC and Bdesc.
Thanks
VincentGuess the below should work:
Case when records are available in Table C:
with a as
(select 'XXX' aid, 'adesc' adesc from dual),
b as
(select 'ZZZ' bid, 'bdesc' bdesc from dual),
c as
(select 'XXX' aid, 'ZZZ' bid, 'cdest' cdest from dual where 1 = 1)
select ADesc,Bdesc, C1.Cdest
from
A LEFT OUTER JOIN C c1 ON (A.AID = C1.AID AND A.AID = 'XXX'),
B LEFT OUTER JOIN C C2 ON (B.BID = C2.BID AND B.BID = 'ZZZ');
Output:
"ADESC" "BDESC" "CDEST"
"adesc" "bdesc" "cdest"Case when table C is empty:
with a as
(select 'XXX' aid, 'adesc' adesc from dual),
b as
(select 'ZZZ' bid, 'bdesc' bdesc from dual),
c as
(select 'XXX' aid, 'ZZZ' bid, 'cdest' cdest from dual where 1 = 2)
select ADesc,Bdesc, C1.Cdest
from
A LEFT OUTER JOIN C c1 ON (A.AID = C1.AID AND A.AID = 'XXX'),
B LEFT OUTER JOIN C C2 ON (B.BID = C2.BID AND B.BID = 'ZZZ');
"ADESC" "BDESC" "CDEST"
"adesc" "bdesc" "" -
Joining two tables in PL/SQL
Hi there,
I have two problems...first being:
We are trying to run a sub-query within a WHERE/AND clause. I am not sure on the correct syntax on how to run the sub-query as denoted in the code below. Secondly I am trying to join two tables with a common column name (ie: CIPIDI_NR). Considering I cant fix the first problem I cant test out the sub-query. So any help on either would be grateful. Cheers
Select *
from TBL_CIPIDI
WHERE CIPIDI_NR like nvl ('in_case_number%', CIPIDI_NR)
AND CIPIDI_NAME like nvl ('in_case_name%', CIPIDI_NAME)
AND COST_CENTRE LIKE NVL ('in_cost_centre%', COST_CENTRE)
AND CIPIDI_DESCRIPTION like nvl ('in_description%', CIPIDI_DESCRIPTION)
AND CLAIMANT_NAME LIKE NVL ('in_claimant%', CLAIMANT_NAME)
AND REQUESTOR LIKE NVL ('in_requestor%', REQUESTOR)
AND PROJECT_MANAGER LIKE NVL ('in_project_manager%', PROJECT_MANAGER)
AND TEAM_LEADER LIKE NVL ('in_team_leader%', TEAM_LEADER)
AND ********RUN THE QUERY BELOW************
SELECT C1.CIPIDI_NR, C2.CIPIDI_NR
from TBL_TEAM_MEMBERS C1, TBL_CIPIDI C2
WHERE C1.CIPIDI_NR = C2.CIPIDI_NR
AND TEAM_MEM_NAME LIKE NVL ('in_team_mem_name%', TEAM_MEM_NAME)
);You really need to start providing create table and insert statements for tables and sample data for testing, the results that you want based on that data in order to clarify the problem, your Oracle version, and a copy and paste of an attempted run of your code, complete with any error messages received. The following is my best guess at what you might be looking for.
Select *
from TBL_TEAM_MEMBERS C1, TBL_CIPIDI C2
WHERE C1.CIPIDI_NR = C2.CIPIDI_NR
AND c1.CIPIDI_NR like nvl (in_case_number || '%', c1.CIPIDI_NR)
AND c1.CIPIDI_NAME like nvl (in_case_name || '%', c1.CIPIDI_NAME)
AND c1.COST_CENTRE LIKE NVL (in_cost_centre || '%', c1.COST_CENTRE)
AND c1.CIPIDI_DESCRIPTION like nvl (in_description || '%', c1.CIPIDI_DESCRIPTION)
AND c1.CLAIMANT_NAME LIKE NVL (in_claimant || '%', c1.CLAIMANT_NAME)
AND c1.REQUESTOR LIKE NVL (in_requestor || '%', c1.REQUESTOR)
AND c1.PROJECT_MANAGER LIKE NVL (in_project_manager || '%', c1.PROJECT_MANAGER)
AND c1.TEAM_LEADER LIKE NVL (in_team_leader || '%', c1.TEAM_LEADER)
AND TEAM_MEM_NAME LIKE NVL (in_team_mem_name || '%', TEAM_MEM_NAME);
Maybe you are looking for
-
Using get_application_property(CONFIG) in 6i and 10g
Hi, for a short time, our application has to run with 6i and 10g at the same time. We have to use the new constant CONFIG also in 6i. How can I mask this constant that it works correctly. Implementing it like this doesn't work: PROCEDURE gui$new_sess
-
How do I transfer contacts from a gmail account to an iPad contact list?
How do I transfer contacts from a gmail account to an iPad contact list?
-
Unknown Namespace when creating Client Proxy
Hi, I'm trying to generate a client proxy using Local File. It gives error Incorrect value: Unknown Namespace urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 The wsdl file does not give any error. This error seems to be comin
-
Recently i install a plugin in my final cut 7, now want to remove it but i don't know how , the name of this one is FxFactory i need some help thanks.
-
Lumia 620 double images problem
Hi! I bought my Lumia 620 few days ago, but theres one major problem with it. When adding images to Galley from my old phone there always appear 2 or 3 copies of one image. When deleting one of them they disappear all. Its the same case no matter if