[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|             TARGET              |
+---------------------------------+
TARGET(<expN1>[, <expN2> | <expC>])

-----------------------------------
Returns alias of a database that's the target of a relation (database
specified in INTO clause of SET RELATION).
Return value - Character
-----------------------------------

<expN1>
        Number specifying which relation to return. For example, if <expN1> is
1, the alias of the target database for the first relation created is
returned.  If <expN1> is 2, the alias for the second relation created is
returned and so on.  If <expN1> is greater than number of relationships,
null string is returned.

<expN2> | <expC>
        Work area number for database or the database alias.  If you don't
specify <expN2> or <expC>, alias of target database from the selected
work area is returned.  To return the alias of the target database in
another work area include work area number <expN2>, or database alias
<expC>.

+---------------------------------+
|            Examples             |
+---------------------------------+
CLOSE ALL
SELECT 0
USE payments ORDER cust_id
SELECT 0
USE invoice ORDER cust_id
SELECT 0
USE customer
SET RELATION TO cust_id INTO invoice
SET RELATION TO cust_id INTO payments ADDITIVE

? TARGET(1)  &&  1st relation created, current work area

? TARGET(1,3)  &&  1st relation created, 3rd work area

? TARGET(2)  &&  2nd relation created, current work area

? TARGET(2,'customer')  &&  2nd relation created, customer database

? TARGET(3)  &&  Only 2 relations, null string returned

A relation is set (on the field CUST_ID) from the CUSTOMER database into
the INVOICE database and another is set on the same field into the
PAYMENTS database.   ADDITIVE is used with the second relation to add
the relation to the preexisting relation without replacing it.  TARGET()
is then used to return the alias of target database.

-----------------------------------

See Also:  RELATION(), SET RELATION, SET RELATION OFF

-----------------------------------

See Also: RELATION() SET RELATION SET RELATION OFF
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson