Skip to main content
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

  • February 16, 2022
  • 2 replies
  • 126 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

Forum|alt.badge.img+19
  • Most Valuable Pathfinder
  • 2697 replies
  • February 16, 2022

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


Ashwin A.K
Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 2445 replies
  • February 16, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings