Powershell If Array Is Not Null Sql Query To Find