Re: Convertion to text

From: Steve C (stephen.catto@ALL_SPAM_BADcableinet.co.uk)
Date: Wed Dec 22 1999 - 07:14:47 EST


Hi,

santhosh kumar wrote:
>
> Dear all,
>
> I am a new user to sql. Is it possible to store/convert a mSQL database
> contents as a text file? If so how to do it.

From the book >;->

msqldump, produces an ASCII text file containing valid SQL commands
that will recreate the table or database.

msqldump [-h host] [-f conffile] [-c] [-v] database [table]

-h hostname or IP
-f specify a non default cinfiguration file, default is
/usr/local/Hughes/msql.conf
-c include column names in INSERT commands generated by dump
-v run in verbose mode

msqlexport, produces an ASCII export of the data from the specified
table. The output produced can be used as input to other programs.

msqlexport [-h host] [-f conf] [-v] [-s Char] [-q Char] [-e Char]
database table

example> msqlexport -s , -q " -e " company staff

-s sep char def ,
-q quote each value with specified char
-e escape char default is \

msqlimport loads a flat ascii file into a mSQL database table
each line of text file becomes a row

msqlimport [-h host] [-f conf] [-v] [-s Char] [-q Char] [-e Char]
database table

example> msqlimport -s , -q " -e " company staff

<I am not going to type the rest> I hope this gets you going in the
direction you wanted.

Rgds
Steve C
Return e-mail address is mangled for machines but not eyeball mk 1

>
> Thanks for any help in advance
>
> Regards
> santhosh kumar
-------------------------------------------------------------------------
To unsubscribe, go to http://www.Hughes.com.au/extras/email/



This archive was generated by hypermail 2b30 : Mon Mar 04 2002 - 09:04:03 EST