• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How do you run a PL/SQL script in SQL Plus

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think this is an easy one for anyone who use PL?SQL regularly, but could anyone tell me how to run an actual script. I have my script saved off in a .sql file on my C: drive. I have a SQL*Plus connection, but I seriously don't know how to kick the actual script off. I've tried copying and pasting it into the SQL*Plus session but to no avail.
Any help would be greatly appreciated. Apologies if this is a really silly question, but I have been looking on the web and I can find any info on kicking the script off.
Thanks!
L
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You preced the file name with the "@" symbol.
like

@my_script.sql
Now where you fire off SQLPlus determines which directory you are in. So If on a command line you are in c:\myfolder but your script is in the root of c, c:\ then the above will not work because you need to specify path with the call as in.
@c:\my_script.sql
Mark
 
L Brennan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats great mark. Thanks a mill!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic