Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 10th, 2006, 08:26 AM
Authorized User
 
Join Date: Jul 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL returning odd results

I'm using:

SELECT DISTINCT Candidates.Id, Candidates.FirstName, Candidates.LastName, Candidates.ReferenceNumber
FROM Candidates_SkillAreas INNER JOIN
     Candidates ON Candidates.Id = Candidates_SkillAreas.CandidateID
WHERE (Candidates_SkillAreas.SkillAreaID NOT IN (146, 147, 148)) AND (Candidates.IndustryID = 2)
ORDER BY Candidates.LastName, Candidates.ReferenceNumber

but it's returning records containing 146, 147 or 148. What have I got wrong?

 
Old November 13th, 2006, 05:07 AM
Registered User
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

just execute code once again as it is running smoothly
on my machine and returning the results as expected.






Similar Threads
Thread Thread Starter Forum Replies Last Post
$sql not returning results, this cant be this hard cspgsl Beginning PHP 0 May 5th, 2006 11:50 AM
Stored Procedures returning no results to access 50bmg_de SQL Server 2000 5 February 21st, 2006 04:58 AM
Query returning 0 results although SQL is valid aquagal77 Classic ASP Databases 4 March 31st, 2005 11:06 AM
Returning Oracle SELECT query results to DataSet gp_mk ADO.NET 0 December 17th, 2003 11:08 AM
Query not returning correct results from database Jams30 PHP Databases 5 November 7th, 2003 08:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.