Why would you need the "IN" subquery?
>Coming in late ... but what about this?
>
>
>
>select
> o.customerId,
> o.orderId,
> . . .
>FROM
> orders o
>WHERE
> o.orderid IN (
> SELECT TOP 1
> o1.orderid
> FROM
> orders o1
> WHERE
> o1.customerId = o.customerID
> ORDER BY
> o1.orderdate)
>
>
>
>-Mike
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell