Hi Francesco,

Probably the easiest way is to load the records from table 2 into an 
array and then lopp through updatign table 1

HTH
Steve

At 9:37 AM +0200 28/3/01, Francesco D'Inzeo wrote:
>Hi everyone.
>
>The scenario:
>
>Table1                  Table2
>    Field_01, <- Same as -> Field_01,
>    Field_02, <- Same as -> Field_02,
>    Field_03, <- Same as -> Field_03,
>    Field_04, <- Same as -> Field_04,
>    Field_05,               Field_05,
>    Field_06,               Field_06,
>    Field_07,               Field_07,
>    Field_08,               Field_08,
>    Field_09,               Field_09,
>    Field_10,               Field_10,
>    Field_11,
>    Field_12,
>    Field_13,
>    Field_14,
>    Field_15,
>    Field_16,
>    Field_17,
>
>Table1 contains lot of records but Table2 contains just a few.
>The first 4 fields identify records that are common to the 2 tables.
>
>My problem is to write a query that updates for example
>Table1.Field_11 with Table2.Field_06
>Table1.Field_14 with Table2.Field_09
>Table1.Field_15 with constant char 'A'
>Table1.Field_16 with SYSDATE
>
>only for records that are both present on the 2 tables.
>Regards.
>
>-------------------------------------------------------------------
>"On a day not different than the one now dawning, Leonardo drew the
>first strokes of the  Mona Lisa, Shakespeare  wrote the first words
>of  Hamlet, and  Beethoven began working on his Ninth Symphony, and
>Windows98 .... aaarrrggghhh crashed for the n'th time"
>-------------------------------------------------------------------
>  Francesco D'Inzeo
>  WinTech S.r.l.
>  Via Lisbona 7
>  35127 PADOVA (Italy)
>  Tel.   (+39)-(0)49-8703033
>  Fax.   (+39)-(0)49-8703045
>  Mobile (+39)-(0)348-2867140
>  e-mail [EMAIL PROTECTED]
>
>
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
---------------------------------------------------
"Minds are like parachutes, they work best when open"
Support free speech; visit http://www.efa.org.au/

Heads Together Systems Pty Ltd http://www.hts.com.au
Email: [EMAIL PROTECTED]     Tel: 612 9982 6767     Fax: 612 9981 3081 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to