Is there a way to insert a value into a concatenated row?

Is there a way to insert a value into a concatenated row?


Hi @mattr534,

I'm a tad confused by your question. Are you pertaining to the column and not a row? Based on your first query, you only created the "Client 1 Full Name" as a column in the data (view) resource and did not change the schema (added that column) of the table in your database. What you seem to be doing on the second SQL query is updating that "Client 1 Full Name" so you should be using the UPDATE statement.

If you have the schema setup, then you can:

  1. Add another column in the table schema for 'client_1_full_name'.

ALTER TABLE [table_name]
ADD client_1_full_name string ;

  1. Update the contents of 'client_1_full_name'.

UPDATE [table_name]
SET client_1_full_name = CONCAT(client_1_first_name, ' ', client_1_last_name)
WHERE true

Note: you would want it to be true since you are updating all your data entry in that table.

  1. Use UPDATE Query in your retool resource when you want to insert/add a full name to your table:

UPDATE [table_name]
SET client_1_full_name = {{textInput1.value}}
WHERE client_1_phone = 123456789

NOTE: Your WHERE statement should identify solely John Smith.

I based this suggestion on what you have provided as screenshot. Let us know what your table needs and I will edit my solutions as needed.

Warm regards

Hey, thank you so much for your response. It was exactly what I needed to figure my problem. I'm still learning SQL.