I'm facing an issue to select the value from the same object. I provided the query below.

I'm migrating a Java J2EE application to Salesforce, the below query works in my `SQL`.  

I'm trying to do the same in `SOQL`, but it doesn't work.

```
 SELECT DATA1__c, TEXT__c 
     FROM PARAMETERS__c 
     WHERE ( (TYPE__c = 'ADMINISTRATEUR') 
         AND (KEY1__c LIKE 'MONTAGE%') (AND KEY2__c = '')) 
         AND (DATA1__c 
                  IN (SELECT KEY1__c 
                      FROM Parameters__c 
                      WHERE TYPE__c = 'PERE_TECHNIQUE'))

```

In the above query I need to take the value where `TYPE` is based on `'TECHNIQUE' where KEY1__c` should be matched to `DATA1__c` from the outer query.

The query is very similar to this example

```
 SELECT Id 
     FROM Idea 
     WHERE ((Idea.Title LIKE 'Vacation%') 
         AND (CreatedDate > YESTERDAY)  
         AND (Id IN (SELECT ParentId 
                     FROM Vote 
                     WHERE CreatedById = '005x0000000sMgYAAU'))

```

The only difference is that `IN` clause is used with a different object.
In my query I'm trying to use `IN` clause from the same object parameters.

Kindly let me know in case of any further clarifications.