home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,123 of 2,288   
   R. P. to All   
   SELECTing multiple rows to a single outp   
   13 Aug 05 21:08:16   
   
   XPost: comp.database.oracle, comp.databases.oracle.misc   
   From: r_pol12gar@hotmail.com   
      
   Anybody knows a way to produce output from a SELECT statement on a   
   single line, instead of each hit on a separate line?   
      
   Here is what I mean: let's say I have a table listing families, one per   
   row that includes the name of father, mother and the number of children.   
   Then there would be another table with one row for each child and the   
   rows would be linked to the first table with a foreign key scheme.   
      
   Now I would like to list each family with joining the two tables, with   
   the name of children listed on the same line as the parents, with --   
   say -- a comma separating each child's name.   
      
   I can't figure out any way to produce SELECT output serially, on a   
   single line. Some suggested stored procedures but my past experience   
   with stored procedures was that they often were "unstored" when the DBA   
   did some maintenance and it was just not as reliable as using dynamic   
   SQL statements, in this case with Java.   
      
   Thanks for any tips you might have,   
   Rudy   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca