Re:SQL syntax questions
Quote
Brian Shigley wrote in message <8h9icb$b...@bornews.borland.com>...
>I would like to write a query
>selecting each unique record for a particular customer using where
>conditional statements. Would the syntax be SELECT UNIQUE CUSTNO
FROM
>ORDERINFO WHERE ... ? If not, could someone help with the syntax?
SELECT DISTINCT CUSTNO FROM
ORDERINFO WHERE ...
Quote
>Can I use the query results just as a table using a first and next
>statement?
>As an example can I use something similar to
>While not Query1.EOF do begin
>...
>Query1.next;
Yes. This works fine. Depending on what you need to do inside that
loop though, it's possible you might be able to do it through SQL
instead of using the loop - if so the SQL will do it faster (at least
if you are using an SQL server, it won't be so much difference if
you're using Paradox (e.g.) tables .
--
Wayne Niddery - WinWright Consulting
RADBooks - http://members.home.net/wniddery/
You have a Right to Free Speech, but not the right to make me listen,
nor to use my property as a soapbox.