Add new value to database column

hiii guys,i’m just working on sql database got struck in the middle of the process, my query is i have my database where it has table with 3 columns say name,id,output and out of which i have values in name and id column and the output column is empty,empty in the sense not null value and now the thing is i,m able to get the data from database as output as datatable and the thing i have to open browser and fill the details of name and id and it will give you a text as by using get text activity i can able to store it in a i want that output variable value to be insert in output column in my database for each row how can i do that.

  1. The returned out put variable of the query is data table.
  2. you are using the for each row to loop in.
  3. use update query inside the for each loop
    UPDATE table_name
    SET column4 = @value
    WHERE condition ;
1 Like

Hi @venkatmalla6

Use insert activity


1 Like

Hi buddy @venkatmalla6

  1. You might be getting an output of type datatable from the execute query activity say out_dt, with those three COLUMNS
  2. While iterating through each row in a for each row loop and using a type in to Activity and getting the value by get text…
  3. Assign that get text value to that column being inside the for each row loop itself
    Like thia
    row(“output”) = gettextoutoutvariable
  4. Then use execute query, use delete statement to delete all the records in that table in database
  5. Then use a insert query where mention the table name in database and mention the datatable out_dt as input, as this datatable has the column output updated with values
    Hope this would help you buddy
    Cheers @venkatmalla6
1 Like

@Palaniyappan thanks buddy,i understand somewhat but if possible can you share me a samlpe xaml file. thank you

@Palaniyappan buddy, i got an error actually i have a excel sheet with columns as name,id,output what i’m doing is i’m trying to insert each row into my sql database which is having same columns as above while i was running it is showing some error plz have a look

this is my query which i wrote to insert data into database. this is the error which i’m getting while i was running,plz suggest me how to come out from this.

1 Like

Fine use insert activity buddy not execute non query
where you dont need to write any insert statement rather we can mention the input as the tablename in database and pass the input with datatable you have
Cheers @venkatmalla6

1 Like

still any issues buddy @venkatmalla6

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.