Updating Records from a query

Creating tables and queries

Updating Records from a query

Postby geims » Sun Apr 22, 2018 5:45 pm

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/viewtopic.php?f=61&t=64657&p=367592&hilit=updating+records+from+a+query&sid=f130445e4929f4b55051f7054ecc4273&sid=f130445e4929f4b55051f7054ecc4273#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 7 times
OpenOffice 4.1.2 on Win10
geims
 
Posts: 1
Joined: Sun Apr 22, 2018 5:23 pm

Re: Updating Records from a query

Postby Villeroy » Sun Apr 22, 2018 6:50 pm

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 7 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25258
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Tables & Queries

Who is online

Users browsing this forum: No registered users and 3 guests