# SQL query on duplicated table

**URL:** <https://forum.seatable.com/t/sql-query-on-duplicated-table/5052>\
**Category:** API\
**Tags:** sql-query\
**Created:** [August 29, 2024, 3:26pm UTC](https://forum.seatable.com/t/sql-query-on-duplicated-table/5052 "2024-08-29T15:26:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bha](https://forum.seatable.com/user_avatar/forum.seatable.com/bha/32/4702_2.png) [@bha](https://forum.seatable.com/u/bha)\
**Post date:** [August 29, 2024, 3:26pm UTC](https://forum.seatable.com/t/sql-query-on-duplicated-table/5052/1 "2024-08-29T15:26:53Z")

</div>

Hi everyone,  
I discovered a strange behaviour I can’t explain and don’t know how to get around…

**SeaTable Setup:**

- Self-Hosted
- Enterprise Edition v. 5.0.8

When I duplicate a table using the [Duplicate Table API call](https://api.seatable.io/reference/duplicatetabledeprecated) with records duplication, a basic SQL query on this new table systematically returns “There are no records”.  
The problem is **the same if I use the GUI operation** to duplicate the base (see below), and **seem to be also present in the cloud version**.

![duplicate](https://forum.seatable.io/uploads/default/original/2X/c/c86e92c5c33a110f503f4770ccbc9c5476a95855.gif)

The Duplicate Table function is only present in the _Base Operations (before 4.4)_ section of the api documentation: is it deprecated ? I don’t think so as it is still working…

Any idea about that ?

Bests,  
Benjamin

---

<div class="post-metadata">

**Author:** ![cdb](https://forum.seatable.com/user_avatar/forum.seatable.com/cdb/32/7_2.png) [@cdb](https://forum.seatable.com/u/cdb)\
**Post date:** [August 29, 2024, 7:38pm UTC](https://forum.seatable.com/t/sql-query-on-duplicated-table/5052/2 "2024-08-29T19:38:18Z")

</div>

Hey Ben,  
thanks for sharing your findings. I can confirm this behaviour that you describe for version 5.0.x. If you copy a base and duplicate the entries, these copied entries are part of the json file (=the base) but are not returned by:

- the SQL-query app
- the API
- universal app

The good news: this issue is already known and will be fixed with version 5.1. I just tested the situation in our testing system and there the problem is already gone.

Best regards  
Christoph

---

<div class="post-metadata">

**Author:** ![bha](https://forum.seatable.com/user_avatar/forum.seatable.com/bha/32/4702_2.png) [@bha](https://forum.seatable.com/u/bha)\
**Post date:** [August 30, 2024, 7:40am UTC](https://forum.seatable.com/t/sql-query-on-duplicated-table/5052/3 "2024-08-30T07:40:13Z")

</div>

Hi Christoph,  
Thanks for your answer. Do you already have an idea of the release date for version 5.1 ?  
Because I encountered this problem while migrating a process (from version 4.x to v5.0) that was already in production and that should be used again in the first half of september 😕

Bests,  
Benjamin

---

<div class="post-metadata">

**Author:** ![system](https://forum.seatable.com/uploads/default/original/1X/04603423fe81a46c321283663086c475429e8ccb.png) [@system](https://forum.seatable.com/u/system)\
**Post date:** [September 1, 2024, 7:40am UTC](https://forum.seatable.com/t/sql-query-on-duplicated-table/5052/4 "2024-09-01T07:40:24Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
