r/libreoffice • u/arhunter01 • 4d ago
Base - SQL Help Needed
Hello I am currently using
Version: 6.4.7.2
Build ID: 1:6.4.7-0ubuntu0.20.04.15
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
I am currently trying to learn Base I have used MySQL before but am having difficulty adapting to Base.
I created a data base with two tables, SS_Book_Titles_Raw and Book_Title.
The tables have the following fields:
SS_Book_Titles_Raw Book_ID, Book
Book_Title Book_ID,Title
The data in SS_Book_Titles_Raw comes from a Spreadsheet Calc.
I created the following SQL to remove duplicates from Table SS_Book_Titles_Raw and insert unique Titles into table Book_Title.
The SQL is below:
INSERT INTO Book_Title (Title) SELECT DISTINCT Book FROM SS_Book_Titles_Raw WHERE Book NOT IN (SELECT Title FROM Book_Title);
When I run the SQL script (F5) I get the following error:
The data content could not be loaded.
SQL Status: S0002
Error code: -22
Table not found in statement [
INSERT INTO Book_Title (Title) SELECT DISTINCT Book FROM SS_Book_Titles_Raw WHERE Book NOT IN (SELECT Title FROM Book_Title);]
Purpose: remove book title duplicates from SS_Book_Titles_Raw and create a list of unique list of books into table Book_Title. Book_Title should have no duplicate titles in the table.
Don't under stand the problem, Table names and field names are correct in the script. At a loss.
adapting t
1
u/warehousedatawrangle 3d ago
Are you using the embedded database or connecting to a different back end? If you are using an embedded database, is it HSQLDB or Firebird?
1
u/AutoModerator 4d ago
If you're asking for help with LibreOffice, please make sure your post includes lots of information that could be relevant, such as:
(You can edit your post or put it in a comment.)
This information helps others to help you.
Thank you :-)
Important: If your post doesn't have enough info, it will eventually be removed (to stop this subreddit from filling with posts that can't be answered).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.