peewee.ProgrammingError: missing FROM-clause entry for table "t1"
See original GitHub issuequery3 = Bookchapter.select(
Bookchapter.id,
Bookchapter.chapter,
)
Books.insert_from(query3, fields=[
Books.id,
Books.chapter
]).on_conflict(
conflict_target=[Books.id],
update={Books.chapter: Bookchapter.chapter}
).execute()
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Subquery with joins on complex queries · Issue #1684 - GitHub
And I'm getting invalid SQL: peewee.ProgrammingError: missing FROM-clause entry for table "t3" LINE 1: ...t1"."magazine_id" = "t2"."id") INNER ...
Read more >sql - Create subquery using peewee, using `.select` on the ...
peewee.ProgrammingError: missing FROM-clause entry for table "solutions_subquery" LINE 1: ...EFT OUTER JOIN "solution" AS "t1" ON ("t1".
Read more >Relationships and Joins — peewee 3.15.4 documentation
Peewee allows you to join on any table-like object, including subqueries or common table expressions (CTEs). To demonstrate joining on a subquery, let's...
Read more >Peewee - Quick Guide - Tutorialspoint
Peewee - Quick Guide, Peewee is a Python Object Relational Mapping (ORM) ... It is possible to retrieve data from SQLite table by...
Read more >API Documentation — peewee 3.15.4 documentation
def on_app_startup(): # When app starts up, create the database tables, ... data_type='INTEGER', null=False, primary_key=True, table='entry'), ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The proper way to write this is to reference the “new” update-value using
EXCLUDED
. Peewee provides a shortcut, which is thepreserve
option.You can also write:
I thought you said it was not working. Please share the sql to a version of the query that works.