Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old April 15th, 2004, 06:56 PM
poppy_123 poppy_123 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 90 poppy_123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 2 sec
Reputation Power: 5
pl sql fle help

Hello guys, i am getting trouble in running pl/sql file,
1- i make file with this source code "abc.sql"

Code:
declare
v_abc number(10);
begin
select id
into v_abc
from table;
end;


2- then i run this file from sql plus prompt.
@abc.sql

the problem is here it is not working, it shows this next line (8), as in code, there are 7 lines.

so how i can run this file , and print the value of v_abc,
thanks

Reply With Quote
  #2  
Old April 16th, 2004, 07:43 PM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
please use the slash (/) at the end of your code and save it again, to print the value of any variable on the SQL prompt, use DBMS_OUTPUT.PUT_LINE package, as folllows:

declare
v_abc number(10);
begin
select id
into v_abc
from table;
dbms_output.put_line(v_abc);
end;
/

before run this code please make sure that your server output is on, to turn it on use this command.

SQL>SET SERVEROUTPUT ON SIZE 1000000

now run your code

SQL>@abc.sql


Regards,

Reply With Quote
  #3  
Old April 16th, 2004, 10:15 PM
poppy_123 poppy_123 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 90 poppy_123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 2 sec
Reputation Power: 5
thanks shafique bhai, i check it

Reply With Quote
  #4  
Old April 16th, 2004, 10:21 PM
poppy_123 poppy_123 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 90 poppy_123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 2 sec
Reputation Power: 5
what is the use of triggers how i can use it with text fields in oracle developer

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > pl sql fle help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway