home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / oracle / 1285 < prev    next >
Encoding:
Text File  |  1992-08-13  |  1.6 KB  |  58 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!indetech!gopi
  3. From: gopi@indetech.com (Prakash Gopinath)
  4. Subject: Re PL/SQL problem
  5. Message-ID: <1992Aug13.183932.3162@indetech.com>
  6. Sender: gopi@indetech.com (Prakash Gopinath)
  7. Organization: Independence Technologies, Inc. Fremont, CA
  8. Distribution: usa
  9. Date: Thu, 13 Aug 1992 18:39:32 GMT
  10. Lines: 46
  11.  
  12. Newsgroups: comp.databases.oracle,connect.audit
  13. Subject: Re: PL/SQL problem
  14. Summary: 
  15. Expires: 
  16. References: <BsvF6u.GoE@ibmpcug.co.uk>
  17. Sender: 
  18. Followup-To: 
  19. Distribution: 
  20. Organization: Independence Technologies, Inc. Fremont, CA
  21. Keywords: 
  22.  
  23. In article <BsvF6u.GoE@ibmpcug.co.uk> boxfield@ibmpcug.co.uk (Paul J Snelling) writes:
  24. >This is probably a stupid question but Ive been trying all kinds of ways
  25. >to get information OUT of a PL/SQL block without writing it to a table.
  26. >I'm hoping that someone out there has tried the same thing and can tell me
  27. >(A) how to do it, or (B) it cant be done....
  28.   Oracle PL/SQL does not allow you to display variables in a PL/SQL block.
  29.  
  30. >My latest attempt under sqlplus goes something like...
  31. >SQL> define MYVAR=500
  32. >SQL> declare
  33. >2    i  number ;
  34. >3    begin
  35. >4    for i in 1..10 loop
  36. >5      MYVAR := &MYVAR + i ;
  37. >6    end loop ;
  38. >7    end ;
  39. >A pathetic attempt, but you can see what Im trying to acheive (I hope).
  40. >Any ideas?
  41.  You can use PRO *C and include this block and display the values of variables.
  42.  
  43. >-- 
  44. >Paul Snelling,    BoxField Systems Ltd
  45.  
  46.  
  47. -- 
  48. ____*_  Gopinath Prakash            gopi@indetech.com
  49. \  / /  Independence Technologies   
  50.  \/ /   42705 Lawrence Place        FAX: 510 438-2034
  51.   \/    Fremont, CA 94538           Voice: 510 438-8777
  52.