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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left Join strange error.... 1

Status
Not open for further replies.

whloo

Programmer
Apr 14, 2003
168
SG
Hi,

I am trying to make a left join for a view(SENT_ITEM_TEMP) and a table(ihex) but it seems to always give me "Sql Command not properly ended" error.

"select SENT_ITEM_TEMP.incnum,ihex.number3 from SENT_ITEM_TEMP left join ihex on SENT_ITEM_TEMP.incnum = ihex.incnum"

anyone able to spot anything wrong? or is it due to it is a view?
Thanks!

Regards,
weihann.
 
whloo,
You left part of the key word in the outer join syntax.

Try "select SENT_ITEM_TEMP.incnum,ihex.number3 from SENT_ITEM_TEMP left outer join ihex on SENT_ITEM_TEMP.incnum = ihex.incnum"

Regards,
--aa

 
amrita418,

thanks for the reply.
i tried ur sql but it stil giv me the same error :(
i m using oracle db. any concern abt it?
 
This is not an oracle forum so please do not post anymore oracle questions here.

In regards to your question, Oracle started using the sql-92 syntax only since version 9i. If you have an version earlier then use the following syntax:

select s.incnum,
i.number3
from SENT_ITEM_TEMP s,
ihex i
where s.incnum = i.incnum (+)

Regards,
--aa
 
amrita418,

thank u very much!!! u rock!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top