if i already knew the order number, that would be easy, like you said,
but its a blind look, im looking for every row, keyed off of the
orderNo that doesnt have a matching row wiht the same orderNo, and a
status of 0

make sense?

i think thomas'
idea will work...brb

tw

On Fri, 23 Jul 2004 14:34:01 +0100, Stephen Moretti (cfmaster)
<[EMAIL PROTECTED]> wrote:
> Tony,
>
> I think you may over thinking this...  It is as simple as you think you
> should be.... ;)
>
> select *
> from orderlines
> where orderno = 'xyz123'
> and status > 0
>
> I'm assuming here that you don't have an order status with negative numbers.
>
> Regards
>
> Stephen
>
> Tony Weeg wrote:
>
> > sql gurus...got a question.
> >
> > lets say i have a table, and in that table there could be 2 rows for
> > one order coming from crm system.. the first row, has a status of 1,
> > meaning new, and process it now.  the second row, would match on a
> > order number column, but a status of 0...meaning cancelled.  i want to
> > show all rows from the table that dont have a matching 0 status row.
> >
> > is this possible in 1 query?
> >
> > something like this..
> >
> > select *
> > from table
> > where status = 1 and status <> 0
> >
> > :) i know this is way off, but im not sure how to compare, where i
> > have a matching column, but an opposing status of 0 with the same
> > order id.
> >
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to