I have the following two tables, that match against each other.<BR>(This system has to be an automatic notifier by e-mail when someones search-criteria in the database matches with the data of vehicles that are for sale).<BR> <BR><BR>Example: <BR><BR>Test.Model Test.Type <BR>BMW 316 <BR>Mercedes SLK <BR>Opel Tigra <BR>Opel Calibra <BR>BMW 520 <BR><BR>Login.Models Login.Types Login.Email<BR>BMW 520 email@email.com <BR>Opel Astra jansen@jansen.com <BR><BR>So in this example, there should be an e-mail send to "email@email.com", with the details of the car: BMW 520 from the table "Test".<BR><BR><BR>This is the SQL-statement I use:<BR><BR>-------------------------------------------------------------------------------- <BR>SELECT Test.Model, Test.Type, Login.Models, Login.Types, Login.Minlength, <BR>Login.Maxlength, Test.Loa, Test.Asking_price, Login.Minprice, Login.Maxprice, <BR>Test.Hull_Material, Login.Material, Login.Email <BR><BR>FROM Test, Login <BR><BR>WHERE Test.Model LIKE Login.Models AND Test.Type = Login.Types AND Test.Loa <BR>BETWEEN Login.Minlength AND Login.Maxlength AND Test.Asking_price BETWEEN <BR>Login.Minprice AND Login.Maxprice AND Test.Hull_Material = Login.Material <BR>ORDER BY Test.Model <BR><BR>-------------------------------------------------------------------------------- <BR> <BR>This query returns me all matching data in the following way:<BR><BR>Test.Model Login.Models Login.Email<BR>BMW BMW email@email.com <BR>BMW BMW email@email.com<BR>BMW BMW email@email.com<BR><BR>So in the above example there are 3 BMW&#039;s for sale. The person is searching for a BMW, so it returns 3 matches. (is this right ???)<BR><BR><BR>Then the results are mailed to each person, that has a match<BR><BR>Code: <BR><BR>-------------------------------------------------------------------------------- <BR> &#060;% <BR>While ((Repeat1__numRows &#060;&#062; 0) AND (NOT rsSearch.EOF)) <BR>%&#062; <BR> &#060;tr&#062; <BR> &#060;td&#062;&#060;%=(rsSearch.Fields.Item("Model ").Value)%&#062;&#060;/td&#062; <BR> &#060;td&#062;&#060;%=(rsSearch.Fields.Item("Type" ).Value)%&#062;&#060;/td&#062; <BR> &#060;td&#062;&#060;%=(rsSearch.Fields.Item("Askin g_price").Value)%&#062;&#060;/td&#062; <BR> &#060;/tr&#062; <BR>&#060;% <BR>Set mail = Server.CreateObject("CDONTS.NewMail") <BR>mail.From = "info@mijnsite.nl" <BR>mail.To = rsSearch("Email") <BR>mail.BodyFormat = 0 <BR>mail.MailFormat = 0 <BR>mail.Subject = "subject" <BR>mail.Body = rsSearch("Model") & rsSearch("Type")& rsSearch("Asking_price") <BR>mail.Send <BR>Set mail = Nothing <BR>%&#062; <BR> &#060;% <BR> Repeat1__index=Repeat1__index+1 <BR> Repeat1__numRows=Repeat1__numRows-1 <BR> rsSearch.MoveNext() <BR>Wend <BR>%&#062; <BR><BR>-------------------------------------------------------------------------------- <BR> <BR><BR><BR><BR><BR><BR>But, now for each match there is an e-mail send to that person, with the details of the car for sale.<BR><BR>I want offcourse that when there is a match, that there is one e-mail send to each person, with all the matches in the bodytext of the email.<BR><BR>How can I achieve this ?<BR><BR>Is my SQL right, I&#039;m worried that that is the problem, is that correct ?