Hello,I am facing an error in the following CASE T-SQL:Select Right('00000' + Cast(indent.indent_ID As VarChar(5)), 5) As 'Sr. No.', indent.financial_year, indent.[from], indent.[to], indent.indent_date, indent.menu, indent.required_date, indent_details.item_name, indent_details.item_UOM, indent_details.rate, CASE WHEN indent_details.qty_issued is NULL THEN (SELECT indent_details.qty_reqd FROM indent_details) else indent_details.qty_issued end 'Quantity', CASE WHEN indent_details.qty_issued is NULL THEN (SELECT (indent_details.qty_reqd*indent_details.rate) FROM indent_details) else (indent_details.qty_issued*indent_details.rate) end 'Rate'From indent Inner Join indent_details On indent.indent_ID = indent_details.IndentNumberWhen am running the following T-SQL, am getting the following error:(1 row(s) affected)Server: Msg 512, Level 16, State 1, Line 1Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Please Help!Daipayan