I Dont know if Paradox supports it (I think COALESCE is part of the ANSI
standard)
but you could try

update dockets set LogPrice = COALESCE((select LogPrice from Temp
 where temp.docketno = dockets.docketno),0)

This will update all dockets
whereas:

UPDATE Dockets
SET LogPrice = ( SELECT LogPrice FROM Temp WHERE
Temp.DocketNo=Dockets.DocketNo )
WHERE EXISTS ( SELECT 'X' FROM Temp WHERE Temp.DocketNo=Dockets.DocketNo )

will only update dockets where lines exist

Regards Neven
N.K. MacEwan B.E. E&E
[EMAIL PROTECTED]


----- Original Message -----
From: Mark Howard <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, 1 June 2000 01:52
Subject: [DUG]: Table update


> Hi
>
> When I run the following
>
> update dockets set LogPrice = (select LogPrice from Temp
>  where temp.docketno = dockets.docketno)
>
> all of dockets that are not found in the select statement have
> LogPrice set to Null.
>
> This was NOT my intention.  What do I have to do so that only
> those dockets that are found in the select have their LogPrice
> updated - leaving the rest unchanged?  This is Paradox.
>
> Anyone recommend a good book for this sort of stuff? - with lots
> of examples.  DBD help is very rudimentary.
>
> TIA
>
> Mark
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to