check for certain characters

2004-05-11 Thread lga2
hi,
I have a field which is a genome sequence and I need to check if each of 
the entries made for the sequence field contains only a,t,c or g in the string 
and no other characters.
how will i give the query???

thanks,
liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: check for certain characters

2004-05-11 Thread lga2
the output of the query should be: all the records that contain even one 
letter other than a,t,c or g.

Liz


Quoting Paul DuBois [EMAIL PROTECTED]:

 At 21:41 -0400 5/11/04, [EMAIL PROTECTED] wrote:
 hi,
  I have a field which is a genome sequence and I need to check if
 each of
 the entries made for the sequence field contains only a,t,c or g in the
 string
 and no other characters.
 how will i give the query???
 
 It depends.  You can find matching values with
 
 WHERE col_name REGEXP '^[atcg]+$'
 
 but you don't say what you want for output, so beyond that it's
 difficult
 to say what the rest of the query should look like.
 
 -- 
 Paul DuBois, MySQL Documentation Team
 Madison, Wisconsin, USA
 MySQL AB, www.mysql.com
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



into outfile

2004-05-05 Thread lga2
hi,
   when i use the into outfile query in mysql to put the records in a text 
file, and when i open the file that the records are stored in, i dont see each 
record on one line. each record is seperated by the square symbol. Is there a 
way in mysql that i can specify that i need one record per line in the text 
file???

Thanks,
Liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Reports

2004-04-30 Thread lga2
hi,
Is there a way to do report writing from Mysql databases? I want to 
transfer all the records from Mysql to a file. i used the Into OUTFILE but it 
doesnt display properly.I want to diplay it properly like records or reports. 

is there a way??

Thanks,
Liz


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



INTO OUTFILE

2004-04-30 Thread lga2
hi,
   I am trying to put the output of certain queries into a file using

SELECT * INTO OUTFILE FILENAME FROM TABLE NAME WHERE CONDITION;

I am able to see the file and the records are there. But is there a way I can 
see one record per line??? If i do the above i see all the records continously 
when i save it as txt file.dont see it as one record in one line.

Thanks,
liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



transfer to a file

2004-04-29 Thread lga2
hi,
  i have a huge database and i want to transfer the data to a file. can i 
tranfer the result of a query to a file for eg.

if i say select * from tablename;

it selects all the tables.  but the mysql window is small to see all the 
records when the database has many records.can i send these records and save 
it in a file?

liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



mysqldump

2004-04-28 Thread lga2
hi,
   i have a small table with one field that i created to test.i took a backup 
of database using this stmt:

mysqldump --user=   --password=   db db.sql

now i am trying to run this sql file in oracle sqlplus and i am not able to .

it doesnt create the table again and i get syntax errors.

How can i run this in Oracle???

liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



storing

2004-04-27 Thread lga2
hi,
   i have mysql on my local machine.and i have created tables in my database. 
if i need to copy these tables onto a cd and transfer them , which folder to i 
copy? is it the data directory under mysql???

i am not sure abt this.

Thanks,
liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: storing

2004-04-27 Thread lga2
hi,
   thanks for the info. I'm not very sure about mysql. but this is what ive 
got.

ive got three tables with data in it.need to save the tables and run it on 
another machine or rather view the tables and records in another machine.

1. if i use mysqldump query, it will prepare a backup right? and where does is 
prepare it into???

2. will all the records also be transfered or only the table structure??

3. will anything get deleted from my machine where the tables are orignally 
present??

how to go about mysqldump??

Liz








Quoting zzapper [EMAIL PROTECTED]:

 On Tue, 27 Apr 2004 17:06:59 -0400 (EDT),  wrote:
 
 hi,
i have mysql on my local machine.and i have created tables in my
 database. 
 if i need to copy these tables onto a cd and transfer them , which
 folder to i 
 copy? is it the data directory under mysql???
 
 i am not sure abt this.
 
 Thanks,
 liz
 
 Liz, You can do this, but I'd rather store them as a script eg with
 mysqldump
 
 
 zzapper (vim, cygwin, wiki  zsh)
 --
 
 vim -c :%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?
 
 http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



display

2004-04-24 Thread lga2
hi,
I want to know if there is a way to change the display of the mysql 
query results. 

itz confusing to see if you have a lot of fields in the table. and if the 
string is a long string for a particular string there are lot of lines that 
are being printed.

Liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



grant problem!!!

2004-04-21 Thread lga2
hi,
   I am having problems with mysql. 
1. I downloaded mysql on to my system.
2.installed it 
3. ran the server using the command prompt
 C:\mysql\bin\mysqld --console
it gave me the results that i could start using the service.
4. i started mysql on another command prompt.

what i am trying to do is i have to enter a huge genome sequence into a field. 
In order to do tht i have to change the global and session variables in mysql. 
i can change the session variables but i am not able to change the global 
variables.

I gave the command:
set global max_allowed_packet=4;

it said:

Access denied. You need the SUPER privilege for this operation.

Then i created a database genome_db . 

then at the command promp i typed

grant all privileges on genome_db.* to root@localhost identified by ' ';

i got the result as:

Access denied for user: @'localhost' to database 'genome_db'

dont know what to do:( confused

plzzz help

Liz



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



problem

2004-04-21 Thread lga2
hi,
I reinstalled mysql again and did what the website said. 

C:\ C:\mysql\bin\mysql -u root mysql
mysql DELETE FROM user WHERE Host='localhost' AND User='';
mysql FLUSH PRIVILEGES;
mysql QUIT
C:\ C:\mysql\bin\mysqladmin -u root password newpwd
C:\ C:\mysql\bin\mysqladmin -u root -h host_name password newpwd

instead of newpwd i wrote zilnoy
instead of hostname i wrote zilsys

then i said grant all privileges on genome_db.* to [EMAIL PROTECTED] identified 
by 'zilnoy';

i am getting an error like :
Access denied to user: '@localhost' to database 'genome_db'

what should i do???



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



genome sequence

2004-04-20 Thread lga2
hi
   I am trying to enter a genome sequence of length 170 in a table.

I have created the table as

create table sequence(Seq blob);

I am using Python script to enter this sequence into the table.

I am getting an error 

OperationalError: (2006, 'MySQL server has gone away')

I am not able to store this sequence into the table.

what is wrong???

Liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



genome sequence

2004-04-20 Thread lga2
hi, 
 I am trying to enter genome sequences of length 170 and more into 
mysql database.

I have created a table sequence like:

create table sequence(seq blob);

i am using python scripts to put the sequence into this field.
the python GUI gives me this error:

OperationalError: (2006, 'MySQL server has gone away')

I am not able to enter the sequence.

what is wrong???

Liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



long string

2004-04-20 Thread lga2
hi,
   I am trying to enter a genome sequence into mysql database. I have created 
a database in mysql as:

create table sequence(seq blob);

the length of my sequence is approx. 170.

this is the error i get whe i run my python script:

OperationalError: (2006, 'MySQL server has gone away')

i am not sure what is wrong.

Liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Foreign Keys

2004-04-16 Thread lga2
hi,
I am new to mysql. I am trying to create tables with foreign key constraints. 
but the constraintsdoesnt seem to be showing any effect on the table. I am 
able to add any info in the foreign key table witout the same info in the main 
table. 

what is the problem??

Liza

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re:Foreign Key

2004-04-16 Thread lga2
at the mysql prompt i typed 

show variable like have_innodb;

and the value was yes.

I saw this in the mailing list and tried it. I am not familiar with Innodb . 
Do i have to install the Innodb version of Mysql? I have mysql 4.0 version. 

Liz

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Foreign Key

2004-04-16 Thread lga2
I creates 2 tables

create table test1(Ser int(5) primary key,age int(2)) type=InnoDB;

create table test2(Serno int(5) references test1(Ser),name varchar(20)) 
type=InnoDB;

I inserted a value in test2 and it accepted. Isnt that wrong? shouldnt it 
accept only if there is a vlue in the first table? I didnt enter any records 
in the first table.

Liza

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



inserting huge string

2004-02-24 Thread lga2
hi,
I am using mysql 4.0.14. I have a table where one of the fields has a 
datatype longblob. What I am trying to do is to enter a genome sequence which 
has around 175 characters. the file size is about 1.5MB which is well 
within the longblob size. I am using python to enter the sequence from a file 
to the database and the while i am running the python program ,the connection 
to the db is lost. So it takes in only around 103500 characters.

I tried changing the variables in mysql,the max_allowed_packet  using the 
following command:

set max_allowed_packet=4;

I tried changing it to max 4G which is the maximum size for longblob. But it 
changed to a maximum of 1G. 

Even is it is 1G, the size of the file i am trying to enter is well within the 
size of the datatype.

I am not sure how to enter this huge string. What should I do??

thanks,
liz



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]