pears.FirstWord

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

CREATE FUNCTION "pears"."FirstWord"( 
  /* Application Maintained Function / Procedure - DO NOT EDIT*/
  IN "sWords" CHAR(50) ) 
RETURNS CHAR(50)
BEGIN
  DECLARE "i" INTEGER;
  SET "swords" = "trim"("swords");
  SET "i" = "charindex"(' ',"swords");
  IF "i" = 0 THEN
    RETURN "swords"
  ELSE
    RETURN("left"("swords","i"-1))
  END IF
END
  • database/functions/pears_firstword.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1