SELECT studentdetails.[mobileno] FROM studentdetails where dobirth=(SELECT studentdetails.[dobirth]
FROM studentdetails where month(dobirth)=month(date()) and Day(dobirth)=Day(Date()));
the error is: atmost one record can be returned by a subquery.. when am running in access 2007
Loading
Hirendra SisodiyaPosted Mar 19, 2010, 7:11 AM
your subquery (SELECT studentdetails.[dobirth]
FROM studentdetails where month(dobirth)=month(date()) and Day(dobirth)=Day(Date()) return more than one records, so you can not use = operator in where condition you can use 'in' operator like this:
SELECT studentdetails.[mobileno] FROM studentdetails where dobirth in (SELECT studentdetails.[dobirth]
FROM studentdetails where month(dobirth)=month(date()) and Day(dobirth)=Day(Date()));
thanks
Please mark as Accepted Answere if you like this answere