On 03/08/07, Nikola Miljkovic <[EMAIL PROTECTED]> wrote:
> [In the message "[sqlite] Re: how do i declare and use variables in sqlite?" 
> on Aug 2, 18:22, "Igor Tandetnik" writes:]
> > Chase <[EMAIL PROTECTED]> wrote:
> > > how do i declare and use variables in sqlite?
> >
> > You don't. You declare and use variables in whatever program you write
> > that runs SQLite statements.
> >
> > Igor Tandetnik
>
> This is certainly true, but there might be cases where one wants
> to keep certain results between sql statements and reuse them.
> While this conceptual solution is certainly not the Variable
> it sort of gets the job done.
>
> 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 real life you might want to create better named temporary table
> directly with select and use its values without having to
> search through names.
> If this is slow you can attach in memory database which would then
> be used to store "variables".
>

I tried doing this, but there doesn't seem to be a way to do the same
thing with an UPDATE command ?

Paul

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

Reply via email to