Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to be run aginst both SQL and Oracle db

Status
Not open for further replies.

nimishauk

Programmer
Mar 18, 2003
12
ZA
Hi
I've been made aware that in Oracle 8 db, outer and inner joins donot work.
How can use the foll query to work against both dbs.

SELECT AppUser.Forename, AppUser.Surname, AppUser.ID
FROM Training_Course_AppUser LEFT OUTER JOIN
AppUser_TrainingCourse ON Training_Course_AppUser.AppUser_ID = AppUser_TrainingCourse.AppUser_ID AND
Training_Course_AppUser.Course_ID = AppUser_TrainingCourse.Course_ID RIGHT OUTER JOIN
AppUser ON Training_Course_AppUser.AppUser_ID = AppUser.ID
WHERE Training_Course_AppUser.Course_ID = 125 And AppUser_TrainingCourse.Completion_Date Is Null


regards
N

 
I think you're stuck here... Oracle 9i supports ANSI JOIN syntax, but 8/8i do not.

In Oracle 8, you have to use the (+) operator on the column to be outer-joined. This is not supported by SQL Server.

I think you'll have to find a way to send two different queries to the DBs. Or upgrade to 9i :)

Good luck
 
Hi Jedi

I've sorted it . It can be done just need to do a union. Ta for the reply.
N
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top