Please help me guys. I converted the old outer join syntax (*=) but when i tested the new query the result was different. I want to know what was my mistake. - ############ old query ################
-
SELECT
-
JU_STJS.SEDAI AS SEDAI,
-
JU_STJS.KATA AS KATA,
-
JU_STJS.USRNAM AS USRNAM,
-
JU_STJS.SUU AS SUU,
-
SYU.KATACD AS M_KATACD,
-
SYU.HONTAICD AS M_HONTAICD,
-
JU_STJS.SYRKBN AS SYRKBN,
-
JU_STJS.KNMONEY AS KNMONEY,
-
JU_STJS.KKMONEY AS KKMONEY,
-
JU_STJS.KNKKMONEY AS KNKKMONEY,
-
JU_STJS.RIYOU AS RIYOU,
-
JU_STJS.MONEYKBN AS MONEYKBN,
-
JU_STJS.KZ AS KZ,
-
JU_STJS.UPDYMD AS UPDYMD,
-
SYU.SYRKBN AS M_SYRKBN,
-
SYU.BHNKBN AS M_BHNKBN,
-
SYU.SEQ AS M_SEQ,
-
SYU.KOUSUU AS M_KOUSUU,
-
SYU.MSTITLE AS M_MSTITLE
-
FROM
-
MSYUKEI SYU ,
-
(SELECT
-
JU.SEDAI AS SEDAI,
-
JU.KATA AS KATA,
-
JU.USRNAM AS USRNAM,
-
JU.SUU AS SUU,
-
JU.KATACD AS KATACD,
-
STJS.KNMONEY AS KNMONEY,
-
STJS.KKMONEY AS KKMONEY,
-
STJS.KNKKMONEY AS KNKKMONEY,
-
STJS.RIYOU AS RIYOU,
-
STJS.MONEYKBN AS MONEYKBN,
-
STJS.HONTAICD AS HONTAICD,
-
STJS.SYRKBN AS SYRKBN,
-
STJS.GENKAKBN AS GENKAKBN,
-
STJS.UPDYMD AS UPDYMD,
-
JU.KZ AS KZ
-
FROM
-
GYDSTJS STJS,
-
GY受注明細書 JU
-
WHERE
-
JU.SEIBAN = '46705' AND
-
JU.SEIBAN + JU.SEDAI *= STJS.SEIBAN + STJS.SEDAI
-
) JU_STJS
-
WHERE
-
SYU.KATACD = JU_STJS.KATACD AND
-
SYU.HONTAICD *= JU_STJS.HONTAICD AND
-
SYU.SYRKBN *= JU_STJS.SYRKBN AND
-
((JU_STJS.GENKAKBN ='1' AND JU_STJS.SYRKBN ='1') OR
-
JU_STJS.SYRKBN ='0')
############# new query ######################## - SELECT
-
JU_STJS.SEDAI AS SEDAI,
-
JU_STJS.KATA AS KATA,
-
JU_STJS.USRNAM AS USRNAM,
-
JU_STJS.SUU AS SUU,
-
SYU.KATACD AS M_KATACD,
-
SYU.HONTAICD AS M_HONTAICD,
-
JU_STJS.SYRKBN AS SYRKBN,
-
JU_STJS.KNMONEY AS KNMONEY,
-
JU_STJS.KKMONEY AS KKMONEY,
-
JU_STJS.KNKKMONEY AS KNKKMONEY,
-
JU_STJS.RIYOU AS RIYOU,
-
JU_STJS.MONEYKBN AS MONEYKBN,
-
JU_STJS.KZ AS KZ,
-
JU_STJS.UPDYMD AS UPDYMD,
-
SYU.SYRKBN AS M_SYRKBN,
-
SYU.BHNKBN AS M_BHNKBN,
-
SYU.SEQ AS M_SEQ,
-
SYU.KOUSUU AS M_KOUSUU,
-
SYU.MSTITLE AS M_MSTITLE
-
FROM
-
MSYUKEI SYU LEFT OUTER JOIN
-
(SELECT
-
JU.SEDAI AS SEDAI,
-
JU.KATA AS KATA,
-
JU.USRNAM AS USRNAM,
-
JU.SUU AS SUU,
-
JU.KATACD AS KATACD,
-
STJS.KNMONEY AS KNMONEY,
-
STJS.KKMONEY AS KKMONEY,
-
STJS.KNKKMONEY AS KNKKMONEY,
-
STJS.RIYOU AS RIYOU,
-
STJS.MONEYKBN AS MONEYKBN,
-
STJS.HONTAICD AS HONTAICD,
-
STJS.SYRKBN AS SYRKBN,
-
STJS.GENKAKBN AS GENKAKBN,
-
STJS.UPDYMD AS UPDYMD,
-
JU.KZ AS KZ
-
FROM
-
GY受注明細書 JU LEFT OUTER JOIN GYDSTJS STJS
-
on JU.SEIBAN + JU.SEDAI = STJS.SEIBAN + STJS.SEDAI
-
WHERE
-
JU.SEIBAN = '46705'
-
) JU_STJS ON SYU.HONTAICD = JU_STJS.HONTAICD AND
-
SYU.SYRKBN = JU_STJS.SYRKBN
-
WHERE
-
SYU.KATACD = JU_STJS.KATACD AND
-
((JU_STJS.GENKAKBN ='1' AND JU_STJS.SYRKBN ='1') OR
-
JU_STJS.SYRKBN ='0')
Thanks in advance.
I really don't know what to do with this.
i've been searching the solution for this for almost 2 weeks now. T_T
0 1193 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Rahul Khandpur |
last post by:
hi friends,
i have one query related to oracle9i outer join condition
it is mentioned that we can't use (+) with the operand of OR
and IN operators
example
select...
|
by: Gunnar Vøyenli |
last post by:
Hi!
I have a problem with a query:
Two tables:
CREATE TABLE Emp (empno INT, depno INT)
CREATE TABLE Work (empno INT, depno INT, date DATETIME)
I want a list of all employees that belongs to a...
|
by: Omavlana |
last post by:
Hi,
I need your help to resolve this problem. I have written a right outer
join query between 2 indipendent tables as follows.
select b.Account_desc, b.Account, a.CSPL_CSPL from...
|
by: kumar_rangan1976 |
last post by:
I need the below sybase code to be migrated in UDB :
select distinct
c.partnumber as I_PART,
case
when d.IntegratorID = 'DCX05' then 'U'
when d.IntegratorID = 'DCX04' then 'M'...
|
by: vaddi |
last post by:
hello,
I have query , which has got 2 outer joins. The query is:
SELECT A.Project_ID, A.Title, A.comm1 AS Comments, A.Partner AS PM, A.Staff_Assigned AS TL, A.Contact_Name AS FL, A.MD,...
|
by: karthickkuchanur |
last post by:
1).
Im looking at an example here:
SELECT P.PublisherCode, P.PublisherName, B.BookCode, B.BookTitle
FROM Publisher P LEFT INNER JOIN Book B
ON P.PublisherCode = B.PublisherCode
how this is...
|
by: Rich P |
last post by:
Greetings,
Left Join (outer join) queries are generally for excluding stuff.
select t1.* from tblx t1 Left Join tbly t2 on t1.ID = t2.ID and t1.fld1
= t2.fld1 and t1.fld2 = t2.fld2...
Where...
|
by: hergele |
last post by:
Hello all.. I am trying to convert an application which is working on Oracle to postgreSql..
I've seen a query in code something like this...
select *
from table1 a1 , table1 a2, table2 a3, ...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |