Help Needed in Join
Hi,
Am using oracle 10g.
I have two tables namely Table A, Table B. having common column b/w these two tables.
Table A
Id
Name
Age
Table B
ID
Salary
designation
My output needed as follows,
ID, Name,Age, Salary,Designation
I want to join Table A and Table B based on Id and display all the fields. I am able to do this. But some occasions the Id will not be in available Table A or Table b.
for ex : ID = 5 will be available in Table A and which doesn't available in Table B then my output should have salary and designation will be NULL.
On the other hand ID=5 will not be in Table A and Available in table b then in my output will be name, age will be null and salary and designation will have data.
we cannot use right/left outer join on this logic. Please suggest me join do i need to do for this logic with some sample queries.
born2win wrote:
we cannot use right/left outer join on this logic. Please suggest me join do i need to do for this logic with some sample queries.You need a FULL OUTER JOIN in this case :
SELECT *
FROM tableA a
FULL OUTER JOIN tableB b on a.id = b.id ;
Similar Messages
-
Hi All,
I am new to oracle.I have a requirement. i need to display sales fields for a particular time as below.
Time Sales
6-7 3333
7-8 45345
8-9 546
But the min time and max time are coming from different query and sales fields coming from different.Now i need to join both queries to get the results.But there is no common column.I tried with sub query there also i am getting error.Please find the queries and help me
Hour Group Query:
select
time1.*,
(select if (time_format(dt.curr_time, '%H') <
time_format(ifnull((SELECT prop_value FROM cust_conv_properties c where prop_key = 'DayStartingTime'), '00:00:00'), '%H'),
date_format(date_add(dt.curr_time, INTERVAL 0 DAY),'%d/%m/%Y'),
date_format(dt.curr_time,'%d/%m/%Y')) as curr_date
from
(select concat(date_format(str_to_date('23/10/2011','%d/%m/%Y'),'%Y-%m-%d'), ' ', '00:00:00') as curr_time) dt) as report_date
from
(select
-- 'S' temp,
cast(min(cchg.from_hour) as unsigned) as min_value,
cast(max(cchg.to_hour) as unsigned) as max_value,
concat(concat(min(cchg.from_hour),''),'-',concat(max(cchg.to_hour),'')) as time_diff
from
cust_conv_hour_group as cchg
where
cchg.group_value in (SELECT distinct if(group_value = (SELECT min(group_value) FROM cust_conv_hour_group),
(SELECT max(group_value) FROM cust_conv_hour_group), group_value-1) as group_value
FROM cust_conv_hour_group c where from_hour <= cast(time_format('23:00:00','%H') as unsigned)
and
to_hour > cast(time_format('00:00:00','%H') as unsigned))
group by
cchg.group_value
) time1
Sales Fields Query:
SELECT
if(count(cons.wr_tarSale)=0,0, cons.wr_tarSale) wr_tarSale,
if(count(cons.wr_actSale)=0,0, cons.wr_actSale) wr_actSale,
if(count(cons.wr_tarTrans)=0,0, cons.wr_tarTrans) wr_tarTrans,
if(count(cons.wr_actTrans)=0,0, cons.wr_actTrans) wr_actTrans,
if(count(cons.tarSale)=0,0, cons.tarSale) tarSale,
if(count(cons.actSale)=0,0, cons.actSale) actSale,
if(count(cons.varSale)=0,0, cons.varSale) varSale,
if(count(cons.tarTrans)=0,0, cons.tarTrans) tarTrans,
if(count(cons.actTrans)=0,0, cons.actTrans) actTrans,
if(count(cons.actAds)=0,0, cons.actAds) actAds,
if(count(cons.actUpt)=0,0, cons.actUpt) actUpt,
if(count(cons.tarAds)=0,0, cons.tarAds) tarAds,
if(count(cons.tarUpt)=0,0, cons.tarUpt) tarUpt,
if(count(cons.actConv)=0,0, cons.actConv) actConv,
if(count(cons.tarTplh)=0,0, cons.tarTplh) tarTplh,
if(count(cons.actBlank1)=0,0, cons.actBlank1) actBlank1,
if(count(cons.actBlank2)=0,0, cons.actBlank2) actBlank2,
if(count(cons.actTplh)=0,0, cons.actTplh) actTplh,
if(count(cons.sDTarSale)=0,0, cons.sDTarSale)sDTarSale,
if(count(cons.sDTarTrans)=0,0, cons.sDTarTrans)sDTarTrans,
if(count(cons.sDTarQty)=0,0, cons.sDTarQty)sDTarQty,
if(count(cons.sDTarFF)=0,0, cons.sDTarFF)sDTarFF
FROM
SELECT
ifnull(sum(ccsr.target_sale),0) wr_tarSale,
ifnull(sum(ccsr.actual_sale),0) wr_actSale,
ifnull(sum(ccsr.actual_transaction_count),0) wr_actTrans,
ifnull(sum(ccsr.target_transaction_count),0) wr_tarTrans,
round(ifnull(sum(ccsr.target_sale),0),2) tarSale,
round(ifnull(sum(ccsr.actual_sale),0),2) actSale,
round(round(ifnull(sum(ccsr.actual_sale),0),2)- round(ifnull(sum(ccsr.target_sale),0),2),2) varSale,
round(ifnull(sum(ccsr.actual_transaction_count),0),0) actTrans,
round(ifnull(sum(ccsr.target_transaction_count),0),0) tarTrans,
0 actBlank1,
round(ifnull((sum(ccsr.actual_sale)/sum(ccsr.actual_transaction_count)),0),2) actAds,
round(ifnull((sum(ccsr.target_sale)/sum(ccsr.target_transaction_count)),0),2) tarAds,
round(ifnull((sum(ccsr.actual_quantity)/sum(ccsr.actual_transaction_count)),0),2) actUpt,
round(ifnull((sum(ccsr.target_quantity)/sum(ccsr.target_transaction_count)),0),2) tarUpt,
round(ifnull((sum(ccsr.actual_transaction_count)/sum(ccsr.actual_footfalls))*100,0),2) actConv,
0 actBlank2,
0 actBlank3,
round(ifnull((sum(ccsr.actual_footfalls)/sum(ccsr.actual_man_hours)),0),2) actTplh,
round(ifnull((sum(ccsr.target_footfalls)/sum(ccsr.target_man_hours)),0),2) tarTplh,
round(ifnull(ccsrs.target_sale,0),2) as sDTarSale,
round(ifnull(ccsrs.target_transaction_count,0),0) as sDTarTrans,
ifnull(ccsrs.target_quantity,0) as sDTarQty,
ifnull(ccsrs.target_footfalls,0) as sDTarFF
FROM
cust_conv_store_report ccsr
inner join cust_conv_store_report_summary ccsrs on(ccsrs.brand_code=ccsr.brand_code and ccsrs.category=ccsr.category and
ccsrs.store_date=ccsr.store_date and ccsrs.value_type=ccsr.value_type)
WHERE
ccsr.value_type='B' and
ccsr.brand_code= ? AND
ccsr.store_date = date_format(str_to_date(?,'%d/%m/%Y'),'%Y-%m-%d')
AND HOUR((TIME(ccsr.transaction_time))) >= (?) AND HOUR((TIME(ccsr.transaction_time)))< (?)
GROUP BY
ccsr.brand_code
) cons;
Edited by: 992887 on Mar 10, 2013 4:25 AM992887 wrote:
Hi All,
I am new to oracle.code below is NOT valid Oracle syntax.
post results from valid Oracle SQL below
SELECT * FROM V$VERSION;
I have a requirement. i need to display sales fields for a particular time as below.
Time Sales
6-7 3333
7-8 45345
8-9 546
But the min time and max time are coming from different query and sales fields coming from different.Now i need to join both queries to get the results.But there is no common column.I tried with sub query there also i am getting error.Please find the queries and help me
Hour Group Query:
select
time1.*,
(select if (time_format(dt.curr_time, '%H') <
time_format(ifnull((SELECT prop_value FROM cust_conv_properties c where prop_key = 'DayStartingTime'), '00:00:00'), '%H'),
date_format(date_add(dt.curr_time, INTERVAL 0 DAY),'%d/%m/%Y'),
date_format(dt.curr_time,'%d/%m/%Y')) as curr_date
from
(select concat(date_format(str_to_date('23/10/2011','%d/%m/%Y'),'%Y-%m-%d'), ' ', '00:00:00') as curr_time) dt) as report_date
from
(select
-- 'S' temp,
cast(min(cchg.from_hour) as unsigned) as min_value,
cast(max(cchg.to_hour) as unsigned) as max_value,
concat(concat(min(cchg.from_hour),''),'-',concat(max(cchg.to_hour),'')) as time_diff
from
cust_conv_hour_group as cchg
where
cchg.group_value in (SELECT distinct if(group_value = (SELECT min(group_value) FROM cust_conv_hour_group),
(SELECT max(group_value) FROM cust_conv_hour_group), group_value-1) as group_value
FROM cust_conv_hour_group c where from_hour <= cast(time_format('23:00:00','%H') as unsigned)
and
to_hour > cast(time_format('00:00:00','%H') as unsigned))
group by
cchg.group_value
) time1
Sales Fields Query:
SELECT
if(count(cons.wr_tarSale)=0,0, cons.wr_tarSale) wr_tarSale,
if(count(cons.wr_actSale)=0,0, cons.wr_actSale) wr_actSale,
if(count(cons.wr_tarTrans)=0,0, cons.wr_tarTrans) wr_tarTrans,
if(count(cons.wr_actTrans)=0,0, cons.wr_actTrans) wr_actTrans,
if(count(cons.tarSale)=0,0, cons.tarSale) tarSale,
if(count(cons.actSale)=0,0, cons.actSale) actSale,
if(count(cons.varSale)=0,0, cons.varSale) varSale,
if(count(cons.tarTrans)=0,0, cons.tarTrans) tarTrans,
if(count(cons.actTrans)=0,0, cons.actTrans) actTrans,
if(count(cons.actAds)=0,0, cons.actAds) actAds,
if(count(cons.actUpt)=0,0, cons.actUpt) actUpt,
if(count(cons.tarAds)=0,0, cons.tarAds) tarAds,
if(count(cons.tarUpt)=0,0, cons.tarUpt) tarUpt,
if(count(cons.actConv)=0,0, cons.actConv) actConv,
if(count(cons.tarTplh)=0,0, cons.tarTplh) tarTplh,
if(count(cons.actBlank1)=0,0, cons.actBlank1) actBlank1,
if(count(cons.actBlank2)=0,0, cons.actBlank2) actBlank2,
if(count(cons.actTplh)=0,0, cons.actTplh) actTplh,
if(count(cons.sDTarSale)=0,0, cons.sDTarSale)sDTarSale,
if(count(cons.sDTarTrans)=0,0, cons.sDTarTrans)sDTarTrans,
if(count(cons.sDTarQty)=0,0, cons.sDTarQty)sDTarQty,
if(count(cons.sDTarFF)=0,0, cons.sDTarFF)sDTarFF
FROM
SELECT
ifnull(sum(ccsr.target_sale),0) wr_tarSale,
ifnull(sum(ccsr.actual_sale),0) wr_actSale,
ifnull(sum(ccsr.actual_transaction_count),0) wr_actTrans,
ifnull(sum(ccsr.target_transaction_count),0) wr_tarTrans,
round(ifnull(sum(ccsr.target_sale),0),2) tarSale,
round(ifnull(sum(ccsr.actual_sale),0),2) actSale,
round(round(ifnull(sum(ccsr.actual_sale),0),2)- round(ifnull(sum(ccsr.target_sale),0),2),2) varSale,
round(ifnull(sum(ccsr.actual_transaction_count),0),0) actTrans,
round(ifnull(sum(ccsr.target_transaction_count),0),0) tarTrans,
0 actBlank1,
round(ifnull((sum(ccsr.actual_sale)/sum(ccsr.actual_transaction_count)),0),2) actAds,
round(ifnull((sum(ccsr.target_sale)/sum(ccsr.target_transaction_count)),0),2) tarAds,
round(ifnull((sum(ccsr.actual_quantity)/sum(ccsr.actual_transaction_count)),0),2) actUpt,
round(ifnull((sum(ccsr.target_quantity)/sum(ccsr.target_transaction_count)),0),2) tarUpt,
round(ifnull((sum(ccsr.actual_transaction_count)/sum(ccsr.actual_footfalls))*100,0),2) actConv,
0 actBlank2,
0 actBlank3,
round(ifnull((sum(ccsr.actual_footfalls)/sum(ccsr.actual_man_hours)),0),2) actTplh,
round(ifnull((sum(ccsr.target_footfalls)/sum(ccsr.target_man_hours)),0),2) tarTplh,
round(ifnull(ccsrs.target_sale,0),2) as sDTarSale,
round(ifnull(ccsrs.target_transaction_count,0),0) as sDTarTrans,
ifnull(ccsrs.target_quantity,0) as sDTarQty,
ifnull(ccsrs.target_footfalls,0) as sDTarFF
FROM
cust_conv_store_report ccsr
inner join cust_conv_store_report_summary ccsrs on(ccsrs.brand_code=ccsr.brand_code and ccsrs.category=ccsr.category and
ccsrs.store_date=ccsr.store_date and ccsrs.value_type=ccsr.value_type)
WHERE
ccsr.value_type='B' and
ccsr.brand_code= ? AND
ccsr.store_date = date_format(str_to_date(?,'%d/%m/%Y'),'%Y-%m-%d')
AND HOUR((TIME(ccsr.transaction_time))) >= (?) AND HOUR((TIME(ccsr.transaction_time)))< (?)
GROUP BY
ccsr.brand_code
) cons;
Edited by: 992887 on Mar 10, 2013 4:25 AM -
I need some basic conceptual help with QT! I have used QT Player since QT started, but I have always used it just to play whatever simply double-clicks open in it. I have QT Pro, so I know QT can do more. However, I don’t understand some basic things about QT:
1. On the File Menu, what is the difference between “open” and “import,” and why would one choose one or the other?
2. What is the difference between “save as” and “export,“ and why would one use one or the other?
3. My QT v. 6.03 (running on OS 8.6/9.1) regularly uses four different (at least) file types with the creator code TVOD:
MooV - created when a file is “saved” or “saved as” from QT
MPEG - files downloaded by the browser to the hard drive have this file type.
MMCH - in the MSIE temporary folder when MSIE uses the QT plug-in to run an abc123.mpg or an abc123.mov file.
mpg4 - created when a file is “exported” from QT (I assume there once was/is mpg1, mpg2, and mpg3?)
What is one supposed basically to know about these file types and when to use which.
4. I would like to be able to join two downloaded mpg files together to make one. The mpg files consist of a video travelogue with an oral narrative. However...
The files download with a file type of MPEG and named A1.mpg and A2.mpg. When I open these in QT, the Edit Menu is dimmed and unavailable. I can play each file individually and the files display fine with the sound inteact.
If I re-save these using “SaveAs” I get MooV files, which will open and play, but again, the EditMenu is dimmed and unavailable. I can play each file individually and the files display fine with the sound inteact.
If I “export” these two files, I get mpg4 files which will open and play the video only -- no sound, BUT, the EditMenu IS available and undimmed and I can copy and paste the two files into one file, which will play the video in order; however, the sound is lost...
...and so am I! Help!One would "Open" a regular QT formatted file (.mov, .mpg, .avi). You would "Import" (Pro only) a non QT formatted file (.jpg, .mp3, .txt) to use them in QT content. Version 7 does away with the "Import" menu as the Open menu really does the same as Import.
"Save As" does not re-compress the data in the file. You don't want to re-compress a simple "Cut" for example. Save As creates a new file and leaves the original untouched. It also puts the file (whatever formats) into a .mov "container".
So you could "Import" a Flash file (.swf) and "Save As" a .mov file. No compression. No conversion. Just a Flash track in a .mov file.
"Export" is used to "convert" the file to other formats (Movie to iPod Movie).
There never was any MPEG-3 format (beyond specs) and we are now using MPEG-4. An .mp3 file is really MPEG-1 layer 3 (another spec).
Basic rule: QuickTime can "play" MPEG-1 and MPEG-2 (additional software required) but can not edit the formats.
Do a search for (very old) software that can "demux" (separate audio and video) from your MPEG-1 files. Most are free and can convert the files to formats you can edit with QT Pro.
Your version 6 "Key" is still valid if you ever decided to move up to OS X. It will be of little value in Tiger because it requires QT version 7. -
Help needed in Joining tables for Help view
Hi All ,
My requirement is create a search help , using a view which will join four table ,
I was able to do using a databaser view and joining below tables
KNA1 MANDT = KNVV MANDT
KNA1 KUNNR = KNVV KUNNR
TVV5 MANDT = KNVV MANDT
TVV5 KVGR5 = KNVV KVGR5
TVV5 MANDT = TVV5T MANDT
TVV5 KVGR5 = TVV5T KVGR5
But thes is doing a inner join and help is not providing valuse where tghere are no entries for KNVV-KVGR5
for outer join i came to know we use hep view s instead of database viow ,
But i have problem joining these table s while creating Help View .
Any Help will be appricaited
Thanks
Vinay KollaHi Vinay,
Use the tabls in below given order to get the right view.
KNVV
KNA1
TVV5
TVV5T
KNA1-MANDT = KNVV-MANDT
KNA1-KUNNR = KNVV-KUNNR
TVV5-MANDT = KNVV-MANDT
TVV5-KVGR5 = KNVV-KNVV
TVV5-MANDT = TVV5T-MANDT
TVV5-KVGR5 = TVV5T-KVGR5
Regard
Anees -
Hi Friends,
I am not experienced sql developer, so can u guys help me . I want to display name from foll. tables
Table A
KeyID number PK
Name
Table B
BID number pk
KeyID
ABC
Table C
CID - PK
KeyID
XYZ
I want to display name from table A for matching keyid between Table A and B. If KeyID is null in Table B then I want to match with Table A with C.
How can I write this query?But isn't that what Alessandro's query is doing ?
Thanks for your help, but there is still one catch.
What I want to do is, take key_id from table b, if it
is null then take key_id from table c ...
>> when b.key_id is not null then
b.abc
else
select xyz
from c ...
... and then match
with table a
>> ... where c.key_id = a.key_id
end ...
to get name from table a.
>> select key_id,
a.name,
case
Can you help me out ?
I am trying ur existing query, ...Did you face any problem before posting ?
pratz -
Help needed with JOIN condition
I have two tables tb1 and tb2. They join on two columns, viz., plan_name and activity_name. However, I have to ensure the following conditions while joining:
1. Pick up all the records that join between tb1 and tb2.
2. If tb1.plan_name is 'Adhoc Activity' then pick the rows which join with tb2. Also pick up those rows which don't join with tb2 where plan_name = 'Adhoc Activity'. For example:
tb1 has 2 records with plan_name Adhoc Acitivity
plan_name activity_name
Adhoc Activity A1
Adhoc Activity A2
tb2 has 1 record with plan_name Adhoc Activity
plan_name activity_name
Adhoc Activity A1
then both records from tb1 should be taken. besides other joining records where plan_name <> 'Adhoc Acitivity' should also be takenuser10566312 wrote:
I think the first condition fails. If plan_name is not 'Adhoc Activity' but if it is present in both tb1 and tb2 then it should be picked... like inner join.???
Could you tell, what is the expected output for below data ? Is it not the one what I am getting -"Some Another Activity" is not picked..?
with tb1 as
select 'Adhoc Activity' plan_name,'A1' activity_name from dual union all
select 'Adhoc Activity' plan_name,'A2' activity_name from dual union all
select 'another Activity' plan_name,'A2' activity_name from dual union all
select 'Some another Activity' plan_name,'A2' activity_name from dual
tb2 as
select 'Adhoc Activity' plan_name,'A1' activity_name from dual union all
select 'another Activity' plan_name,'A2' activity_name from dual --union all
select *
from(
select a.plan_name a_plan_name,b.plan_name b_plan_name,a.activity_name a_act,
b.activity_name b_act
from tb1 a,tb2 b
where a.plan_name = b.plan_name(+)
and a.activity_name = b.activity_name(+)
where (a_plan_name = 'Adhoc Activity' or b_plan_name is not null)
order by 1;
A_PLAN_NAME B_PLAN_NAME A_ACT B_ACT
Adhoc Activity Adhoc Activity A1 A1
Adhoc Activity A2
another Activity another Activity A2 A2 -
Help needed with condition based joins in pl\sql
Hi,
I need to get data from 6 tables,
Scenario 1 : I need to join 4 tables and join this result set to 5th table
Scenario2: resultset of join of 4 tables to 6th table
In this case how do i save the intermediate result set of 4 tables to use it in further joins.Welcome to the forum.
Your question is broad.
http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html
A more detailed example would help.
Mention your database version as well and see the FAQ http://forums.oracle.com/forums/help.jspa when it comes to posting formatted examples using the {noformat}{noformat} tag
However, i think using the WITH clause or a subquery ( a.k.a. inline view) is what you're looking for.
Do some searches on http://asktom.oracle.com to find many examples.
Also see:
http://www.oracle-base.com/articles/misc/WithClause.php
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries007.htm#sthref3193 -
Need to join multiple rar files - help please!
I need to join multiple rar files. what is the equivalent of winRAR or something along those lines for macs? I know of Chunk Joiner, but I've never seen one that has been updated for the new macbook pros.
thanks!OK, I think MacHacha will do the job for you, if not look at RAR Expander or The Unarchiver
-
Help needed to optimize the query
Help needed to optimize the query:
The requirement is to select the record with max eff_date from HIST_TBL and that max eff_date should be > = '01-Jan-2007'.
This is having high cost and taking around 15mins to execute.
Can anyone help to fine-tune this??
SELECT c.H_SEC,
c.S_PAID,
c.H_PAID,
table_c.EFF_DATE
FROM MTCH_TBL c
LEFT OUTER JOIN
(SELECT b.SEC_ALIAS,
b.EFF_DATE,
b.INSTANCE
FROM HIST_TBL b
WHERE b.EFF_DATE =
(SELECT MAX (b2.EFF_DATE)
FROM HIST_TBL b2
WHERE b.SEC_ALIAS = b2.SEC_ALIAS
AND b.INSTANCE =
b2.INSTANCE
AND b2.EFF_DATE >= '01-Jan-2007')
OR b.EFF_DATE IS NULL) table_c
ON table_c.SEC_ALIAS=c.H_SEC
AND table_c.INSTANCE = 100;To start with, I would avoid scanning HIST_TBL twice.
Try this
select c.h_sec
, c.s_paid
, c.h_paid
, table_c.eff_date
from mtch_tbl c
left
join (
select sec_alias
, eff_date
, instance
from (
select sec_alias
, eff_date
, instance
, max(eff_date) over(partition by sec_alias, instance) max_eff_date
from hist_tbl b
where eff_date >= to_date('01-jan-2007', 'dd-mon-yyyy')
or eff_date is null
where eff_date = max_eff_date
or eff_date is null
) table_c
on table_c.sec_alias = c.h_sec
and table_c.instance = 100; -
Explanation needed for Join rules
I try to configure the join Engine for some days now, andf probably I got something completly wrong... Here is what I try:
I have a "Participating View" (which is a NT Connector View) and a Meta View. When I enable the NT Connector View for the join engine, all entries flow from NT Connector View to the Meta View.
But when I change something in Meta View, it does not flow to the Connector View. I don't understand why.
Settings in Participant View are:
Attribute flow:
to connector atomic
to meta view: atomic
joinrules:
to conn: atomic
to mv: "testruleset"
DN mapping rules:
to conn: atomic
to mv: atomic
filters:
to conn: none
to mv: none
entry default ownership:
to conn: Meta View
to mv: Connector View
entry default membership:
To connector: Not a member of CV
to mv: Member of CV
"testRuleset" has one join rule:
1. Optional Token Assignments: <none>
Selection Criteria: <none>
givenname=%givenname%
As I understood the documentation, this rule should join entries, which have the same givenname.
So if I have two entries:
in MV:
dn: uid=test1,o=company
givenname: jack
sn: smith
uid: test1
telephonenumber: 123
and in CV:
dn: uid=test2,o=company
givenname: jack
sn: smith
uid: test2
mail: [email protected]
This rule should (as I read the documentation) join both entries in the MV to one entry containing a mail address an a telephone number, but it does not.
Could anyone correct tell me what part I got wrong or post a working example?
Thanks!
FlorianHi, if you've just one Connector View (CV) and you want to synchronise entries from the CV to the MetaView (MV) then you need a "DN Mapping Rule". It's the purpose of the DNMappingRule to create the new DistinguishedName and entry in the target view. You do not have a DNMappingRule setup typically the rule would be something like uid=%uid% assuming uid is the RDN.
No not use Atomic where possible it's best practise to apply more control over the flow of attributes using an Attribute Flow Rule.
You don't need a Join Rule if there's only one datasource (ConnectorView) , the Join Rule is used to join entries that are split across multiple Data Sources say perhaps in Oracle and Directory Server.
Hope this helps,
Paul -
Need to join the two xml type output in plsql function
Hi,
I need to join the two xml type output in plsql function. Could you help me out?
Sample function:
function func_ret_stk return xmtype
xmloutput_stk xmtype;
xmloutput_desp xmtype;
begin
xmloutput_stk := --------;
xmloutput_desp :=---------;
return xmloutput_stk + xmloutput_desp;
end ;
Thanks in Advance,Hello,
this is the forum for the tool {forum:id=260}.
Please ask your question in {forum:id=157} or {forum:id=34}
Regards
Marcus -
SAP Query - Need to join 3 Tables via outer join
Hi,
I need to join 3 Tables using SAP Query. I wish an OUTER JOIN to be performed for the table join.
For Example:
Table 1 has 1000 Entries Field A Field B
Table 2 has 300 Entries Field A Field C
Table 3 has 100 Entries Field A Field D
The normal Join (INNER JOIN) gives me only the records that exists in all the 3 Tables.
But what i need is:
In the above example, If one entry in Table 1 has no matching records in Table 2 / Table 3, there should be an output entry in the SAP Query like
Field A Field B Field C Field D
xxxx yyyy Blank Blank
If there is a common record that exists in the tables, that record should appear in the same entry in the Query output.
Field A Field B Field C Field D
xxxx yyyy zzzz aaaa
In this way, there should be a minimum of 1000 entries (Largest no of records in the Tables joined). More than 1000 records in the Query output depends on the number of common records.
Kindly help if you have come across such a scenario.
thanks & regds
sriramHi
Please join the outer join as below
Table1 with Field A to Table 2 Field A-----outer join
Table1 with Field A to Table 3 Field A------outer join
then you get the out put as per your requirement
Regards
Damu -
Could you please help me in joining these tables
Could you please help me in joining these tables
ra_customers
oe_order_headers_all
oe_order_lines_all
mtl_system_items_b
mtl_item_categories
mtl_categories
I wrote the condition like this.Is there any more possibilities for join
Tell me what more to join in this query....?
select x.customer_name,x.segment1,x.description,x.segment2,sum(x.week1) week1, sum(x.week2) week2,
sum(x.week3) week3, sum(x.week4) week4, sum(x.week5) week5
from
select a.customer_name,d.segment1,d.description,f.segment2,
case
when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 1 then
nvl(c.ordered_quantity,0)
else null
end as WEEK1,
case
when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 2 then
nvl(c.ordered_quantity,0)
else null
end as WEEK2,
case
when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 3 then
nvl(c.ordered_quantity,0)
else null
end as WEEK3,
case
when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 4 then
nvl(c.ordered_quantity,0)
else null
end as WEEK4,
case
when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 5 then
nvl(c.ordered_quantity,0)
else null
end as WEEK5
from
ra_customers a,
oe_order_headers_all b,
oe_order_lines_all c,
mtl_system_items_b d,
mtl_item_categories e,
mtl_categories f
where
a.customer_id=b.sold_to_org_id and
b.header_id=c.header_id
and c.request_date between sysdate-7 and sysdate+7
and c.inventory_item_id=d.inventory_item_id
and d.inventory_item_id = e.inventory_item_id
and e.category_id = f.category_id
and d.organization_id=e.organization_id
and e.category_set_id=1
) x
group by x.customer_name,x.segment1,x.description,x.segment2;Hw will I join the tables that have no column in common?I need to retrieve a value from table 2 by refering the value in table 1Post some sample data and show us what you want.
-
hi, i have a problem that i have bought blackberry 8520.i want to switch my contacts from my old mobile samsung star s5230 to blackberry 8520.i have shifted my contacts from samsung to my laptop but i am unable to transfer from laptop to blackberry.i have tried to send some contacts to blackberry from laptop but blackberry doesnot show it.please let me know how can i do it.i have also downloaded blackberry desktop software but i dont know how to shift contacts from laptop to blackberry.
Duplicate...see:
http://supportforums.blackberry.com/t5/BlackBerry-Curve/help-needed-to-move-contacts/m-p/1287437#nob...
Occam's Razor nearly always applies when troubleshooting technology issues!
If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
Join our BBM Channels
BSCF General Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
Broken LCD!!! help needed!
Hello, My 8900 now has a broken LCD and I cannot seem to find where to buy a new one! does anyone knows! help needed!
Try HorizonWireless, check the link below in my signature.
They are reputable parts dealers.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code
Maybe you are looking for
-
Hi there, A few questions about the submit by email function. 1. We have [email protected] addresses. When we hit submit, it only brings up [email protected] How can I make the whole email show up on the email program? 2. I am getting a "Operation no
-
Web Start - Can't Connect To App Modules
Has anyone had the problem of on being able to connect to their application modules deployed to Ora AS 10g when using web start? We can successfully use the tester on our local and deployed configurations for the app modules. We can also successfully
-
Material Replication Issue_CRMRFCPAR entries
Hi, We are having some issues for Materials replication. wondering if something to do with our CRMRFCPAR entries. For initial load, i set up the entry as follows: User : SRM Obj name: * Destination : RFCdestination of SRM Load type: "I - Initial down
-
Atan2 equivalent in a Formula Node?
Does anyone have an atan2 (2-input inverse arctangent) equivalent for use in a Formula Node? I was surprised to see that such a common function wasn't supported in Formula Nodes. Without it, my easily readable Formula Node equations get junked and be
-
Hey....hii.... someone solved your problem i suppose... I am also facing something like ur's.. I do not have any naming prob..Its all correct...but still i am getting... pls Help me... I gotta complete this sooon.... This is the error i am getting...