[sqlite] about upsert feature.

2018-11-07 Thread 畑宏和
Hi, I have a question.

We can use upsert after v3.24.0.

Document  says that
`INSERT INTO table-name (column-name) select-stmt upsert-clause`
But when I try this syntax, it returns syntax error.
I think we can't use upsert-clause with select-stmt.
Is this thought right?

Thanks for reading my post.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] about upsert feature.

2018-11-07 Thread Shawn Wagner
Show an actual insert statement that causes an error?

On Wed, Nov 7, 2018, 2:22 AM 畑宏和  Hi, I have a question.
>
> We can use upsert after v3.24.0.
>
> Document  says that
> `INSERT INTO table-name (column-name) select-stmt upsert-clause`
> But when I try this syntax, it returns syntax error.
> I think we can't use upsert-clause with select-stmt.
> Is this thought right?
>
> Thanks for reading my post.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] about upsert feature.

2018-11-07 Thread Richard Hipp
On 11/6/18, 畑宏和  wrote:
> Hi, I have a question.
>
> We can use upsert after v3.24.0.
>
> Document  says that
> `INSERT INTO table-name (column-name) select-stmt upsert-clause`
> But when I try this syntax, it returns syntax error.
> I think we can't use upsert-clause with select-stmt.
> Is this thought right?

Does your select-stmt include a WHERE clause?  It should, even if it
is a no-op like "WHERE true".  Try adding the WHERE clause and let us
know if that fixes your problem.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] about upsert feature.

2018-11-08 Thread 畑宏和
Thanks for your reply!
My script's select-stmt do not include where.
When I add 'where true', syntax error does not occur.

Thanks!

2018年11月7日(水) 19:44、Richard Hipp さん(d...@sqlite.org)のメッセージ:

> On 11/6/18, 畑宏和  wrote:
> > Hi, I have a question.
> >
> > We can use upsert after v3.24.0.
> >
> > Document  says that
> > `INSERT INTO table-name (column-name) select-stmt upsert-clause`
> > But when I try this syntax, it returns syntax error.
> > I think we can't use upsert-clause with select-stmt.
> > Is this thought right?
>
> Does your select-stmt include a WHERE clause?  It should, even if it
> is a no-op like "WHERE true".  Try adding the WHERE clause and let us
> know if that fixes your problem.
> --
> D. Richard Hipp
> d...@sqlite.org
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] about upsert feature.

2018-11-08 Thread Chris Brody
I wonder if this should be considered a bug, or if should be better
documented?

On Thu, Nov 8, 2018 at 9:57 AM 畑宏和  wrote:

> Thanks for your reply!
> My script's select-stmt do not include where.
> When I add 'where true', syntax error does not occur.
>
> Thanks!
>
> 2018年11月7日(水) 19:44、Richard Hipp さん(d...@sqlite.org)のメッセージ:
>
> > On 11/6/18, 畑宏和  wrote:
> > > Hi, I have a question.
> > >
> > > We can use upsert after v3.24.0.
> > >
> > > Document  says that
> > > `INSERT INTO table-name (column-name) select-stmt upsert-clause`
> > > But when I try this syntax, it returns syntax error.
> > > I think we can't use upsert-clause with select-stmt.
> > > Is this thought right?
> >
> > Does your select-stmt include a WHERE clause?  It should, even if it
> > is a no-op like "WHERE true".  Try adding the WHERE clause and let us
> > know if that fixes your problem.
> > --
> > D. Richard Hipp
> > d...@sqlite.org
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users