Wednesday, March 28, 2012

Outer Joins and Substring Error

My problem exists on the last line - TOAD doesn't seem to like the two sets of parenthesis together. Am I supposed to put something in between? It's OK in the line above because the substring is on the other side.

SELECT distinct fp.active_fl, fp.empl_id, fp.proj_mgr_name, pm.project, fp.subctr_id, rd.CONT_CRNCY
FROM planner.rbws_proj_mgr pm, finance.fin_proj fp, finance.rbws_detl rd
WHERE SUBSTR(fp.proj_id, 1, 9) = pm.project (+)
AND pm.PROJECT = substr(rd.PROJ_ID,1,9) (+)Operative word being "think", I don't think that any version of TOAD can use Oracle outer join syntax in Microsoft SQL Server.

-PatP|||Oracle 8i or less no doubt

SELECT DISTINCT fp.active_fl
, fp.empl_id
, fp.proj_mgr_name
, pm.project
, fp.subctr_id
, rd.CONT_CRNCY
FROM planner.rbws_proj_mgr pm
, finance.fin_proj fp
, finance.rbws_detl rd
WHERE SUBSTR(fp.proj_id, 1, 9) *= pm.project
AND pm.PROJECT *= substr(rd.PROJ_ID,1,9)

Is that the old SQL Server syntax? I thankfully don't remember and have no desire to look it up...speaking of desiree...where is she?

Where is my Desire?

No comments:

Post a Comment