Nested Loops Arc 9.3

Discussion created by dgilby on Feb 15, 2013
Latest reply on Feb 19, 2013 by dgilby
Hey Guys  How are things?

I have a problem but I can't get it functional.

I have a feature class and i have a dbase table.

I have a record in the feature class that needs to match up with records in the dbase file. Example below

featureclass             dbase
400010                  400010(0)

and what I need is an output file

ID            Alias1            Alias2               Alias3
400010     400010(0)      400010(1)         400010(2)

I am using a nested python loop.

I am new to python, and I am more looking for an example that would accomplish this
I am thinking something along the lines of

[INDENT]while feature class:
    get ID
        for dbase:
            get dbase.ID
            if featureclass.ID == dbase.ID
                # write fields to variables
                # update output featureclass      

Does this make sense? I am specifically having a problem getting the nested loop to function. I can read all my feature classes and dbase fields using ListFields so I know I am partially there... accessing the write data.

Help/comments is appreciated