3 Replies Latest reply on Jun 9, 2016 9:25 AM by daniel.vareika

    How to put " between " " in Calculation field

    daniel.vareika

      Hi all,

       

      I am building a SQL with Let Statement.

      Would like to break the sript in multiple parts so as to re use

      The problem I am having is putting " between ""

      Line 09. is the first problem I have encountered so far.

       

      Thanks!

       

      Let ( 
      [
      
      
      Layout        = "UL_Log";
      Fields        = "(DataID, EditTS, EditDate, EditTime, Account, EditedField, PreviousValue, NewValue)";
      
      
      SQLOpen       = ""INSERT INTO ";
      SQL1          = "VALUES (";
      SQLClose      = ")" ; "" ; "" ; """;
      
      
      DataID        = "'" & Persona ó Puesto::OID Persona Puesto & "'";
      EditDate      = "'" & GetValue ($logEntry; 1) & "'";
      EditTime      = "'" & GetValue ($logEntry; 2) & "'";
      EditTS        = "'" & EditDate & " " & EditTime & "'";
      Account       = "'" & GetValue ($logEntry; 3) & "'";
      EditedField   = "'" & GetValue ($logEntry; 4) & "'";
      PreviousValue = "'" & Substitute (GetValue($logEntry; 5); "‡"; ¶ ) & "'";
      NewValue      = "'" & Substitute (GetValue($logEntry; 7); "‡"; ¶ ) & "'";
      
      
      Values = DataID & "," & EditTS & "," & EditDate & "," & EditTime & "," & Account & "," & 
               EditedField & "," & PreviousValue & "," & NewValue;
      
      
      SQL    = SQLOpen & Layout & Fields & SQL1 & Values & SQLClose
      
      
      ];
      
      
      BE_FileMakerSQL (SQL)
      )