new protected string GetWhere() { string command = ""; if ((WhereFields.Count() > 0) || (WhereINValues.Count() > 0) || SelectInTable != null) { command += $" WHERE "; if (WhereINValues.Count() > 0) { command += $"{WhereInField.GetName()} {GetNot()} IN ({WhereINValues.GetFieldValues()}) "; } else if (SelectInTable != null) { command += $"{WhereInField.GetName()} {GetNot()} IN ({SelectInTable.GetSql()}) "; } if (WhereFields.Count() > 0) { command += $"{WhereFields.GetFieldOperandValueasStringorNum()}"; } } return(command); }