hi,
<br>Im trying to trim a variable from a Visual Fox database.
<br>Im using the ALLTRIM function but its not working.
<br>Any hint?
<br>
<br>
<br>
<br>Here is the log details:
<br>
<br>Im interested in the @TRIM_SERIE variable (ALLTRIM(num_serie) AS TRIM_SERIE
<br>
<br>
<br>Feb 15 13:36:00.67: [1] START
<br>Feb 15 13:36:00.67: [42] DB Connect
<br>Feb 15 13:36:00.67: ConnectString: DSN=CONSULTA
<br>Feb 15 13:36:00.68: SQL Error State: 01000
<br> Native Error Code: 0
<br> ODBC Error: [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
<br>Feb 15 13:36:00.68: SQL Error State: HYC00
<br> Native Error Code: 0
<br> ODBC Error: [Microsoft][ODBC Visual FoxPro Driver]Driver not capable
<br>Feb 15 13:36:00.70: [11] SQL Begin Transaction
<br>Feb 15 13:36:00.70: [12] SQL Statement
<br>Feb 15 13:36:00.70: <----- BEGIN ----->
<br> SELECT
<br> corralon,
<br> infraccion,
<br> tipo,
<br> marca,
<br> modelo,
<br> fecha_entr,
<br> ALLTRIM(placas) AS TRIM_PLACAS,
<br> tipoauto,
<br> adeudo,
<br> corralnom,
<br> cproced,
<br> ALLTRIM(num_serie) AS TRIM_SERIE
<br> FROM
<br> infotel.dbf
<br>
<br> <----- END ----->
<br>Feb 15 13:36:00.71: [15] SQL Fetch
<br>Feb 15 13:36:00.71: Setting global variable '@CORRALON' to '05'
<br>Feb 15 13:36:00.71: Setting global variable '@INFRACCION' to '44611'
<br>Feb 15 13:36:00.71: Setting global variable '@TIPO' to '02'
<br>Feb 15 13:36:00.71: Setting global variable '@MARCA' to '002'
<br>Feb 15 13:36:00.71: Setting global variable '@MODELO' to '1981'
<br>Feb 15 13:36:00.71: Setting global variable '@FECHA_ENTR' to '1992-04-29'
<br>Feb 15 13:36:00.71: Setting global variable '@TRIM_PLACAS' to '902YMD '
<br>Feb 15 13:36:00.71: Setting global variable '@TIPOAUTO' to 'PICK-UP Ford 1981 '
<br>Feb 15 13:36:00.71: Setting global variable '@ADEUDO' to '165299'
<br>Feb 15 13:36:00.71: Setting global variable '@CORRALNOM' to 'CERESO '
<br>Feb 15 13:36:00.71: Setting global variable '@CPROCED' to '01'
<br>Feb 15 13:36:00.71: Setting global variable '@TRIM_SERIE' to 'JC4UA2222B0535617 '
<br>Feb 15 13:36:00.73: [78] Run Flowchart
<br>Feb 15 13:36:00.73: Flowchart: 'ExtrerCincoDigitos'
<br>Feb 15 13:36:00.73: ConsulSerie==>
<br>ExtrerCincoDigitos
<br>Feb 15 13:36:00.73: [1] START
<br>Feb 15 13:36:00.73: [6] Math
<br>Feb 15 13:36:00.73: @LONG_SERIE = LENGTH (@TRIM_SERIE)
<br>Feb 15 13:36:00.73: @LONG_SERIE = LENGTH (JC4UA2222B0535617 )
<br>Feb 15 13:36:00.73: Setting global variable '@LONG_SERIE' to '20'
<br>Feb 15 13:36:00.75: [8] Math
<br>Feb 15 13:36:00.75: @START_POS = @LONG_SERIE - 4
<br>Feb 15 13:36:00.75: @START_POS = (integer):20 - (integer):4
<br>Feb 15 13:36:00.75: Setting global variable '@START_POS' to '16'
<br>Feb 15 13:36:00.75: [7] Math
<br>Feb 15 13:36:00.75: @CINCO_NUM_SER = substr (@TRIM_SERIE, @START_POS, 5)
<br>Feb 15 13:36:00.75: @CINCO_NUM_SER = substr (JC4UA2222B0535617 , 16, 5)
<br>Feb 15 13:36:00.75: (integer): 5
<br>Feb 15 13:36:00.75: Setting global variable '@CINCO_NUM_SER' to '17 '
<br>Feb 15 13:36:00.75: [2] FINISH
<br>Feb 15 13:36:00.75: ConsulSerie<==ExtrerCincoDigitos
<br>Feb 15 13:36:00.76: [17] Compare
<br>Feb 15 13:36:00.76: @MISERIE = @CINCO_NUM_SER?
<br>Feb 15 13:36:00.76: (integer):35617 = (string):17 ?
<br>Feb 15 13:36:00.76: FALSE
|