Question

We are trying to connect to CSV as a Database and could successfully select desired records using Microsoft Text Driver. However unable to Update records. Any help with Update SQL Statement to update CSV as a DB would be much appreciated

  • 16 February 2022
  • 2 replies
  • 26 views

We are trying to connect to CSV as a Database and could successfully select desired records using Microsoft Text Driver. However unable to Update records. Any help with Update SQL Statement to update CSV as a DB would be much appreciated

2 replies

Userlevel 5
Badge +8

Hi @Rajiv Tarafdar​ ,

 

checkout below link for resolution,

 

https://apeople.automationanywhere.com/s/question/0D52t00001DpGRNCA3/i-c-onnected-csv-file-using-microsoft-text-connection-string-in-a360-using-database-insertupdate-command-i-tried-to-update-the-csv-file-but-it-is-showing-syntactical-error?s1oid=00D90000000gDTdamp;OpenCommentForEdit=1&s1nid=0DB6F000000oMPS&emkind=chatterPostNotification&s1uid=0056F00000ATXY5&emtm=1644922105579&fromEmail=1&s1ext=0

Userlevel 3
Badge +7

Hi @Rajiv Tarafdar​ ,

 

You can't update records in CSV unless it involves a JOIN operation.

Here is the syntax for updating records in CSV using JOINs:

 

UPDATE [Movies$$] AS t1

INNER JOIN [Budget$$] AS t2

ON t1.[Title]=t2.[Title]

SET t1.[Title]= t2.[Profit]

 

I haven't tried using Self Joins, maybe try giving that a try and see if it works out for you?

 

Kind Regards,

Ashwin A.K

Reply