Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003

    Unanswered: SQL statement for Cyrstal Report 8.5

    I have a text field (PDT_NAME) with this data residing:

    1 procedure name
    10 procedurename
    123 procedurename
    12.4 procedurename
    1234 proceurename

    What I need to do is strip everything after the first space - I only need the numbers on this report .

    I tried RTRIM with SUBSTRING but I ended up in a loop !! TIA - Jenn

  2. #2
    Join Date
    Jan 2005
    Avon Lake, OH
    Try this formula, which finds the position of the first blank space, then returns all characters to the left (unless there is no space in which case it returns a blank string):

    Local NumberVar EndPoint;

    EndPoint := Instr({TableName.PDTNAME}," ");
    If EndPoint > 0 Then
    Left ({TableName.PDTNAME}, EndPoint - 1)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts