Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> left Outer join SYBASE 2 ORACLE need help
Hi, i need to convert this query for oracle, the "NULL" value is very
important.
How to keep it??????????
That`s very important to have the "and ( properties_name.language=0) in
the "on" clause for sybase
because the result is different.
ORACLE--------------------------->>>>>>>>>>>>>NEED TO BE CONVERT FOR ORACLE TO GET THE "NULL" VALUE IF LANGUAGE=0, HOWEVER, IF THE LANGUAGE EQUAL 1. I NEED TO FOUND 2 ROWS.
Select
Properties_Name.Language,Properties.ID,Properties.ObjectID,Properties.Ke
y,
Properties_Name.name,Properties."ORDER",Properties.Attributes,Properties
_Name.PropID,
Properties.UniqueValue
From Properties,Properties_Name
where Properties.ID=Properties_Name.PropID(+)
and properties_name.language=0
SQL> / no rows selected
SYBASE
Select
Properties_Name.Language,Properties.ID,Properties.ObjectID,Properties."K
ey",Properties_Name.Name,Properties.Type,
Properties."Order",Properties.Attributes,Properties_Name.PropID,Properti
es.UniqueValue
From Properties left outer join Properties_Name
on Properties.ID=Properties_Name.PropID
and properties_name.language=0
Language ID ObjectID Key Name Type Order Attributes PropID UniqueValue =========== =========== =========== =================== ============================ === (NULL) 0 0 CreatedDate (NULL) 5 0 (NULL) (NULL) -1 (NULL) 1 0 Comments (NULL) 1 2 (NULL) (NULL)0
This Example Work For Oracle And Sybase
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
NO PROBLEM WITH THIS QUERY!!!!
SYBASE
Select
Properties_Name.Language,Properties.ID,Properties.ObjectID,Properties."K
ey",Properties_Name.Name,Properties.Type,
Properties."Order",Properties.Attributes,Properties_Name.PropID,Properti
es.UniqueValue
From Properties left outer join Properties_Name
on Properties.ID=Properties_Name.PropID
AND properties_name.language=1
Language ID ObjectID Key Name Type Order Attributes PropID UniqueValue =========== =========== =========== =============================== ==================== 1 0 0 CreatedDate Created: 5 0 (NULL) 0 -1 1 1 0 Comments Description: 1 2 (NULL) 1 0
ORACLE
Select
Properties_Name.Language,Properties.ID,Properties.ObjectID,Properties.Ke
y,
Properties_Name.name,Properties."ORDER",Properties.Attributes,Properties
_Name.PropID,
Properties.UniqueValue
From Properties,Properties_Name
where Properties.ID=Properties_Name.PropID(+)
and properties_name.language=1
SQL> /
LANGUAGE ID OBJECTID
KEY
1 0 0
CreatedDate
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Jan 26 2000 - 12:19:02 CST
![]() |
![]() |