> >> create temporary table vars (name text, value something);
> >> --
> >> insert into vars set name="x", value=0;
> >> --
> >> ... where something = (select value from vars where name="x")...
> >>
> >
> > I tried doing this, but there doesn't seem to be a way to do the same
> > thing with an UPDATE command ?
>
> No way to do what with UPDATE command? What exactly are you trying to
> do, and failing?
>

i've just realised the last statement ("...where etc etc") is probably
supposed to be part of a select statement.

anyway, this is what i'm trying to do:

eg 1
select @somevar := column1 from table1;
update table2 set column2 = @somevar;

eg2
update table1,table2 set column2=column1;

eg3 (using temp table - how to do this?)
 create temporary table vars (name text, value something);
 insert into vars set name="x", value=0;
 update vars,table2 set column2=value where name = 'x';

something like that.

thanks,
Paul

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

Reply via email to