public static string CreateSubCDWildcard(string aSub, string dimensionID)
 {
     if (IsSubCDEmpty(aSub))
     {
         return(PXDatabase.Provider.SqlDialect.WildcardAnything);
     }
     if (aSub[aSub.Length - 1] != '?' &&
         aSub[aSub.Length - 1] != ' ' &&
         aSub.Length == PXDimensionAttribute.GetLength(dimensionID))
     {
         aSub = aSub + "?";
     }
     return(Regex.Replace(Regex.Replace(aSub, "[ \\?]+$", PXDatabase.Provider.SqlDialect.WildcardAnything), "[ \\?]", PXDatabase.Provider.SqlDialect.WildcardAnySingle));
 }