0

This will not execute, says I have an error near "'Proveder_ID','Last_Name','Prof_Suffix_Code','Full_Name','Provid...'

LOAD DATA INFILE '$fileTmpPath'
         INTO TABLE test
         FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
         LINES TERMINATED BY '\n'
         ('Provider_ID','Last_Name','First_Name','Prof_Suffix_Code','Full_Name','Provider_Type_descr','Provider_Type','Accepting_new_Patients','THHealthSteps','SpecialtyCode','Specialty','Group_Name','Address','City','zip','County','phone','extended_hours','Restrictions1','Fee_Schedule','Fee_Schedule_Code','Spanish_Spoken','counties_nueces','counties_hidalgo','min_age','max_age','URL','Handicap','Provider_Gender','Language_Spoken','Weekday_hours','Weekend_hours','Restrictions2','Restrictions3')
iamdamnsam
  • 41
  • 3
  • 2
    It may be a typo. The **query** says `Provider_ID` while the **error** says `Proveder_ID` – medilies Feb 26 '22 at 19:48
  • 1
    Did you copy/past the error message or rewrite it ? – medilies Feb 26 '22 at 19:50
  • I am not sure but have you tried for example (Provider_ID, Last_Name) instead of (’Provider_ID’, ’Last_Name’)? – jamomani Feb 26 '22 at 19:59
  • 1
    Sorry I typed the error, here is the actual error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''Provider_ID','Last_Name','First_Name','Prof_Suffix_Code','Full_Name','Provid...' at line 5 – iamdamnsam Feb 26 '22 at 20:02
  • @jamomani I removed the quotes and I think that worked. I now get an error Access denied for user 'test'@'%' (using password: YES) – iamdamnsam Feb 26 '22 at 20:06
  • 1
    you can't use single quotes for columnnmes, remove them or use backticks – nbk Feb 26 '22 at 20:12
  • Try to connect with the root user – medilies Feb 26 '22 at 20:15

0 Answers0