Having three tables as follows:
Client (Client_Id)
Order (Order_Id, Client_Id)
OrderItem (OrderItem_Id, Order_Id)
how do I go about getting a list of the ClientId
's along with a comma separated list of all OrderItem_Id's (serialized into a string) made made by the client?
Note Clients can't have multiple orders.
Here's an example:
Inputs:
Client: 100
Order: 50, 100
OrderItem: [{1, 50}, {2, 50}, {3, 50}]
Expected result: 100, "1,2,3"
I'm using Oracle 10G (soon to be moved to 11G), no java
, no cursors, no temp tables please.