Re: nasty SQL query, please advise...
- From: "swansnow" <schultz@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: 20 Sep 2005 08:32:22 -0700
unfortunately, I don't think I can do this in a single query. It turns
out there is no visitID -- I made an assumption. At any rate, I didn't
know you were allowed to refer to the outer table from inside a
subquery.
I don't have a lot of experience with the more complex queries. My SQL
reference book doesn't have anything about using an update and a join
in the same statement...
Also, the query can be simplified (and made faster) because I don't
need to join with the clients table -- the clientnumber is in the
coverage table!
I decided to write a little program that will iterate through the
visits table, and look up the client number for each record in the
visits table. It will be slower than a query, though, I think, and
this is a very large table... However, I won't need to do any joins,
and the index will be used, so maybe the speed is comparable.
Thanks anyway...
-Corinna
.
- Follow-Ups:
- Re: nasty SQL query, please advise...
- From: Maarten Wiltink
- Re: nasty SQL query, please advise...
- References:
- nasty SQL query, please advise...
- From: swansnow
- Re: nasty SQL query, please advise...
- From: Maarten Wiltink
- nasty SQL query, please advise...
- Prev by Date: Re: nasty SQL query, please advise...
- Next by Date: Newbie question: why 2 uses clauses?
- Previous by thread: Re: nasty SQL query, please advise...
- Next by thread: Re: nasty SQL query, please advise...
- Index(es):
Relevant Pages
|
|