KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Use SQL commands with 4D fields with space in name
PRODUCT: 4D | VERSION: 13.3 | PLATFORM: Mac & Win
Published On: July 11, 2013

It is recommended to not use spaces in table or field names. More errors are likely to arise when using spaces. For example, if there is a space in a table or field name within an SQL statement being executed, a generic parsing error may be generated as shown:



Although it is not recommended to use spaces in table or field names, it is possible to execute SQL statements with these spaces. When executing SQL statements, brackets ("[ ]") can be used around the table and field names with or without spaces.

Example:

C_TEXT($value_t)
C_LONGINT($value_l)

Begin SQL
UPDATE Table_1
Set [Field Two] = :$value_t
Where [Field_One] = :$value_l

End SQL