Please Help... [CANCEL]

  • 18 years ago

    Hey All,


    Is it possible to select a random record of a table where the record has no related records in an inner joined table?


    ie...


    [Table 1. - Main Table (members)]



    ID | Firstname | Lastname



    01 | James      | Bond
    02 | Paul         | McMahon
    03 | Sean        | Connor




    [Table 2. - Related Table (Orders for example)]



    ID | Order #   | Product



    02 | ON-1457  | Cheese
    02 | ON-1457  | Bread
    05 | ON-1590  | Milk




    So we know Paul has made an order (for Cheese & Bread), now how can we select (randomly) "James" or "Sean" as they have no orders?


    Does this make any sense?


    TIA.


Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debuggers don't remove bugs. They only show them in slow motion.”