I am building a SQL in a web application to retirieve records (oh, wonder)<BR>from a database. Unexpectatedly no records are being returned.<BR>However, If I take the SQL string and save it as a query and execute it<BR>within my asp page as a stored procedure, I have no problems getting the<BR>results I need.<BR><BR>What could be the reason, for that and does anyone know how I could fix<BR>it???<BR><BR>I was wondering if it had to do with the complexity of the query....<BR><BR>Here is the SQL in question:<BR><BR>SELECT candidate.CODE, candidate.ADDRESS, candidate.LASTPOST,<BR>candidate.POSTCODE, candidate.EXPSALP<BR>FROM candidate<BR>WHERE candidate.EXPSALP &#060;=15000 AND &#039telephone skills&#039 in (select<BR>skills.skill from skills where skills.code = candidate.code ) AND<BR>&#039administration&#039 in (select skills.skill from skills where skills.code =<BR>candidate.code ) AND exists(SELECT uklocs.postcode from uklocs WHERE<BR>candidate.postcode like uklocs.postcode AND uklocs.area = &#039Strathclyde&#039);