Re: A CSV or a LIST aggregate function
From: Brian Rice (mail_at_brianrice.com)
Date: 10/05/04
- Next message: internetmogul: "Re: data cleansing and translation tools for relational databases"
- Previous message: Brian Rice: "Re: A CSV or a LIST aggregate function"
- Maybe in reply to: Brian Rice: "Re: A CSV or a LIST aggregate function"
- Messages sorted by: [ date ] [ thread ]
Date: 5 Oct 2004 13:20:47 -0700
Here is another illustration.
SELECT OrderNumber, LIST(SalesmanName) FROM Orders o
INNER JOIN Salesman_Order so
INNER JOIN Salesman s ON so.SalesmanId = s.SalesmanId
WHERE o.CustomerId = 10
where on a *rare* occasion an order might have two salesmen.
This would give me the following results:
A1234b, 'Brian'
A1234c, 'Bob'
A1234d, 'Brian, Bob'
A1234e, 'Bill'
This way I don't have to do any special handling of the result rows...
and I see that A1234d had two salesmen.
- Next message: internetmogul: "Re: data cleansing and translation tools for relational databases"
- Previous message: Brian Rice: "Re: A CSV or a LIST aggregate function"
- Maybe in reply to: Brian Rice: "Re: A CSV or a LIST aggregate function"
- Messages sorted by: [ date ] [ thread ]
Loading