Keith Medcalf, on Friday, November 15, 2019 03:50 PM, wrote...
>
>
> How you would use bound parameters depends on what you are using to interface
> with the sqlite3 database.
>
> https://www.sqlite.org/c3ref/bind_blob.html for the C interfaces.
>
> In something like python you would pass the
How you would use bound parameters depends on what you are using to interface
with the sqlite3 database.
https://www.sqlite.org/c3ref/bind_blob.html for the C interfaces.
In something like python you would pass the bindings as a tuple to the execute
method of the cursor:
cr.execute(sql,
Simon Slavin, on Thursday, November 14, 2019 06:48 PM, wrote...
>
> On 14 Nov 2019, at 10:27pm, Jake Thaw, on
>
> > Why not like this?
> >
> > insert into t (a, b, c, d, e, idate)
> > SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p001' ORDER BY
> > idate desc limit 1;
>
> Dammit. I
Keith Medcalf, on Thursday, November 14, 2019 06:44 PM, wrote...
>
>
> On Thursday, 14 November, 2019 15:27, Jake Thaw, on
>
> >Why not like this?
>
> >insert into t (a, b, c, d, e, idate)
> >SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p001' ORDER BY
> >idate desc limit 1;
>
> Or, if
Jake Thaw, on Thursday, November 14, 2019 05:27 PM, wrote...
>
> Why not like this?
>
> insert into t (a, b, c, d, e, idate)
> SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p001' ORDER BY
> idate desc limit 1;
Thanks. Yes, this is great! Darn it, I didn't think of this. Thanks again.
Simon Slavin, on Thursday, November 14, 2019 05:18 PM, wrote...
>
> On 14 Nov 2019, at 10:06pm, Jose Isaias Cabrera, on
>
> > insert into t (a, b, c, d, e, idate) values
> > (
> >(SELECT a FROM t WHERE a = 'p001' ORDER BY idate desc limit 1),
> >(SELECT b FROM t WHERE a = 'p001' ORDER BY
On 14 Nov 2019, at 10:27pm, Jake Thaw wrote:
> Why not like this?
>
> insert into t (a, b, c, d, e, idate)
> SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p001' ORDER BY
> idate desc limit 1;
Dammit. I thought I had tried this, and received a syntax error. Now I see
that it was
On Thursday, 14 November, 2019 15:27, Jake Thaw wrote:
>Why not like this?
>insert into t (a, b, c, d, e, idate)
>SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p001' ORDER BY
>idate desc limit 1;
Or, if using bound paramaters (and you should be):
insert into t (a, b, c, d, e, idate)
Why not like this?
insert into t (a, b, c, d, e, idate)
SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p001' ORDER BY
idate desc limit 1;
On Fri, Nov 15, 2019 at 9:19 AM Simon Slavin wrote:
>
> On 14 Nov 2019, at 10:06pm, Jose Isaias Cabrera wrote:
>
> > insert into t (a, b, c, d, e,
On 14 Nov 2019, at 10:06pm, Jose Isaias Cabrera wrote:
> insert into t (a, b, c, d, e, idate) values
> (
>(SELECT a FROM t WHERE a = 'p001' ORDER BY idate desc limit 1),
>(SELECT b FROM t WHERE a = 'p001' ORDER BY idate desc limit 1),
>(SELECT c FROM t WHERE a = 'p001' ORDER BY
10 matches
Mail list logo