Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recursive Join

Status
Not open for further replies.

pmenonsmitka

Programmer
Joined
Jan 25, 2005
Messages
7
Location
US
I'm trying to do a recursive join :

If LABOR.craft = 'Y' then LABOR.NAME (GOOD TO GO!!)
else
if craft = 'N' then we have to go back into the table to get the craft code for the labor and get the labor.name for the given craft code.

What I have so far in the formula called Labor which is going to be the group.

if {LABOR.ISCRAFT} = 'Y' then {LABOR.NAME}
else
if {LABOR.ISCRAFT} = 'N' then stringVar Craft := {LABOR.CRAFT};

if Craft = {LABOR.CRAFT} then {LABOR.NAME}

Will this give me what I need??

Thanks,
P
 
You're probably better served to post technical information as in a mini-spec than text:

Crystal version
Database/connectivity used
Example data
Expected output

To do a recursive join, add the table in a second time (it will prompt for an alias), and join accordingly.

Then your IF statement should be very simple as it's referenced by another table name.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top