Recent

Author Topic: [SOLVED] Is it possible to remove space (spaces) from Firebird Varchar() field ?  (Read 3012 times)

finalist

  • Jr. Member
  • **
  • Posts: 84
I must to be absolute sure that a Firebird varchar field contains  some text. But if it contains one space or more spaces, I will not consider that as a text, but as a not correct data.
Is in Firebird some method like Trim() in Pascal ?
If the varchar() field contains one space or more spaces to be converted to empty;
If the varchar() field contains utf-8 text like ´   Text  ´  to be converted to ´Text´.
After above Trim() process I will use next code in a Trigger of a Firebird table:
Code: Pascal  [Select]
  1. IF not (FIELDofVARCHAR = ´´ OR FIELDofVARCHAR is NULL) THEN
  2. BEGIN
  3.   /*........*/
  4. END
  5.  
« Last Edit: January 07, 2016, 05:56:24 pm by finalist »

taazz

  • Hero Member
  • *****
  • Posts: 5363
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64