Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a query :
SQL
update DeviceDefinitionSettingValues set devicedefinitionsettingxrefid=(Select DeviceDefinitionSettingXrefID from DeviceDefinitionSettingXref
where DeviceDefinitionID='6E269410-670F-4E02-9792-E3E15CD9AA49')


The subquery returns mulltiple values.On executing i get this message:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

What can i do or how can i improvise my query.
I am new to SQL
Posted

1 solution

You can use TOP 1 in Sub Query
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900