There is too much ambiguity with regards to needid; poor coding|edit
checking on my part. When I label everything properly, then the query runs
successfully (darn fast, too). I also changed the replacement tag @depth
to @dpth. When I was examining everything with notepad++, it highlighted
@depth as a keyword. I thought maybe I should change that.
Anywho, the system was not throwing an error. It just cycled and cycled
and cycled.
dvn
=========================
update seg_02_matches set rtwgt =
(
select avg(rowid) from
(
select pr.rowid
from seg_02_matches as m1
inner join seg_02_matches_view as n1 on n1.rowid = m1.needid
inner join seg_02_pool_view as p on p.zip = n1.zip and p.crrt = n1.crrt
inner join add_priorities as pr on pr.prty = p.prty and pr.poolid =
p.fileid
where m1.needid = seg_02_matches.needid
order by pr.rowid
limit @dpth
)
)
where needid in
(
select m2.needid from seg_02_matches as m2
inner join seg_02_matches_view as n2 on n2.rowid = m2.needid
where n2.CR = @dpth
);
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users