Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Equivalent of UNIX hear document on Windows NT
dbaplusplus_at_hotmail.com wrote:
> Versions of Oracle and UNIX are not relevant. But I work on HP UNIX
> using Oracle9i.
>
> When writing shell scripts, I use Unix's here document, e.g.,
>
>
> Is there a way to merge cmd.sql with cmd.bat so there is one file on
> Windows 2000
>
There is no documented way to use here documents in the Windows shell.
Myself I just stick to separate files and name things like
script.cmd
script.sql
You can fake it with some comments and a goto statement, but take the example below as more proof of concept than something thats been properly tested :0)
/* 2>nul
@echo off
echo -- Start NT script commands---
echo command1
echo command2
echo command3
echo -- End NT script commands---
sqlplus /nolog @this_script.cmd
goto :eof
*/
conn scott/tiger_at_testDB
select * from global_name;
Exit
-
Simon Sheppard, SS64.com
Received on Thu Mar 09 2006 - 15:35:42 CST
![]() |
![]() |