Hi, I do it like that:mclient -i -d voc /path/to/my/query.sql where voc is the name of the database regards;Baraa
Date: Mon, 3 Nov 2014 09:36:21 +0100 From: Stefan.Manegold@cwi.nl To: users-list@monetdb.org Subject: Re: Querying from Linux Terminal
Hi,
while not an example, this snippet of the mclient manpage should be rather clear
" Before mclient starts parsing command line options, it reads a .monetdb file. If the environment variable DOTMONETDBFILE is set, it reads the file pointed to by that variable instead. When unset, mclient searches for a .monetdb file in the current working directory, and if that doesn’t exist, in the current user’s home directory. This file can contain defaults for the flags user, password, language, save_history, format, and width. For example, an entry in a .monetdb file that sets the default language for mclient to mal looks like this: language=mal. To disable reading the .monetdb file, set the variable DOTMONETDBFILE to the empty string in the environment. "
Stefan
----- Original Message -----
Hi,
To not use a password on the command line it is necessary to use an external file. You can find example on this page: http:// wiki . openstreetmap . org / wiki / MonetDB # Connecting _ to _ the _ Database Martin : Man monetd lack of examples
You can then run mclient -d base < script. sql
Pierre
-- 1G6 52 route de bischwiller 67300 Schiltigheim Société de Services et de Formations en Logiciels Libres http://1g6.biz Tél : 06 64 63 70 35
De: "Martin Kersten "
À: users- list @ monetdb . org Envoyé: Lundi 3 Novembre 2014 06:27:17 Objet: Re: Querying from Linux Terminal On 03/11/14 06:24, Vijay Krishna wrote :
Hi,
Can I execute a large number of queries through shell script directly from terminal?
read the manual https :// www . monetdb . org /Documentation/ mclient -man-page
In MySql I use, mysql -u root -ppassword -e " select * from table" in my shell script, which returns the result without logging into mysql client. Similarly , I want to execute queries in the terminal without logging into mclient .
Is there any equivalent way of achieving the same ? I have to do a lot of updates and instead of doing those one by one , I prefer writing a shell script to run hundreds of queries one by one automatically .
read data loading : https :// www . monetdb . org /Documentation/ Cookbooks / SQLrecipes / LoadingBulkData
Any help much appreciated .
With Regards,
Vijayakrishna .P. Mobile : (+91) 9500402305.
_______________________________________________ users- list mailing list users- list @ monetdb . org https :// www . monetdb . org / mailman / listinfo /users- list
_______________________________________________ users- list mailing list users- list @ monetdb . org https :// www . monetdb . org / mailman / listinfo /users- list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list