The caret is used for the escape character when you want the literal character 
instead of a special command shell reserved character (&, |, (, ), <, >, ^).  
Note that the behavior is different if you use single quotes vs. double quotes.

For example:

C:\>echo 'hi | there'
'there'' is not recognized as an internal or external command,
operable program or batch file.

C:\>echo 'hi ^| there'
'hi | there'

C:\>echo "hi | there"
"hi | there"

C:\>echo "hi ^| there"
"hi ^| there"

HTH.


 --Tim



----- Original Message ----
From: Joe DeSouza <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, June 30, 2008 9:11:29 PM
Subject: [ARSLIST] Slightly OT: Creating a .sql file from a batch file

** 
I have got mostly everything working when I attempted this except for one 
obstacle I cant seem to work around..
 
I need to have the statement:-
 
select table_name|| ',' from all_tables where table_name like 'T%' and owner = 
'ARADMIN' order by table_name;
 
appended to a .sql file when I run a MS-DOS batch file..
 
I tried:-
 
echo select table_name|| ',' from all_tables where table_name like 'T%' and 
owner = 'ARADMIN' order by table_name;>>C:\test.sql
 
However DOS thinks that the statement is terminated after the first | 
character, thus it echos "select table_name to the screen and ignores the rest 
of the line..
 
I have tried escaping the | character with a \ but that doesn't do the trick.
 
Anyone has any brainwaves on how I might be able to overcome this??
 
Thank you
 
Joe
__Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" html___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to