Syntax
DbJoin( cAlias, cFile, [aFields], [bFor] ) --> lSuccessArguments
cAlias
Alias of the second work area. cFile Destination file.
aFields
Optional fields to copy. bFor Optional condition block.
Return value
.T. when the joined file is created successfully; otherwise .F..
Description
DbJoin() combines records from the current work area and the work area named by cAlias, writing matching combinations to a new database file.
Notes
Both source areas must be open. The current selection remains available afterward.
Example
PROCEDURE Main()
DbUseArea( .T., , "people.dbf", "People" )
DbUseArea( .T., , "cities.dbf", "Cities" )
QOut( "Joined: " + IIF( DbJoin( "Cities", "joined.dbf" ), "YES", "NO" ) )
DbCloseAll()
FErase( "joined.dbf" )
RETURNOutput