locked
Scan EndScan RRS feed

  • Question

  • CLIENT table has a one to many relationship with the CHARGE table.

    Select CHARGE
    SCAN for CHARGE.client_fk = CLIENT.client_pk
       **execute commands
    ENDSCAN

    How to prevent the commands inside scan..endscan from executing if no charges were found for a client?

    Monday, September 19, 2005 8:56 PM

Answers

  • There is nothing to add. You already do a filtered scan.

    ie:
    use employee
    scan for Title = "no title"
      delete
    endscan

    No record would be deleted because there is no match to 'for' expression.
    Monday, September 19, 2005 10:06 PM

All replies

  • There is nothing to add. You already do a filtered scan.

    ie:
    use employee
    scan for Title = "no title"
      delete
    endscan

    No record would be deleted because there is no match to 'for' expression.
    Monday, September 19, 2005 10:06 PM
  • Hi,

    Cetin's given you the answer, but you might be interested in the Found() function:

    Set Relation To TableA.Field Into TableB

    Scan For Found("TableB")

      *-- Do stuff here

    EndScan

     

    Monday, September 19, 2005 10:25 PM