Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Statement Help?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00566073
Message ID:
00566081
Views:
13
SELECT * ;
  FROM Meetings ;
  WHERE NOT isblock ;
UNION ;
SELECT  lastname,firstname, .F. As isblock, blockslot,schdate;
  FROM blocks ;
  INTO CURSOR mycursor
I have no idea what is relation between Meetings and blocks tables that's why this select doesn't take it in account.

>Meetings.dbf
>
>
>Meetings.dbf
>
>lastname,firstname,isblock,blockslot,schdate
>
>blocks.dbf
>
>lastname,firstname,blockslot,schdate
>
>
>
>In the first table individual patients are scheduled or a block is defined. If it is a block than isblock=.t..
>
>I need a query that returns a cursor of dist cases for a given date from both tables.
>
>Example:
>
>Meetings.dbf with 2 records
>LASTNAME   FIRSTNAME   ISBLOCK   BLOCKSLOT   SCHDATE
>=======================================================
>KELLY      KIRK         .F.        1234      10/07/2001
>BLOCK      BLOCK        .T.        1235      10/07/2001
>
>Blocks.dbf with 1 record
>
>LASTNAME   FIRSTNAME   ISBLOCK   BLOCKSLOT   SCHDATE
>=======================================================
>KELLY      ROGER        .F.        1235      10/07/2001
>
>
>Desired Results:
>
>LASTNAME   FIRSTNAME   ISBLOCK   BLOCKSLOT   SCHDATE
>=======================================================
>KELLY      KIRK         .F.        1234      10/07/2001
>KELLY      ROGER        .F.        1235      10/07/2001
>
>
>
>Any help greatly appreciated
>
>Kirk
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform