function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
minnuchcloud@gmail.comminnuchcloud@gmail.com 

field update using batch apex

i had 2000000 records

contains field name city

and state ,state is same for all records

city=1

city=2

city=3

city=4

city=5

city=6

city=7

city=8

and

state =AP

 

 

so i want field update for state 'field'

for contain city names

city=1

city=2

city=3

city=4

 

state =TN

how to write batch class for this and execution method

pl send me

 

nagalakshminagalakshmi

Hi,

 

Use this link for batch apex class.

 

http://corycowgill.blogspot.in/2010/12/leveraging-scheduled-apex-to-link-batch.html

 

Thanks,

Lakshmi

Mohith Kumar ShrivastavaMohith Kumar Shrivastava

Lakshmi please note now the second batch can be called in finish method of first batch .Thanks

minnuchcloud@gmail.comminnuchcloud@gmail.com

 

  my question is

 

i had 200000 records

all records had   in state__c field  'AP'

and  in city__c field had  12 district  like


HYD

NAL

NIZ

VAR

KAM

GUN

VIJ

VIZ

PRA

NEL

CHI

KAD

 

NOW

I WANT FIELD UPDATE FOR ONLY 5 CITIES  state__C 'TEL'

LIKE

 

HYD

var

kam

nal

niz

 

i want chaing the state name for only 5 cities may be 60000 records like tha

so pl send me batch apes class

and developerconsole query also

 

 

minnuchcloud@gmail.comminnuchcloud@gmail.com

i want chainge the state__c  field contain name is 'AP''

it updates in to 'TN'