Rich Rattanni <[EMAIL PROTECTED]> wrote:
update Parameters set value =
(select value from WorkingParameters wp
where wp.id = Parameters.id);
That worked fine. I am curious why it does work?
Why shouldn't it?
According to the
sqlite syntax guide, it says that...
"When a SELECT appears within an expression but is not the right
operand of an IN operator, then the first row of the result of the
SELECT becomes the value used in the expression. If the SELECT yields
more than one result row, all rows after the first are ignored."
Right. So, what do you feel is the problem with this statement?
I am not arguing with you, but I just wanted to be educated as to why
this way is correct. I am guess it has something to do with the WHERE
clause, since I tried something similar, but did not have the WHERE
clause specified.
What you tried made no sense. You can only use a table name in a
statement if it's the "primary" table of the statement (for UPDATE and
DELETE) or was explicitly introduced into the statement by FROM clause
(for SELECT). You can't just throw in any odd table, because you can't
then specify which row or rows of this table you want to use.
Igor Tandetnik
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------