Update data in an SQL server using UiPath

Hi everyone,

I have set UiPath up to:

  1. Query a table on SAP Concur to give me the information I need.
  2. Download the contents into an excel file.
  3. Save that excel file as a tab delimited file.
  4. Open notepad++ to find and replace all instances of " with a space.

This gives me a Flat File I need to upload into Microsoft SQL Server. I already have a table there (inside of a database) with the exact same formatting as what I have just created. I want to upload this new data into a table within Microsoft SQL server. I am attaching a sample of the output of the first 4 steps below.

RPADummyData.txt (2.2 KB)

In Microsoft SQL Server Management Studio, to manually upload this, I need to execute a query with the following code:

  1. delete from [dbo.ConcurData]
  2. Use the SQL Server Import and Export Wizard to upload the data into the database table.

Iā€™m attaching a sample of the data that currently site in the ConcurData table below.
RPARealData.txt (2.2 KB)

In UiPath, I want to avoid using the SQL Server Import/Export Wizard and directly upload my data into the table. How would I need to do this?

When I say that it gives me a flat file, I mean that it gives me a formatted .txt file I can use to upload to SQL server.

Take a look at the UiPath.Database.Activities

image

The Data Provider you choose will depend on the version of SQL Server you are connecting to.

Hi, I use this and I can connect to the database. How do I send the information into it though?

1 Like

Same question here, I have the connections setup but am not sure how to get the data through. I think we need to write syntax which I have little to no knowledge about