update multi for another field update

Posts   
 
    
jspanocsi
User
Posts: 145
Joined: 04-Mar-2005
# Posted on: 02-Aug-2005 21:37:08   

Is it possible to use updatemulti and set a field in a table to another?

IE I have a table with 4 fields: pk, f1,f2,f3.

I want to do something like Update table set f1 = f2, f3 = "ABC" Where...

Is this possible with update multi or will I have to loop through a collection and do it manually?

Thanks!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39914
Joined: 17-Aug-2003
# Posted on: 03-Aug-2005 10:29:30   

You can do that. Please see for an example: Using the generated code / Field expressions and aggregates -> Expressions in entity updates in the documentation. It has an example of updating a field directly with an expression. Your situation is simpler, but should use the same approach: use an expression to set the value of the field.

Frans Bouma | Lead developer LLBLGen Pro
jspanocsi
User
Posts: 145
Joined: 04-Mar-2005
# Posted on: 03-Aug-2005 14:10:05   

Thanks! Worked great.

Posts: 8
Joined: 15-Mar-2007
# Posted on: 07-Apr-2007 15:34:34   

H