Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Databases General > Re: Error Pipin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3082 of 3283
Post > Topic >>

Re: Error Piping Query at Windows Prompt

by "Luuk" <luuk@[EMAIL PROTECTED] > Jan 24, 2008 at 10:09 AM

"Suhasw" <suhas.walanjoo@[EMAIL PROTECTED]
> schreef in bericht 
news:2ce5ee7d-53fb-4920-b4a0-5be9a7d67bce@[EMAIL PROTECTED]
> Hi,
>
> I was trying to redirect output of a query to  file attached to root
> of drive c:\ . I am trying to look up type of data stored in various
> tables and the sort of data is being stored.
>
> When I use this command
>
> echo " select * from companies order by id desc limit 10;" | mysql -u
> root  -p  > customerapp c:/result.txt;
>
> Then it asks me for my root password, that I feed in here.
>
> At this point it is giving the following error.
> "The process tried to write to a nonexistent pipe."
>
> Here customerapp is the name of the database. I have treid to use /u
> switch before database name (not sure about that) and --database
> switch both have not worked.
>
> Please help thanks in advance.

try:
mysql -u root  -p  -e "select * from companies order by id desc limit 10;"

 >c:\result.txt

what do you want to achieve with this part of your command: " >
customerapp 
c:/result.txt;"
the output is redirected to 'customerapp'  (because of the '>
customerapp')
and then it finds 'c:/result.txt', and windows will ....
if its the name of the database you are selecting you should to that
before 
the '>'

mysql -u root  -p -e "select * from companies order by id desc limit 10;" 
customerapp>c:\result.txt
 




 2 Posts in Topic:
Error Piping Query at Windows Prompt
Suhasw <suhas.walanjoo  2008-01-23 13:54:56 
Re: Error Piping Query at Windows Prompt
"Luuk" <luuk  2008-01-24 10:09:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 14:18:26 CST 2008.