I have a question. I am using MS SQL Server Management Studio by the way.
I have a Dictionary table with a lot of translations. I need to copy a complete description from a languageID to another languageID.
Example below.
LanguageID | Description
2 | Some text
2 | More text
2 | Some more text
10 | *needs to be replaced
10 | *needs to be replaced
10 | *needs to be replaced
The result must be like this:
LanguageID | Description
2 | Some text
2 | More text
2 | Some more text
10 | Some text
10 | More text
10 | Some more text
The description of LanguageID 2 and 10 must be exactly the same.
My current Query runs into an error:
update tblDictionary
set Description = (Select Description from tblDictionary where
tblDictionary.LanguageID = 2)
where LanguageID = 10
Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= ,
, >= or when the subquery is used as an expression. The statement has been terminated.
LanguageID = 2in the where clause.1value. so, SQL confuses which row will be used.