Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with SQL :

Re: Problem with SQL :

From: Orca777 <member28638_at_dbforums.com>
Date: Thu, 24 Apr 2003 15:27:10 +0000
Message-ID: <2802214.1051198030@dbforums.com>

Hi,
Sorry, this is not an SQL-Problem, it's a raleational problem of the data-model; you cannot get only on row because the relation is 1:N;

The only way (i think) to get a result is thru PL/SQL (Pseudo-code)

DECLARE
  lc_str1 varchar2(200);
  lc_str2 varchar2(200);
BEGIN
FOR lr_row in ( SQL-Stmt ) LOOP
  lc_str1 := lr_row.fiedl1;
  lc_str2 := lc_str2 || ';' || lr_row.field2; END LOOP;
dbms_output.put_line( lc_str1 || lc_str2 );

you could even write a function which returns the string.

Orca

--
Posted via http://dbforums.com
Received on Thu Apr 24 2003 - 10:27:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US