Neven
 
I was relying on my memory of Informix SQL (from 14 years ago!).  Just had a check, and the "into temp" goes at the end of the select clause. Very handy.
 
But this does not work in Paradox, neither does your "Insert into temp" unless you go through the create table bizzo first.
 
Never mind.  I have a solution - there is a related table that I can update first, so that it just has the forcode/comp combinations that we want.  Obvious really - but not on a Friday afternoon!
Thanks for your input
Mark
----- Original Message -----
Sent: Friday, May 25, 2001 1:02 AM
Subject: Re: [DUG]: Another SQL poser

Mark
 
is "select into TableName" std SQL, I would have expected
"Insert into temp select ...."
 
If not I could say its Paradox not SQL
 
Neven
----- Original Message -----
Sent: Saturday, May 26, 2001 11:46 AM
Subject: [DUG]: Another SQL poser

Hello
I'm using Paradox.
 
I want to achieve the following effect:
 
Select into temp
distinct a.forcode, a.comp from dockets a
where a.docketdate > '31/03/2001';
 
Delete from dockets b
where not exists
(select c.forcode from temp
    where b.forcode = temp.forcode
    and b.comp = temp.comp)
 
BUT with Paradox I can't use the "into temp" syntax
 
Can someone suggest another way of acheiving the same.
 
In a nutshell, I want to delete all the rows from the dockets table where the forcode/comp combination is not current (ie been used this financial year)
 
Any ideas?
 
TIA
 
Mark
 
 

Reply via email to