Joining 2 Tables - Left outer joing is not working
I have a primary Table and then a Secondary. I am doing the left outer join and what I am expecting a list from my primary table and if any thing matches from seconday , that should be picked up. But what my CR2008 does it l it lists all the items on my primary and if there is one record matches from 2ndry, it will list that record in front of all the items from my primary.
What am I doing wrong
equi join = inner join
T1 T2
key value key result
1 100 1 A
2 200 3 B
3 300 5 C
Equi Join= Inner Join: T1 inner join T2 on t1.key = t2.key
Key Value Result
1 100 A
3 300 B
Left Outer Join; T1 left outer join T2 on t1.key = t2.key
Key Value Result
1 100 A
2 200 *null*
3 300 B
Right Outer Join: T1 1 right outer join T2 on t1.key = t2.key
Key Value Result
1 100 A
3 300 B
5 *null* C
Full outer join: T1 full outer joib T2 on t1.key = t2.key
Key Value Result
1 100 A
2 200 *null*
3 300 B
5 *null* C
Edited by: Jürgen Kirsch on Oct 20, 2009 5:05 PM
Similar Messages
-
OJ syntax for multi-table left outer join with MS Oracle Driver
I have a multi-table left outer join that works fine in SQL Server ODBC Driver, Oracle ODBC driver 8.01.07.00, but not with Microsoft ODBC Driver for Oracle 2.573.7326.0
SELECT * from { oj A LEFT OUTER JOIN B ON A.col1 = B.col1 LEFT OUTER JOIN C ON A.col1 = C.col1 }
I noticed someone had a similar problem (the proposed solution doesn't work):
http://www.justpbinfo.com/listarchive/msg02874.html
Does anyone know how to get this working with the Microsoft ODBC Driver for Oracle? Or does it just not work?The Microsoft ODBC Driver for Oracle 2.573.7326.0 does perform the same 'fix up' with {oj} in Oracle 8i. The problem is that it doesn't work when joining more than two tables:
This works:
SELECT * from { oj A LEFT OUTER JOIN B ON A.col1 = B.col1}
This doesn't work:
SELECT * from { oj A LEFT OUTER JOIN B ON A.col1 = B.col1 LEFT OUTER JOIN C ON B.col1 = C.col1 }
(The second query will work with the Oracle Oracle ODBC driver, with a bit of tweaking. But I haven't found a way to get it to work with the Microsoft ODBC Driver for Oracle 2.573.7326.0. My suspicion is that it just doesn't work.)
Gavin -
How to find Inner join or (Left)outer join for Infoset
Dear Experts,
We have one Infoset which is based on the Master data and DSO. It is linked 0BPARTNER field From the Master Data and SOLD TO PARTY field from the DSO.
Here Could you please suggest me how can we able to find that whether this Infoset is based on Inner Join or (Left) outer join.
Thanks and Regards,
Suresh.HI Suresh,
If the infoset is based on left outer join , you see the respective table shaded in a dirrerent colour and also displays
that it is a left outer join in the connection
refer the below link for the details on left outer join , you can make a join as left outer from the context menu of the
object required
http://help.sap.com/erp2005_ehp_04/helpdata/EN/21/af0942b9dc9c39e10000000a155106/frameset.htm
Regards,
Sathya -
How to Mark join as left outer join in Info set
Hi Folks,
I have 2 info cubes in Info set, I need to mark the join as Left outer join.
I have read some blogs where is says that it cant be joined, but one of my colleagues has made left outer join using two cubes.
I want to replicate the same thing into my design.
If i normally connect one IO to another cubes same IO- its a normal join- its not written as left outer join. I want to see left outer join written on my link.
I tried global setting but no use.
Am I missing some setting,Hi Vivek,
Please have a look at SAP Note 577953 - @0S@ InfoSets (BW): Left outer joins.
The answer on question "3. How do I define a left outer join in InfoSet maintenance?" describes how you should proceed.
Best regards,
Sander -
Nokia 5800xm LEFT OUT but its not worth it !!
Thnx Rocky(alias)
Why Nokia 5800xm is not getting any updates, i think its left out , We spent Rs 20000(arnd) for this phone and we are no where in the competition , no processor tweaks, no os tweaks by means of software updates and most importantly the basic software updates like Flash Lite 4 for S60 5th edition phones as Nokia 5800 supports it . Any replies positive /negative will be appreciated. Just ma view , thnx a lot NOKIA and BETA LABS , you people are doing a great job !!
http://betalabs.nokia.com/apps/nokia-beta-labs/discussion/38426/nokia-5800xm-left-out-but-its-not-wo...
Read the conversation on beta labs and the most important link for now !!!!
http://conversations.nokia.com/2011/08/29/new-info-on-the-software-updates-for-symbian-5-0-and-3-2-d...
Click on "Accept as solution" if it worked for you else if it was helpful you can click on "Kudos star" below.Hi Milo438,
Thanks for the post and welcome to the forum. I am sorry for the extended delay in getting your services up and running. I can help you.
Please drop me an email via the 'Contact Us' link in my profile. (click on my name and you will find the link under the "about me" section). Include any BT order number that we have supplied, your full address details and the link to this thread.
Cheers
Sean
BTCare Community Manager
If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-) -
Audio output and left USB port is not working!
Hi! I have MacBook Air 13" late 2010, Audio output and left USB port is not working!
What happened?
Part No.: Z0JH000TE RSIf the left USB port doesnt work with an external mouse its seems to be a hardware malfunction of this USB port.
The newest BIOS is already installed?
Have you removed all USB ports from device manager and restarted your notebook?
If you have already tried this, contact an authorized service provider. The guys can try to fix this issue and it should be covered by warranty, if you still have warranty on this notebook. :) -
XI ALERTS with out BPM Are not working.
Hi All,
We are on XI 3.0 sp14. Alerts with out BPM are not working. I want to apply notes 906044, 876546. It says i need to make some changes to the following functions. I could not able to find these Function modules in the first place. Can some one help me out?
<b>Note -
Object -
Name</b>
906044 -
function---- SXMS_ALERT_ERROR_RECEIVE
906044 -
function --- SXMS_ALERT_ERROR_SEND
906044&876546--method ---CL_XI_ALERT HAS_ACTIVE_RULE
906044 -
method -
CL_XI_ALERT_UTIL GET_MDT_URL
905896 -
method -
CL_XI_ALERT CREATE_ALERT
Thank you
Ganges Leaves.Ganges
Login into XI Developement and give SE37 Transaction. Then you give SXMS_ALERT_ERROR_RECEIVE and click 'display'.
Then you check for the methods CL_XI_ALERT HAS_ACTIVE_RULE, CL_XI_ALERT_UTIL GET_MDT_URL, CL_XI_ALERT CREATE_ALERT and make the changes according to service notes. If you dont find this methods in this function then you can try in SXMS_ALERT_ERROR_SEND.
Regards,
---Mohan -
Dear All,
Please kindly help me on this, I am from Pakistan and I got my Blackberry Classic delieved to me from USA my cousin bought it from online blackberry store and brought it by hand. Just now i have noticed that my blackberry classic left side speaker is not working only ringing sound music sound and loudspeaker sounds are coming from the right side of the speaker.
Has anyone faced this problem with his new classic and what should i do?
Please help or guide me
Solved!
Go to Solution.Knowing this that classic comes up with only one speaker did broke my heart But to be honest the sound is excellent even at high volume the sound does not distort. its a genuien stereo speaker
-
I can't get some PDF to read out loud. Any idea why? I am able to select and copy the texts so it's not an image for sure. If I paste the texts to word or some other app, I can use the text to speech from my Mac OS to read out loud and it's working fine. Any suggestion is much appreciated.
Here's something new. This is one, http://www.ponemon.org/local/upload/file/NokNokWP_FINAL_3.pdf, of the many files that read out loud did not work. After reading your email, I thought I tried something new. The PDF in this link here read out loud fine in Safari and Chrome browser but when I downloaded to my computer it did not work in both Reader or Pro v11.0.10. I have a MacBook Pro Yosemite. That is very strange.
-
i have upgraded to windows 8 but found out it will not work? How do I go back to windows 7?
Welcome to Apple Support Communities
You have to format your Windows volume and install Windows 7. First, insert the Windows 7 DVD and hold the C key while your computer is starting. Then, follow the steps and, at partitioning step, choose your Windows volume (it's the last volume listed in your display), choose Advanced options, and format it. Then, install Windows.
Finally, after installing it, install the Boot Camp support software > http://support.apple.com/kb/DL1630
Windows 8 is only compatible with some new computers. See > http://support.apple.com/kb/HT5634 -
CSS transition 'left' for ':before' block not work
CSS transition 'left' for ':before' block not work.
Some css rules:
http://www.screencast.com/t/f2MaN5TRpY
Video of working in firefox:
http://www.screencast.com/t/YMBKR77kAQ
Video of working in google chrome:
http://www.screencast.com/t/yOc8tN7yZcAIs it just the left property that doesn't work?
I found an old bug from 2010 where transition was first made to apply to generated content, but I don't know the details of which properties were tested: [https://bugzilla.mozilla.org/show_bug.cgi?id=555627 555627 – CSS Transition Cannot Be Applied to :before/:after insertions]. -
Command-delete, command-left and command-right not working as expected
On a Mac (in my case OS X 10.6.8) when entering text into a text-field or text-box 'command-delete' in any other application deletes everything between the cursor and the beginning of the current line. I'm using Firefox 10.0.1 and this does not work.
Also, in certain rich text editors such as Gmail's compose mail text-box 'command-left' and 'command-right' which would usually jump to the respective beginning or end of the current line doesn't seem to work.Try:
Create Table ImportLog
( recid int,
grouploadid int,
groupid int,
tablename varchar(128),
note varchar(500)
Insert Into ImportLog
Values
(1,216,1,'tableb','noteb'),
(2,217,1,'tablea','notea'),
(3,217,2,'tableb','noteb'),
(4,217,1,'tablea','notea'),
(5,230,1,'tableb','noteb'),
(6,244,1,'tablea','notea'),
(7,244,2,'tableb','noteb'),
(8,244,3,'tablec','notec'),
(9,217,3,'tabled','noted')
select r1.RecID, r1.GroupLoadID, r1.groupid, r1.tablename, r1.note,
r2.RecID, r2.GroupLoadID, r2.groupid, r2.tablename, r2.note
from ImportLog r1
full join
(select RecID, GroupLoadID, groupid, tablename, note
from ImportLog
where GroupLoadID = '217'
) r2
on r1.TableName = r2.TableName and r1.Note = r2.Note and r1.Groupid = r2.Groupid
where r1.GroupLoadID = '244'
order by 1
GO
DROP Table ImportLog
GO
RecID GroupLoadID groupid tablename note RecID GroupLoadID groupid tablename note
6 244 1 tablea notea 2 217 1 tablea notea
6 244 1 tablea notea 4 217 1 tablea notea
7 244 2 tableb noteb 3 217 2 tableb noteb
8 244 3 tablec notec NULL NULL NULL NULL NULL
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014 -
Where left off video setting not working in ios 7
Since upgrading to ios 7 the 'Where left off' stting on the Video is not working. I have turned it off/on and it is ticked. Every time I switch off the iPad 2 and then turn it on again the last video played place is not remembered - it always resets at the beginning. This happens on my iPhone 4s as well as that is at ios 7 now as well. Both devices were OK with remembering the video place before upgrading.
The videos are produced from Handbrake and not store purchases but I dont have any store purchases to try it out.
Anyone else seeing this (or not)
PaulI have this problem too since IOS7, except I don't have to switch my ipad off, I simply have to have not watched a video for a bit and when I switch back to the vid app it forgets all over again. VLC looks to be the much better app
-
Why table getWidth and setWidth is not working when resize column the table
hi all,
i want to know why the setWidth is not working in the following code,
try to uncomment the code in columnMarginChanged method and run it wont resize the table.
i cont set width(using setWidth) of the other table column using getWidth of the main table column.
and i want to resize the right side columns only (you can check when you resize the any column the left and right side columns also resizing)
any suggestions could be helpful.
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.TableColumnModelEvent;
import javax.swing.event.TableColumnModelListener;
import javax.swing.table.TableColumnModel;
public class SynTableResize extends JFrame implements TableColumnModelListener, ActionListener
JTable table1 = new JTable(5, 5);
JTable table2 = new JTable(5, 5);
JTable table3 = new JTable(5, 5);
JButton btn = new JButton("refresh");
JPanel pnlcontainer = new JPanel();
public SynTableResize()
setLayout(new BorderLayout());
pnlcontainer.setLayout(new BoxLayout(pnlcontainer, BoxLayout.Y_AXIS));
pnlcontainer.add(table1.getTableHeader());
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(table2);
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(table3);
table2.setTableHeader(null);
table3.setTableHeader(null);
table1.getColumnModel().addColumnModelListener(this);
table3.setColumnModel(table1.getColumnModel());
table2.setColumnModel(table1.getColumnModel());
table2.getColumnModel().addColumnModelListener(table1);
table3.getColumnModel().addColumnModelListener(table1);
btn.addActionListener(this);
getContentPane().add(pnlcontainer, BorderLayout.CENTER);
getContentPane().add(btn, BorderLayout.SOUTH);
setSize(new Dimension(400, 400));
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
public static void main(String[] args)
new SynTableResize();
public void columnAdded(TableColumnModelEvent e)
public void columnMarginChanged(ChangeEvent e)
TableColumnModel tcm = table1.getColumnModel();
int columns = tcm.getColumnCount();
for (int i = 0; i < columns; i++)
table2.getColumnModel().getColumn(i).setPreferredWidth(tcm.getColumn(i).getWidth());
table3.getColumnModel().getColumn(i).setPreferredWidth(tcm.getColumn(i).getWidth());
// the following commented code wont work.
// table2.getColumnModel().getColumn(i).setPreferredWidth(tcm.getColumn(i).getPreferredWidth());
// table3.getColumnModel().getColumn(i).setPreferredWidth(tcm.getColumn(i).getPreferredWidth());
// table2.getColumnModel().getColumn(i).setWidth(tcm.getColumn(i).getWidth());
// table3.getColumnModel().getColumn(i).setWidth(tcm.getColumn(i).getWidth());
SwingUtilities.invokeLater(new Runnable()
public void run()
table2.revalidate();
table3.revalidate();
public void columnMoved(TableColumnModelEvent e)
public void columnRemoved(TableColumnModelEvent e)
public void columnSelectionChanged(ListSelectionEvent e)
public void actionPerformed(ActionEvent e)
JTable table = new JTable(5, 5);
table.setColumnModel(table1.getColumnModel());
table.getColumnModel().addColumnModelListener(table1);
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(table);
pnlcontainer.validate();
pnlcontainer.repaint();
}thanks
dayananda b vhi,
thanks for your replay,
yes i know that, you can check the following code it works fine.
actually what i want is, when i resize table column it shold not automaticaly reszie when table resized and i dont want horizontal scroll bar, meaning that all table columns should resize with in the table size(say width 300)
if i make table autoresize off than horizontal scroll bar will appear and the other columns moved and i want scroll to view other columns.
please suggest me some way doing it, i tried with doLayout() no help,
doLayout() method only can be used when table resizes. first off all i want to restrict table resizing with in the limited size
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableColumnModel;
public class TempSycnTable extends JFrame
JTable table1 = new JTable(5, 5);
MyTable table2 = new MyTable(5, 5);
MyTable table3 = new MyTable(5, 5);
JPanel pnlcontainer = new JPanel();
public TempSycnTable()
JScrollPane src2 = new JScrollPane(table2);
JScrollPane src3 = new JScrollPane(table3);
// table1.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// table2.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// table3.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// src2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
// src3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
table2.setTableHeader(null);
table3.setTableHeader(null);
table3.setColumnModel(table1.getColumnModel());
table2.setColumnModel(table1.getColumnModel());
table2.getColumnModel().addColumnModelListener(table1);
table3.getColumnModel().addColumnModelListener(table1);
table2.setTableHeader(null);
table3.setTableHeader(null);
setLayout(new BorderLayout());
pnlcontainer.setLayout(new BoxLayout(pnlcontainer, BoxLayout.Y_AXIS));
pnlcontainer.add(table1.getTableHeader());
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(src2);
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(src3);
getContentPane().add(pnlcontainer, BorderLayout.CENTER);
setSize(new Dimension(300, 300));
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
public static void main(String[] args)
new TempSycnTable();
class MyTable extends JTable
public MyTable()
super();
public MyTable(int numRows, int numColumns)
super(numRows, numColumns);
public void columnMarginChanged(ChangeEvent event)
final TableColumnModel eventModel = table1.getColumnModel();
final TableColumnModel thisModel = getColumnModel();
final int columnCount = eventModel.getColumnCount();
for (int i = 0; i < columnCount; i++)
thisModel.getColumn(i).setWidth(eventModel.getColumn(i).getWidth());
repaint();
}thanks
daya -
Temporary Table In SAP Query - Does not Work?
DECLARE @date DATE
DECLARE @delrows INT
DECLARE @delquan INT
DECLARE @a INT
DECLARE @recrows INT
DECLARE @recquan INT
SET @a=0
IF OBJECT_ID('tempdb..##tab) IS NOT NULL DROP TABLE ##tab
CREATE TABLE ##tab
[Date] date,
[Delivery Rows] varchar(40),
[Delivery Total Units] varchar(40),
[Receipts Rows] varchar(40),
[Receipts Total Units] varchar(40),
WHILE @a!=7
BEGIN
SET @date=DATEADD(day,-@a, getdate())
SELECT @delrows=ISNULL(COUNT(DLN1.[LineNum]),0), @delquan=ISNULL(SUM(DLN1.[Quantity]),0)
FROM ODLN
INNER JOIN DLN1 ON ODLN.[DocEntry]=DLN1.[DocEntry]
WHERE ODLN.[CreateDate] = @date
SELECT @recrows=ISNULL(COUNT(PCH1.[LineNum]),0) , @recquan=ISNULL(SUM(PCH1.[Quantity]),0)
FROM OPCH
INNER JOIN PCH1 ON OPCH.[DocEntry]=PCH1.[DocEntry]
WHERE OPCH.[DocDate]=@date
SET @a=@a+1
INSERT INTO ##tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
END
SELECT * FROM ##tab
{/code}
Can anyone explain why this query does not work in SAP? It works fine on SQL but gives me this message in SAP:
1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near ')'.
2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
Edited by: Chris Candido on Feb 2, 2011 8:38 PMChris,
There are several areas in your code which needed changes.
1. On the field name for your temp table you had spaces.
2. The SAP table name ODLN, OPCH, PCH1 had to be fully referenced like
[dbo].[ODLN]
3. You really need not have ## in front of your temp table, it could just be #
The select at the end is actually what causes the most problem as for some reason from within SAP it does not produce the result. I would suggest you put the whole code into a Stored Procedure and call the SP from SAP. Corrected SQL below. If you remove the Select line at the end the query would work with in SAP, but keep it give give you an error. SP is the best option for this.
DECLARE @date DATE
DECLARE @delrows INT
DECLARE @delquan INT
DECLARE @a INT
DECLARE @recrows INT
DECLARE @recquan INT
SET @a=0
IF object_id('tempdb..#tab') IS NOT NULL
BEGIN
DROP TABLE #tab
END
CREATE TABLE #tab
[Date] date,
DeliveryRows varchar(40),
DeliveryTotalUnits varchar(40),
ReceiptsRows varchar(40),
ReceiptsTotalUnits varchar(40),
WHILE @a!=7
BEGIN
SET @date=DATEADD(day,-@a, getdate())
SELECT @delrows=ISNULL(COUNT(DLN1.LineNum),0), @delquan=ISNULL(SUM(DLN1.Quantity),0)
FROM [dbo].[ODLN]
INNER JOIN DLN1 ON [dbo].[ODLN].DocEntry=DLN1.DocEntry
WHERE [dbo].[ODLN].CreateDate = @date
SELECT @recrows=ISNULL(COUNT([dbo].[PCH1].LineNum),0) , @recquan=ISNULL(SUM([dbo].[PCH1].Quantity),0)
FROM [dbo].[OPCH]
INNER JOIN [dbo].[PCH1] ON [dbo].[OPCH].DocEntry=[dbo].[PCH1].DocEntry
WHERE [dbo].[OPCH].DocDate=@date
SET @a=@a+1
INSERT INTO #tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
END
SELECT * FROM #tab
Suda Sampath
Maybe you are looking for
-
Sales Quote and Sales Order for Service Module.
Hi All, I have a scenario with one of the customer where they have a Service Department. The customer is into installation and servicing of Air conditioning systems. The scenario is as mentioned below: Customer does the installation of Air Conditioni
-
Is there any better-looking OSD than xosd?
Hi there! I recently got into xosd, but find it rather ugly. So I'm wondering if there's any other OSD implementation that looks a little less blocky. I've heard of notify-osd, but I'd rather do without having a daemon running all the time. So is the
-
Problem in accessing attribute of a context node
Hi All, I have a context node called REFE and an attribute named REF to the node REFE. I am trying to get access to the attribute REF, so that i can dynamically set properties. But i am getting NULL Object error. I am successfully getting access to n
-
How to get develop module working in LR6?
Hi, The develop module in my LR6 is not working. The is only displayed a blue screen with a large cross across frame. I can see photo in window at upper left hand i develop module. Photos are shown in Library module. This problem applies to all my ph
-
Answering Machine software for the Mac? What is out there?
I use Ovolab Philink ( http://www.ovolab.comhttp://www.ovolab.com ) as my answering machine, brilliant programme etc. However they have gone belly up or who knows, as nobody responds anymore. Does anybody know of a programme that functions as a answ