/In principle, it's never a good idea to edit the tables directly./
yep, good principle and I almost never muck with numbers or dates but
sometimes the front end of SQL won't let you change a field that is in
error.
/You'd better forget about that. If you'd completely understand the data
model of SQL-Ledger, you wouldn't have to ask this question. Then you
would know for example that with the above command, you loose the
connection between the order and its related invoice. ;) /
I know that oe.ordnumber is copied to ar.ordnumber when the invoice is
generated but it's not really a link as far as I can see, it's just a
piece of data to fill a field when the invoice is printed. No other data
is pulled from oe during printing and I've never seen this field used as
a join in any of the SQL commands I've read. I really don't think that
editing oe.ordnumber will break anything.
*I guess I'll ask a new question, phrased directly at the programmers.
Can I run an SQL script onto the tables to create primary keys or OIDs
and still have SQL-Ledger work afterwords or will creating a primary key
on a table break SQL's ability to access it?*
One of the biggest selling points of open source software and SQL-Ledger
is the ability to access my own data. If I wanted a software package
that kept all of my data locked up and refused to allow me to access it
I'd use Simply Accounting.
Jeff Roberts
J.R. Electronics
604-241-1362
On 11/24/2011 11:19 AM, Rolf Stöckli wrote:
Am 24.11.2011 19:30, schrieb Jeff Roberts:
Hi all
I did an upgrade earlier this year, upgraded to PGSQL 8.4 on FreeBSD and
SQL-Ledger 2.8.32.
Now when I look at the database with PGAdmin III it says that public.oe
doesn't have a primary key or OIDs and that I can view it but not
edit it.
In principle, it's never a good idea to edit the tables directly.
I want to change the order number of a closed order so that a listing
comes out in the correct form, (the order number was entered
day/month/year/# instead of year/day/month/#)
Log in to psql, then enter
UPDATE oe SET ordnumber='<newnumber>' where id=<id>;
How is SQL-Ledger entering and editing this table without a primary key
or OIDs?
Like you see above.
What do I need to be able to edit my tables again?
You'd better forget about that. If you'd completely understand the
data model of SQL-Ledger, you wouldn't have to ask this question. Then
you would know for example that with the above command, you loose the
connection between the order and its related invoice. ;)
Regards
Tekki
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger