|
-
the scope of v_new_locn is visible INSIDE SUB-BLOCK, it won't be seen in MAIN BLOCK .
u must declare in in main block
/* MAIN BLOCK */
DECLARE
1 v_new_locn VARCHAR2(50) := 'Europe'; /* <<< MOVE FROM LINE 9 <<< */
2 v_weight NUMBER(3) := 600;
3 v_message VARCHAR2(255) := 'Product 11002';
4 BEGIN
5 ---/* SUB-BLOCK */
6 ---DECLARE
7 -----v_weight NUMBER(3) := 1;
8 -----v_message VARCHAR2(255) := 'Product 11001';
9 ----- /* v_new_locn VARCHAR2(50) := 'Europe'; >>> MOVE TO LINE 1 <<< */
10 -----BEGIN
11 --------v_weight := v_weight + 1;
12 --------v_new_locn := 'Western ' || v_new_locn;
13 -----END; /* SUB-BLOCK */
14 ---v_weight := v_weight + 1;
15 ---v_message := v_message || ' is in stock';
16 ---v_new_locn := 'Western ' || v_new_locn;
17* END; /* MAIN BLOCK */
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|