Sub Selects?

From: Michael Koziarski (michael_at_koziarski.com)
Date: 03/23/04


Date: Tue, 23 Mar 2004 21:16:57 +1200

Hey guys,

I'm currently writing my first Delphi application, it's using ADO to connect
to a Jet database.

I have to pull out data from one table, based on items selected in the UI.
Now, what I'd like to do is write something like:

SELECT name, dob, income FROM Customer WHERE CustomerID IN
(1,2,3,4,5,6,9,294)

But I can't figure out how to do this with Parameters or Filters. Is there
some nice Delphi DB technique to do this, or should I just build up the SQL
and escape things manually.

Alternatively, should I just pull back all the records and skip the ones not
relevant (potentially very slow).

Cheers

Koz



Relevant Pages

  • Re: Sub Selects?
    ... filter delete ... ... > I'm currently writing my first Delphi application, ... > I have to pull out data from one table, based on items selected in the UI. ... > SELECT name, dob, income FROM Customer WHERE CustomerID IN ...
    (borland.public.delphi.database.ado)
  • Re: Not connecting to records
    ... equal to the value actually in the control AcctNo. ... OR does "AcctNo" refer to the field of the records that I want to pull? ... is matching the Customer ID, which is giving me the result below. ...
    (microsoft.public.access.forms)
  • Re: Not connecting to records
    ... I have several account numbers from which I want to use the same price ... what it does is pull the special pricing based upon the Cust_Cust_ID ... Acct No Product Price List Acct Number ... In the "customer number" after update event, ...
    (microsoft.public.access.forms)
  • Re: Not connecting to records
    ... I'm confused by the account number references -- no doubt. ... is matching the Customer ID, which is giving me the result below. ... what it does is pull the special pricing based upon the Cust_Cust_ID ... Acct No Product Price List Acct Number ...
    (microsoft.public.access.forms)
  • Re: Not connecting to records
    ... I have several account numbers from which I want to use the same price sheet ... what it does is pull the special pricing based upon the Cust_Cust_ID ... Acct No Product Price List Acct Number ... When I double click a customer number and their coding is "SPC", ...
    (microsoft.public.access.forms)