Oracle Join with  extra commas

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

Table: Books
   BookID
   BookName
   AuthorObjID    



 Table : Author
   AuthorID
   Authorname


  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 ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
Commented:
try:
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

Commented:
HI,

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