473,378 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Need help with intersect and subselect

Here is what i have to try and do:

Use INTERSECT and a subselect to display Coach ID and Coach Name for those coaches who live in Oshawa and that DO NOT have a team assigned to them.

the fields CoachId is in the table called tblCoaches and same with a field called CoachCity. The CoachId is also in another table called tblTeams but the field is called TeamCoach instead.


Here is what i have so far:

select coachname from tblcoaches
where coachcity='oshawa'
(select coachid from tblcoaches
intersect
select teamcoach from tblteams)
Nov 25 '08 #1
0 955

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Nick | last post by:
I have three tables books (id, title, author) authors (id, name) authors_groups (author_id, group_id) I have a query that searches for authors who must be in a least one subgroup of two...
1
by: sunaina | last post by:
I am doing the following query using intersect but gives me an error 'error in sql syntax. I tried using join as well but gives me similar error. In the following code still has intersect just to...
6
by: Ian Davies | last post by:
Hello I have found the following script php/java for dynamic menu lists. Where a selection from the first updates (filters items in) the other. I have modified it for my tables. However I am...
6
by: Sebastien | last post by:
I have the following statement which I run successfully in... 1 hour 10 minutes. SELECT a.tsgicd as ACCT_ID, a.tsa5cd as SEC_ID, CASE WHEN (SUBSTRING(a.tsgicd, 6, 1) = 'R' or...
2
by: ngenius | last post by:
Hello everyone, I am new to MySQL but just realized it does not support INTERSECT in MySQL 5.0 Community Server. I have this problem to solve. (1) cust_table cust_id city_code. ...
1
by: Xpertboy | last post by:
i am trying to execute following code in asp var strSQL1="select Model from Phones where Brand='"+ brand +"'"; var strSQL2="select Model from Phones where Model='"+ model +"'"; var...
3
by: prathamesh.deshpande | last post by:
Hi, I am facing problem while excuting a mysql query. My problem is as follows- I have two tables object_1 and object_2. The structure of object_1 is object_id name address ------------...
9
by: pereges | last post by:
Hello I need some ideas for designing a recursive function for my ray tracing program. The idea behind ray tracing is to follow the electromagnetic rays from the source, as they hit the...
9
by: SuperNova | last post by:
Hello! I need to mark similar phrases in two different texts, for example to use <btag. Example: text 1: Google Chrome is a browser that combines a minimal design with sophisticated...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.