Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Problems - Help!!!
IF you are using Oracle (based on posting this in an Oracle Newsgroup),
then you need to remove the "join" syntax from the FROM clause and place
it in the WHERE clause. I.E.
SELECT mc.VENDOR.vendoi,mc.VENDOR.id as VendorID,
mc.CONTACT.cntcoi AS ID, mc.CONTACT.aenm AS Name, mc.CONTACT.aenm AS LastName, mc.CONTACT.prefnm AS FirstName, mc.CONTACT.jbttle, mc.CONTACTYPE.id AS ContactType, mc.CONTACT.Language_id AS Language, mc.CONTACT.addr, mc.CONTACT.postcd AS code, mc.REGIONLIST.regn AS Region, mc.COUNTRYLIST.cntry AS Country, mc.CONTACT.phone, mc.CONTACT.fax
mc.REGIONLIST, mc.COUNTRYLIST
WHERE mc.CONTACT.cntctyp_oi = mc.CONTACTYPE.cntpoi
AND mc.CONTACT.Region_oi = mc.REGIONLIST.regnoi AND mc.REGIONLIST.ctry_oi = mc.COUNTRYLIST.ctryoi AND mc.VENDOR.cntctyp_oi = mc.CONTACT.cntcoiAND ((mc.VENDOR.susp_oi) Is Null)
In article <7hs08a$bvp$1_at_nnrp1.deja.com>,
schnauzers_at_my-dejanews.com wrote:
> I am having problems with the following sql
> statement. I get a SQL command not properly
> ended error when it hits the first join. Any
> help will be greatly appreciated!
>
> SELECT mc.VENDOR.vendoi,mc.VENDOR.id as
> VendorID,mc.CONTACT.cntcoi AS ID,
> mc.CONTACT.aenm AS Name, mc.CONTACT.aenm
> AS LastName,
> mc.CONTACT.prefnm AS FirstName,
> mc.CONTACT.jbttle,
> mc.CONTACTYPE.id AS ContactType,
> mc.CONTACT.Language_id AS Language,
> mc.CONTACT.addr, mc.CONTACT.postcd AS
> code, mc.REGIONLIST.regn AS Region,
> mc.COUNTRYLIST.cntry AS Country,
> mc.CONTACT.phone, mc.CONTACT.fax
> FROM mc.VENDOR LEFT JOIN (((mc.CONTACT
> LEFT JOIN mc.CONTACTYPE ON
> mc.CONTACT.cntctyp_oi =
> mc.CONTACTYPE.cntpoi)
> LEFT JOIN mc.REGIONLIST ON
> mc.CONTACT.Region_oi = mc.REGIONLIST.regnoi)
> LEFT JOIN mc.COUNTRYLIST ON
> mc.REGIONLIST.ctry_oi = mc.COUNTRYLIST.ctryoi)
> ON mc.VENDOR.cntctyp_oi =
> mc.CONTACT.cntcoi
> WHERE ((mc.VENDOR.susp_oi) Is Null) AND
> ((mc.CONTACT.cntcoi) Is Not Null)
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
>
--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Tue May 18 1999 - 12:33:02 CDT
![]() |
![]() |