Jump to content

Run SQL from batch

- - - - -

  • Please log in to reply
2 replies to this topic

#1
stevie754

stevie754

    Programmer

  • Members
  • PipPipPipPip
  • 110 posts
Firstly I am sorry if this is in the wrong place.

I have created a javascript file that I am running through a batch file - install.bat
What I would like to do is that whenever the JScript has been called and runs I would then like the batch file to run a SQL file.

cscript install.js
ECHO Install.js ran successfully
pause

RUN SQL in here -> flods_create_base_install.sql

pause

Thanks in advance for any help.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
What database are you working with? Doing this with Oracle will be very different from SQL Server will be very different from MySQL...
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
stevie754

stevie754

    Programmer

  • Members
  • PipPipPipPip
  • 110 posts
I'm doing it in Oracle but I got it working this morning.

sqlplus /nolog @utils\flods_drop.sql params.sql





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users