Oracle Join with  extra commas

Sam OZ
Sam OZ used Ask the Experts™
I have  following Tables in Oracle

Table: Books

 Table : Author

  AuthorObjID will follow the format ,AuthorID, (For Example if AuthorID is 1234 AuthorObjID is ,1234,)

   How Can I get the List of BookName and corresponding AuthorName ?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
select a.BookID, a.BookName, b.Authorname
from Books a inner join Author b
on a.AuthorObjID = ',' || b.AuthorID || ','

Open in new window

Vikas GargAssociate Principal Engineer
Top Expert 2014


Do you have multiple author id in AuthorObjid column like 1,2,34 etc ?

Do you want the query for oracle or SQL ?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial