Translate an SQL query with subquery to CAML

0

I want to create a CAML query from a SQL query. Query SQL contains a subquery from the same list.

I've tried a thousand ways but it does not work.

The query is as follows:

select * from "list" where NameUser = (select NameUser from "list" where responsable = [Me])
  

The field -Responsable- is of the user type and the field -NameUser- is   chain type.

    
asked by Alex Dvs 20.04.2017 в 15:53
source

1 answer

0

CALM queries define the string data types one way and the sp user types User using the user id. You have to know the user's id. if the user is logged in or if the user's id is in the collection of sites where you work

something like

<Where>
 <Eq>
  <FieldRef Name='User' />
    <Value Type='Lookup'>1</Value>
 </Eq>
</Where>
    
answered by 29.08.2017 в 11:00