On Wed, October 20, 2004 18:05, Vladimir Vukicevic said:

> I'm confused -- it doesn't make them useless in practice, they can be
> used exactly for what they're intended for (precompiled statements).
> What exactly are you trying to do?  And what other database supports
> this?

I misspoke.  They're not *useless*, but useless *within SQL*.

I don't know about specific implemenations, but my copy of "A Guide to the SQL
Standard, fourth edition" gives examples like:

SQLSOURCE = 'DELETE FROM SP WHERE SP.QTY > ? and SP.QTY < ?';
EXEC SQL PREPARE SQLPREPPED FROM :SQLSOURCE ;
LOW = 100;
HIGH = 200;
EXEC SQL EXECUTE SQLPREPPED USING :LOW , :HIGH ;


We don't have any of these -- neither assignable SQL variables, nor an PREPARE
or EXECUTE statement (if we had stored procedures we would need them).

Anyway, in my particular case I have several similar queries which differ only
in a few specifics.  Right now I sprintf() to a temp buffer and execute that
buffer --  but I was hoping that I could use sqlite's dialect of SQL more
directly rather than cobbling together my query piecemeal.

It doesn't matter a whole lot, as the sprintf() or equivalent would have to be
done somewhere.  But it makes my application much more messy looking and
bigger than it would otherwise have to be.

-- 
My GPG public key is at http://ronware.org/
fingerprint: 8130 734C 69A3 6542 0853  CB42 3ECF 9259 AD29 415D



Reply via email to