Skip to content

SQL Test Queries NULL

David Lidström edited this page Nov 5, 2017 · 3 revisions

SQL Test Queries - NULL #001

  1. SELECT * FROM List1 WHERE Field1 IS NULL
<View>
    <Query>
        <Where>
            <IsNull>
                <FieldRef Name="Field1" />
            </IsNull>
        </Where>
    </Query>
</View>

SQL Test Queries - NULL #002

  1. SELECT * FROM List1 WHERE Field1 IS not NULL
<View>
    <Query>
        <Where>
            <IsNotNull>
                <FieldRef Name="Field1" />
            </IsNotNull>
        </Where>
    </Query>
</View>

SQL Test Queries - NULL #003

  1. SELECT * FROM List1 WHERE [Some cool Field] IS NOT NULL
<View>
    <Query>
        <Where>
            <IsNotNull>
                <FieldRef Name="Some_x0020_cool_x0020_Field" />
            </IsNotNull>
        </Where>
    </Query>
</View>

SQL Test Queries - NULL #004

  1. SELECT * FROM List1 WHERE [Some cool Field] IS NOTNULL
Uncaught [camlsql] Could not parse statement: Some_x0020_cool_x0020_Field IS NOTNULL