Print Page | Close Window

SQL Help

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=480
Printed Date: 28 March 2026 at 5:01pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: SQL Help
Posted By: jdumayas
Subject: SQL Help
Date Posted: 24 February 2003 at 1:06pm

Hello, need a bit of help on any SQL string.  I've set up the following tables:

tblOfferings
offeringID, offeringTitle, offeringLocation, dateofProd, duration

tblTechnologies
technologyID
technology

tblTechnologyLookup
offeringID
technologyID

I'm trying to set up a query to get the offering title for a particular technology, in this case technology181

HEre is my SQL String:

SELECT tblOfferings.offeringTitle FROM tblOfferings, tblTechnologyLookup WHERE tblOfferings.offeringID = tblTechnologyLookup.offeringID AND tblTechnologyLookup.technologyID = 181;

The error I get is 

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

I've verified the field names and it doesn't seem to be the issue.  I'm using Access with an ASP front end.  Thanks for everyone for your help. 




Replies:
Posted By: MorningZ
Date Posted: 24 February 2003 at 1:17pm
Use inner join instead of the old ANSI method (like you are trying)

SELECT o.offeringTitle FROM tblOfferings o INNER JOIN tblTechnologyLookup l ON l.offeringID = o.offeringID WHERE l.technologyID = 181;

Alternatively, you can also do

SELECT offeringTitle FROM tblOfferings WHERE offeringID IN (SELECT offeringID FROM tblTechnologyLookup WHERE technologyID = 181)

-------------
Contribute to the working anarchy we fondly call the Internet



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net