Subject | subselect in subselect problem? |
---|---|
Author | johnsparrowuk |
Post date | 2004-03-23T10:23:25Z |
Is this a known bug?
for select id,something from wtreestore into :id, :something do
begin
update demo set something = (select something from demo where
id = (select max(id) from demo where id < :id))
where id = :id;
end
Doesn't change anything, whereas:
for select id,something from wtreestore into :id, :something do
begin
select max(id) from demo where id < :id into :workaround;
update demo set something = (select something from demo where
id = :workaround)
where id = :id;
end
Works as expected.
Thanks,
John
for select id,something from wtreestore into :id, :something do
begin
update demo set something = (select something from demo where
id = (select max(id) from demo where id < :id))
where id = :id;
end
Doesn't change anything, whereas:
for select id,something from wtreestore into :id, :something do
begin
select max(id) from demo where id < :id into :workaround;
update demo set something = (select something from demo where
id = :workaround)
where id = :id;
end
Works as expected.
Thanks,
John