3 Replies Latest reply on Mar 22, 2014 4:19 PM by Oliver_Reid

    What is wrong with this  SQL instruction ?

    Oliver_Reid

      I am having a bad SQL day

       

      In mysql id exdute the statement below I am told:

       

      Error : Unknown column '2014-02-08 16:15:00' in 'field list' Why? (I'm sure there IS a reason )

       

      ( teh two timstamp fields are actuallt varchar fields i sql, so it is noyth data formating that is causing the problem

       

       

      INSERT INTO ION7350_666_sql (

      `time_UTC_`,

      `error`,

      `lowalarm`,

      `highalarm`,

      `Vln a _Volts_`,

      `Vln b _Volts_`,

      `Vln c _Volts_`,

      `Vln ave _Volts_`,

      `Vll ab _Volts_`,

      `Vll bc _Volts_`,

      `Vll ca _Volts_`,

      `Vll ave _Volts_`,

      `I a _Amps_`,

      `I b _Amps_`,

      `I c _Amps_`,

      `I ave _Amps_`,

      `V unbal _%_`,

      `I unbal _%_`,

      `Freq _Hz_`,

      `Phase Rev`,

      `kW a _kW_`,

      `kW b _kW_`,

      `kW c _kW_`,

      `kW tot _kW_`,

      `kVAR a _kVAR_`,

      `kVAR b _kVAR_`,

      `kVAR c _kVAR_`,

      `kVAR tot _kVAR_`,

      `kVA a _kVA_`,

      `kVA b _kVA_`,

      `kVA c _kVA_`,

      `kVA tot _kVA_`,

      `PF sign a`,

      `PF sign b`,

      `PF sign c`,

      `PF sign tot`,

      `kW td _kW_`,

      `kVAR td _kVAR_`,

      `kVA td _kVA_`,

      `kW td mx _kW_`,

      `kVAR td mx _kVAR_`,

      `kVA td mx _kVA_`,

      `Vln avg mx _Volts_`,

      `I avg mx _Amps_`,

      `kW tot mx _kW_`,

      `kVAR tot mx _kVAR_`,

      `kVA tot mx _kVA_`,

      `Freq mx _Hz_`,

      `Vln Ave mn _Volts_`,

      `I ave mn _Amps_`,

      `Freq mn _Hz_`,

      `_unused_`,

      `kWh del _kWh_`,

      `kWh rec _kWh_`,

      `kWh del_rec _kWh_`,

      `_kWh del_rec _kWh_`,

      `kVARh del _kVARh_`,

      `kVARh rec _kVARh_`,

      `kVARh del_rec _kVARh_`,

      `_kVARh del_rec _kVARh_`,

      `kVAh _kVAh_`,

      `V1 THD mx _%_`,

      `V2 THD mx _%_`,

      `V3 THD mx _%_`,

      `I1 THD mx _%_`,

      `I2 THD mx _%_`,

      `I3 THD mx _%_`,

      `__unused_`,

      `Device_ID`,

      `FileImportTS`,

      `FileName`

      )

      VALUES

      (

      `2014-02-08 16:15:00`,

      `0`,

      `0`,

      `0`,

      `271.5`,

      `274.1`,

      `273.8`,

      `273.1`,

      `472.2`,

      `474.7`,

      `472.4`,

      `473.1`,

      `1345.0`,

      `1427.5`,

      `1380.2`,

      `1384.2`,

      `0.6`,

      `3.1`,

      `60.0`,

      `0`,

      `354.1`,

      `380.8`,

      `361.8`,

      `1096.7`,

      `82.5`,

      `77.4`,

      `100.0`,

      `259.9`,

      `363.6`,

      `388.6`,

      `375.3`,

      `1127.0`,

      `-97.4`,

      `-98.0`,

      `-96.4`,

      `-97.3`,

      `1105.2`,

      `259.6`,

      `1135.3`,

      `1708.2`,

      `489.0`,

      `1762.9`,

      `338.3`,

      `-2552.2`,

      `2323.5`,

      `1629.0`,

      `2361.2`,

      `60.1`,

      `0`,

      `0`,

      `0`,

      `373745.2`,

      `571900`,

      `0`,

      `571900`,

      `571900`,

      `1337719`,

      `0`,

      `1337719`,

      `1337719`,

      `2155806`,

      `11`,

      `11`,

      `13`,

      `24`,

      `19`,

      `18`,

      `-10001`,

      `12`,

      `3/21/2014 8:55:43 PM`,

      `mb-101.52F65806_2.log.csv`

      );