plsql code [message #19418] |
Fri, 15 March 2002 03:35 |
Joan
Messages: 36 Registered: February 2002
|
Member |
|
|
What wrong with this code.. I only need it to pick the next tablespace if the count is greater than 5. but it work the firt time and when I run the second time it pick the next tablespace even though the previous tablespace count is only 2
If vCount > 6 then
vOldTablespaceName := vTblTablespaceName;
---pick the next tablespace
select lpad(substr(vTblTablespaceName,length(vTblTablespaceName)-1,2)+1,2,'0')
INTO vPart
from dual;
end if;
dbms_output.put_line(vPart);
IF vPart = '11' then
--wrap around
vPart := '01';
--end if;
vTblTablespaceName := 'DW_TBL_EMP_Q05_U05_P'||vPart;
END IF;
dbms_output.put_line(vTblTablespaceName);
|
|
|
Re: plsql code [message #19420 is a reply to message #19418] |
Fri, 15 March 2002 06:03 |
Jon
Messages: 483 Registered: May 2001
|
Senior Member |
|
|
Where does vCount get set? reset? and you said if count > 5 but the code says > 6. I don't think you've given people enough information to help you.
|
|
|