SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard
    Join Date
    Nov 2000
    Location
    Chico, Ca
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A little SQL help

    It's been a little while since I used SQL and I forgot the command that allows you to run a text file with SQL script in it from a Desktop of pc, while using Oracle's SQL Plus.

    Can anyone recommend any good online SQL resources ?


    Chuck
    "Happiness doesn't find you, you find happiness" -- Unknown
    www.chuckknows.com

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    http://www.w3schools.com
    Click on "Learn SQL" on the top left menu.

    --Vinnie

  3. #3
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Newcastle, England
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To use a script contained in an external file called filename.sql in SQLPlus, I think you just do:

    > filename.sql

    (i.e. greater-than followed by the name of the file).

  4. #4
    SitePoint Zealot JEmLAC's Avatar
    Join Date
    Apr 2002
    Location
    Kansas City
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    (from the Oracle 8i Complete Reference - Loney & Koch, Chapter 6, p 99)

    start Tells SQLPLUS to follow (execute) the instructions you've saved in a file.

    I tried saving a simple SQL select statement into text file and storing it on my hard drive. At the SQLPLUS prompt I typed
    Code:
    start d:\test.sql
    and the statement ran. I assume it will do the same for more complex scripts.
    Morning person by habit, not by nature.

  5. #5
    SitePoint Wizard
    Join Date
    Nov 2000
    Location
    Chico, Ca
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by JEmLAC
    (from the Oracle 8i Complete Reference - Loney & Koch, Chapter 6, p 99)

    start Tells SQLPLUS to follow (execute) the instructions you've saved in a file.

    I tried saving a simple SQL select statement into text file and storing it on my hard drive. At the SQLPLUS prompt I typed
    Code:
    start d:\test.sql
    and the statement ran. I assume it will do the same for more complex scripts.
    Thats exactly what I was looking for ..

    Thanks

    Chuck
    "Happiness doesn't find you, you find happiness" -- Unknown
    www.chuckknows.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •