Updating Records from a query

Creating tables and queries
Post Reply
geims
Posts: 1
Joined: Sun Apr 22, 2018 5:23 pm

Updating Records from a query

Post by geims »

Hi everyone, i'm using Base to help me in my shop for inventory and price checking purposes.
Basically the whole thing is working, but i was trying to find a way to modify a price of an item and i ran into this problem:
i can't modify records from the query i wrote.
I checked on the italian forum and here, where i found this:
http://ooo-forums.apache.org/en/forum/v ... 73#p367592
Since i got something like 2000 items, i was trying to sort by brand the items on the query so it's easier to find the one i'm looking to modify, hence i'm using a filter table.
Anyway, even by selecting in the query PK from both tables, i'm not able to modify any of the entry.
I'll attach an example Db,
Thank you in advance for any help or suggestion.
https://ufile.io/zbeiq (had to upload it here, too big for the forum)
EDIT: found out how to shrink it
Attachments
Gestionale-test.odb
(31.01 KiB) Downloaded 252 times
OpenOffice 4.1.2 on Win10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Updating Records from a query

Post by Villeroy »

Base can edit/delete/insert a record set if:
1) The database type allows it, e.g. the Base document is not connected to a spreadsheet or a directory of text files.
2) The database provides the required privileges to the logged in database user, e.g. when the Base document is connected to a database server.
in other words: if you can open the Base involved table(s) in Base and edit/delete/insert records to each single table.
3) The record set should refer to one table and it needs to include the primary key, e.g. SELECT * FROM "My Table" WHERE arbitrary_conditions = True (and "My Table" is editable).
4) If you need to edit related data from more than one table manually, you need a hierarchy of forms and subforms, each form referring to one table including the primary key.

5) If you want to perform a mass update, e.g. increase prices by 3%, things become a little bit more complicated and the details depend on the actual implementation.
Attachments
Gestionale-test2.odb
(39.49 KiB) Downloaded 262 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply