We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to perform self joins in ROQL?

Received Response
24
Views
1
Comments
edited Jul 14, 2016 10:05AM in Integrations and APIs 1 comment

Content

Hi All,

Is it posible to perform self joins in ROQL queries? In my requirement I am trying to perform a self join on Incidents where master Incident column is equal to the incident ID .

I'm getting "too many source tables in query Error".

 

Thanks,

Sujan

Version

Aug 2014

Code Snippet

             SELECT
    inc.ID as 'Incident ID',
    inc.CustomFields.c.sr_status.LookupName as 'Task Status',
    inc2.ID as 'Parent Incident',  inc2.subject as 'Parent Subject'
from
    Incident inc INNER JOIN Incident inc2
WHERE
    inc.ID = '14057904'
AND
    inc.CustomFields.Incident.Master_Incident=inc2.ID 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!