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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: This is driving me nuts. What am I doing wrong here?

RE: This is driving me nuts. What am I doing wrong here?

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Wed, 24 Oct 2001 10:41:39 -0700
Message-ID: <F001.003B36FD.20011024105057@fatcity.com>

Remove the colons from the assignment statements.

SQL> declare

  2  w_a number := 0;
  3  w_b number:= 0;
  4  w_c char(10)  := null;
  5  w_d number := 0;

  6 cursor v_c_t is
  7 select a,c,b from civ_test;
  8 begin
  9 for v_c_t_row in v_c_t loop
 10  w_d := w_d + 1;
 11  w_a := 0;
 12  w_c := null:
 13  w_b := 0;
 14  w_a := select c from civ_test where v_c_t_row.a = wd;
             Not sure about the above, but you could:
              select c into w_a from civ_test where v_c_t_row.a = wd;
 15 w_c := 'v-'||v_c_t_row.c;
 16 w_b := v_c_t_row.b;
 17 insert into v_civ_test values (w_c, w_b, w_a, w_d);  18 end loop
 19 end;
 20 /

hope this helps

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Wednesday, October 24, 2001 2:31 PM To: Multiple recipients of list ORACLE-L

SQL> declare

  2  w_a number := 0;
  3  w_b number:= 0;
  4  w_c char(10)  := null;
  5  w_d number := 0;

  6 cursor v_c_t is
  7 select a,c,b from civ_test;
  8 begin
  9 for v_c_t_row in v_c_t loop
 10  :w_d := w_d + 1;
 11  :w_a := 0;                    <== change to w_a := 0;
 12  :w_c := null:
 13  :w_b := 0;
 14  :w_a := select c from civ_test where v_c_t_row.a = wd;
             Not sure about the above, but you could:
              select c into w_a from civ_test where v_c_t_row.a = wd;
 15 :w_c := 'v-'||v_c_t_row.c;
 16 :w_b := v_c_t_row.b;
 17 insert into v_civ_test values (w_c, w_b, w_a, w_d);  18 end loop
 19 end;
 20 /
Bind variable "W_B" not declared.
SQL>
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: tday6_at_csc.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Oct 24 2001 - 12:41:39 CDT

Original text of this message

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