Description
When attempting to get the unique values from an attribute table using the Select By Attributes tool or Query Builder, the entire syntax including the 'WHERE' clause after 'SELECT * FROM' is missing after reaching a certain character length.

Cause
By design, there is a limit to the number of characters that can displayed in the dialog box.
Solution or Workaround
To resolve this issue, rename and ensure the layer name is short. In this scenario, use less than 44 characters for lower case letters and 32 characters for upper case letters.