Подзапрос вернул более 1 значения. Это не разрешается
select Row_Number() OVER(order by orderNumber ) as SN, IIF( orderStatus = 'Completed','Unused', orderStatus) as VoucherStatus,cardAmount as Amount,card_pin as VoucherPin, orderNumber as BatchNo,cardpin_sn as SerialNumber, (select dname from users where username=(select depositor from Bankdeposit where cardpin=orderdetails.card_pin)) +' ('+ (select saveaseid from users where username=(select depositor from Bankdeposit where cardpin=orderdetails.card_pin))+')' as UsedBy, (select transactionDate from Bankdeposit where cardpin=orderdetails.card_pin) as UsedDate from orderdetails where orderby=@in_uname and orderStatus='completed' order by orderNumber
Что я уже пробовал:
набрал гугл но ответа нет