Thanks to all those who assisted me with this issue. After manipulating
the 'new parameters' table in another environment I was able to ensure
that I had the columns required to allow select statements the did NOT
include the table to be updated... I also took some hints from:

http://www.mail-archive.com/sqlite-users@sqlite.org/msg21569.html

With my resulting UPDATE statement reading:

Update Parameter set ParameterValue = (select NewParams.NewParamVal from
NewParams where Parameter.ModelID = NewParams.ModelID and
Parameter.Parameter = NewParams.Parameter) WHERE (ModelID in (select
Parameter.ModelID from Parameter, NewParams where NewParams.ModelID =
Parameter.ModelID and NewParams.Parameter = Parameter.Parameter)) AND
(Parameter in (select Parameter.Parameter from Parameter, NewParams
where NewParams.ModelID = Parameter.ModelID and NewParams.Parameter =
Parameter.Parameter))

Not perfect, but it'll do.

Thanks again

Rob

-----Original Message-----
From: Igor Tandetnik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 12 June 2007 12:19 PM
To: SQLite
Subject: [sqlite] Re: Re: Syntax help with UPDATE in SQLite Database
Browser

Ellis Robin (Bundaberg)
<[EMAIL PROTECTED]> wrote:
> Thanks Igor, the records in the Parameter table are required to ensure

> that the values returned from NewParams are matched to the appropriate

> records.

They are matched to the record you are updating. SQLite walks all
records in Parameter table, and for each record runs the subselect (the
reference to Parameter table in the subselect represents the current
row), then updates the field in the current row with the value thus
calculated.

Read about coordinated subqueries in your favorite SQL textbook.

> By removing the referenecs to Parameter in the FROm statement I 
> achieve 0 updates.

Since you don't have a WHERE clause, every single record in the
Parameter table is necessarily being updated. It is possible that the
value calculated by the subselect for each record is equal to the
current value in this record, so it appears that no update takes place. 
If this is unexpected, check the logic of your subselect.

Igor Tandetnik 


------------------------------------------------------------------------
-----
To unsubscribe, send email to [EMAIL PROTECTED]
------------------------------------------------------------------------
-----


************************************************************************
The information in this email together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this email message is prohibited, unless
as a necessary part of Departmental business.
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.
************************************************************************


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to