Re: [SQL] selective updates

2005-12-15 Thread Gianluca Riccardi
Gianluca Riccardi wrote: [cut] solved, i used a function giving as result the wanted value from table2.column1 in a UPDATE table1 SET column4=(my_personal_func()) WHERE 'cirteria on table1.column2 table2.column2' ; sorry for making you wasting your time Gianluc

[SQL] selective updates

2005-12-15 Thread Gianluca Riccardi
he table1.column4 to store the values from table2.column1 when table1.column2 table2.column2 match a given citeria i think we would need a transaction block andor SQL functions, but i didn't find myself a solution yet. Gianluca Riccardi p.s. i'm using PostgreSQL 7.4.7

Re: [SQL] DB design and foreign keys

2005-12-14 Thread Gianluca Riccardi
thanks a lot, you all pointed me out of misconceptualized position. best ragards all, Gianluca Riccardi p.s. Colonna = column Tipo = type Modificatori = modifiers Vincoli di integrita' referenziale = referential integrity constraints ---(end of broadcast)--

Re: [SQL] DB design and foreign keys

2005-12-14 Thread Gianluca Riccardi
nditions if no locking is used. thank you, regards, Gianluca Riccardi ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] DB design and foreign keys

2005-12-14 Thread Gianluca Riccardi
he order_code it wants to. HTH sure it did, thanks for your response, best regards, Gianluca Riccardi ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] DB design and foreign keys

2005-12-14 Thread Gianluca Riccardi
order_code) then, what would you suggest, to remove the primary key from the 'id' column? or to remove the 'id' column at all? -- Atentamente, Jaime Casanova (DBA: DataBase Aniquilator ;) thank you for your response, regards, Gianluca Riccardi --

Re: [SQL] DB design and foreign keys

2005-12-14 Thread Gianluca Riccardi
as my misunderstanding thanks for your reply, Gianluca Riccardi ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] DB design and foreign keys

2005-12-14 Thread Gianluca Riccardi
tom lane thanks a lot for your kind response, best regards, Gianluca Riccardi ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[SQL] DB design and foreign keys

2005-12-13 Thread Gianluca Riccardi
unique. More doubts come into play when i see that the referenced key customers(customer_code) by the referencing table orders gives no errors. I'm not a native english speaker so probably that gives some more difficulties. Thanks in advance to all will contribute a fo