{\rtf1\ansi\ansicpg1250\deff0\deftab360{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\fswiss\fcharset0 Arial;}}

\viewkind4\uc1\pard\lang1033\f0\fs20 Tim!\par

\par

Thank you! That's what I was looking for.. For some reason I thought that the escape character was \\ but that having not worked wasn't sure what to use..\par

\par

The caret works exactly like I would have wanted it to.. I can now write a batch file to automatically generate the .sql that is required.. I just tried\par

\par

echo select table_name^|^| ',' from all_tables where table_name like 'T%' and owner = 'ARADMIN' order by table_name;>>C:\\test.sql\par

\par

and it generated the test.sql file with the statement\par

\par

echo select table_name|| ',' from all_tables where table_name like 'T%' and owner = 'ARADMIN' order by table_name;\par

\par

in it..\par

\par

This would mean that I can write a single batch file to do that job instead of a batch file plus a .sql file, something that I didn't quite like doing..\par

\par

Cheers\par

\par

Joe\par

\par

-----Original Message-----\par

From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] Behalf Of Tim Widowfield\par

Sent: Monday, June 30, 2008 9:37 PM\par

To: [EMAIL PROTECTED]

Subject: Re: Slightly OT: Creating a .sql file from a batch file\par

\par

\par

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.\par

\par

For example:\par

\par

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

'there'' is not recognized as an internal or external command,\par

operable program or batch file.\par

\par

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

'hi | there'\par

\par

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

"hi | there"\par

\par

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

"hi ^| there"\par

\par

HTH.\par

\par

\par

 --Tim\par

\par

----- Original Message ----\par

From: Joe DeSouza <[EMAIL PROTECTED]>\par

To: [EMAIL PROTECTED]

Sent: Monday, June 30, 2008 9:11:29 PM\par

Subject: [ARSLIST] Slightly OT: Creating a .sql file from a batch file\par

\par

** \par

I have got mostly everything working when I attempted this except for one obstacle I cant seem to work around..\par

 \par

I need to have the statement:-\par

 \par

select table_name|| ',' from all_tables where table_name like 'T%' and owner = 'ARADMIN' order by table_name;\par

 \par

appended to a .sql file when I run a MS-DOS batch file..\par

 \par

I tried:-\par

 \par

echo select table_name|| ',' from all_tables where table_name like 'T%' and owner = 'ARADMIN' order by table_name;>>C:\\test.sql\par

 \par

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..\par

 \par

I have tried escaping the | character with a \\ but that doesn't do the trick.\par

 \par

Anyone has any brainwaves on how I might be able to overcome this??\par

 \par

Thank you\par

 \par

Joe\fs18  \f1\fs20\par

}

Reply via email to