I'm trying to run the following query on MS SQL 2012 Express:
Select (
Select Id, Salt, Password, BannedEndDate
from Users
where username = '" + LoginModel.Username + "'
), (
Select Count(*)
From LoginFails
where username = '" + LoginModel.Username + "'
And IP = '" + Request.ServerVariables["REMOTE_ADDR"] + "')"
);
But I get the following error:
Only one expression can be specified in the
select
list when the subquery is not introduced withEXISTS
.
How can I solve this problem?