× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Very cool!

According to the manual (RTFM), the DELETE statement does not have the WITH AS 
available. Only a SELECT. Not UPDATE either. 

Vern

-------------- Original message -------------- 

> Let's try it. 
> 
> create table qtemp/myword (word char(80)) 
> Table MYWORD created in QTEMP. 
> 
> insert into qtemp/myword select word from lgsql/wordfile2 
> group by word having count(*) = 1 
> 16524 rows inserted in MYWORD in QTEMP. 
> 
> delete from lgsql/wordfile2 where exists 
> (select word from qtemp/myword) 
> 94111 rows deleted from WORDFILE2 in LGSQL. 
> 
> The where exists... is true for all rows. All rows were removed! Not to 
> worry, this is a test file anyway, easily recreated. 
> 
> insert into lgsql/wordfile2 
> (stockno, word, fulldesc, location) 
> select stockno, word, fulldesc, location from loyd/wordfile2 
> 94111 rows inserted in WORDFILE2 in LGSQL. 
> 
> delete from lgsql/wordfile2 where exists 
> (select word from qtemp/myword 
> where wordfile2.word=myword.word) 
> 16524 rows deleted from WORDFILE2 in LGSQL. 
> 
> 
> This is the correct outcome! And it ran in under 10 seconds! 
> Hurray! 
> 
> 
> Loyd Goodbar 
> Senior programmer/analyst 
> BorgWarner 
> E/TS Water Valley 
> 662-473-5713 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.