INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

What is equivalent of oracle (+)= in Teradata

What is equivalent of oracle (+)= in Teradata

(OP)
Hi all,

There is the following query in Oracle fetching 11 rows. In Teradata this sql gives error with the message ' SELECT Failed: 3706: Syntax error: expected something between '+' and ')'.

How this query could be translated into Teradata syntax please. In Oracle (+)= is used for kind of outer join. I searched and tried some but not successful. Will appreciate your help.

SELECT DISTINCT C.CLASS2ID , C.DESCRIPTION
FROM CLASS2 C, PRODUCT P, PRODUCT_LOCATION PDL
WHERE
P.CLASS1ID = C.CLASS1ID
AND C.CLASS1ID = '00009'
AND PDL.LOCATIONTYPE (+) = 'S00002'

AND PDL.LOCATIONID (+) = 'S00002'
AND PDL.PRODUCTNUMBER (+) = P.PRODUCTNUMBER
AND NVL(PDL.STATUS(+), P.STATUS) = 2
ORDER BY C.Description

thanks
saj
 

RE: What is equivalent of oracle (+)= in Teradata

I am not real clear on what you are trying to do and since I am not an Oracle user I cannot fully decipher what your original code is attemping, generally speaking a verbal description would have been easy to work with.  That being said hopefully what I provided below will at least give you the framework to finish this off yourself.


SELECT
    DISTINCT C.CLASS2ID
    , C.DESCRIPTION
FROM
   CLASS2 C
Inner Join
   PRODUCT P
On
    P.CLASS1ID = C.CLASS1ID
Left Outer Join
   (Select
    *
    From
        PRODUCT_LOCATION
    Where
        LOCATIONTYPE = 'S00002'
        AND
        LOCATIONID = 'S00002'
    ) PDL
 On
    PDL.PRODUCTNUMBER = P.PRODUCTNUMBER
    AND
    COALESCE(PDL.STATUS, P.STATUS) = 2
WHERE
    C.CLASS1ID = '00009'
    AND
ORDER BY
    C.Description





Best of luck.


 

RE: What is equivalent of oracle (+)= in Teradata

(OP)
bkclaw113, thank you very much. appreciate your help.

saj

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close