Skip to content
Advertisement

Update field with values from a select query/subquery in SQL

Hello I need to select a specific string form a field one table and then populate another field in a different table in the same SQL database. I am extracting the date from a field. The characters are between two underscores. I was able to create the Select statement correctly using guidance from a previous post in Stack, but when I try to meld it with the update statement an error is thrown. I checked both fields they are of the same type NVARCHAR.

Thanks in advance.

Error that is thrown = Only one expression can be specified in the select list when the subquery is not introduced with EXISTS

Advertisement

Answer

I think this is what you are looking for, your query has couple of issues , so I’m not sure what are column or columns you are trying to update

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement