MySQL Forums
Forum List  »  Italian

Re: aggiornamento di più righe
Posted by: Giuseppe Zeno
Date: October 23, 2010 08:52AM

Non credo perchè, il "nuovo valore non so a priori qual'è",

dovrei aggiornare ogni riga con possibili valori diversi

Ti sipego:

risultato del join

riga1:
id1(tab1) valore_campo1(tab1)....id1(tab2)..valorecampo(tab2)...

riga2:

id2(tab1) valore_campo2(tab1)....id2(tab2)..valorecampo(tab2)..

rigan:

idn(tab1) valore_campon(tab1)....idn(tab2)..valorecampo(tab2)..


io dovrei aggiornare valore_campo1(tab1), valorecampo(tab2)

con altri valori, presi da una query che uso precedetemente.

quindi sostituire valore_campo1(tab1), valorecampo1(tab2) con valori restituiti query precedente.

sostituire valore_campo_n(tab1), valorecampo_n(tab2) con valori restituiti query precedente.

ogni campo va aggiornato con possibili valori diversi, a seconda dei valori che mi restituisce la prima query,

come è possibile farlo all'interno di una procedura?

Il problema non si porrebbe se non avessi bisogno di una procedura.

Grazie

Options: ReplyQuote


Subject
Views
Written By
Posted
4280
October 21, 2010 04:10AM
1633
October 21, 2010 09:43AM
Re: aggiornamento di più righe
1674
October 23, 2010 08:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.