- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3
SQL Test Queries IN statement
        David Lidström edited this page Nov 5, 2017 
        ·
        1 revision
      
    These are the tests and expected results for JOINs. These tests can be found in camlsql.sql_joins.spec.js.
Select from List1 Where Field1 is any of the specified numbers
- "SELECT * FROM List1 WHERE Field1 IN ?",[[1,2,3]]
<View>
    <Query>
        <Where>
            <In>
                <FieldRef Name="Field1" />
                <Values>
                    <Value Type="Number">1</Value>
                    <Value Type="Number">2</Value>
                    <Value Type="Number">3</Value>
                </Values>
            </In>
        </Where>
    </Query>
</View>
Error if parameter is not an array
- "SELECT * FROM List1 WHERE Field1 IN ?",[1,2,3]
Uncaught [camlsql] IN parameter must be an array