T-SQL Delete statement
I am trying to delete some records from my database with the use of this statement but i keep getting the message the the subquery return one or more records and that is not allowed in this query.
this is the statement
delete from deelname from deelname
inner join trainees on dbo.trainees.trainee_uno = dbo.deelname.trainee_uno inner join
dbo.course on dbo.deelname.course_uno = dbo.course.study_uno
where(dbo.deelname.trainee_uno =(select trainee_uno from trainees where lastname like '%aerts%'
and course_uno =(select Study_uno from course where name like '%test a%')))
when i check the code to see if there are any errors query analyzer shows that the code is correct.
Anybody know what i am doing wrong?