import xml data to multiple tables in mysql

2011-10-25 Thread Peng Yu
Hi, I have some xml data following the following DTD. It seems that it is better to import the xml file into multiple table, for example, author table, journal table. I read the mysql manual section on "load xml", but I don't see how to load xml in multiple table and how to design the schema autom

Synchronize two mysql servers (single user, only one server (but not both) can be changed at any given time)

2011-10-17 Thread Peng Yu
Hi, There are some webpages on synchronizing two mysql server, some of them are old and some of them are for situations that are not exactly same as mine. So I ask how to syncrhonize two mysql servers again and hope to get the best solution to my particular requirement. Suppose I have two servers

Unique on non null entries but allowing multiple nulls

2011-10-17 Thread Peng Yu
Hi, If I use "NULL UNIQUE" when I create a table, it seems that only one NULL entry is allowed. Since NULL could mean unknown, in this case, two unknowns are not the same and I want to allow multiple nulls but I still want non null entries be unique. Is there a construct in mysql that can create a

Re: What charset to use for greek character Β?

2011-10-16 Thread Peng Yu
/bin/env bash mysql -t -hlocalhost -uxxx < main.sql ~/linux/test/mysql/mysql/LOAD_DATA/CHARACTER_SET$ ./main.sh +--+ | name | +--+ | βΒ | +------+ 2011/10/16 Peng Yu : > Hi, > > I have the greek character "Β" (not that it is different from the > English charact

What charset to use for greek character Β?

2011-10-16 Thread Peng Yu
Hi, I have the greek character "Β" (not that it is different from the English character "B", although they look similar. Copy both of them and type in google search box, you will see different search suggestion pop up). utf8 in mysql seems doesn't work. I'm wondering what charset I should for thi

Generate errors when loading table

2011-10-16 Thread Peng Yu
Hi, I have the following table and sql commands. The number of fields in the file is different from that of the schema. And the last line should not contain null. But there are only warnings but not errors generated. I'm wondering how to generate errors instead of warnings. ~/linux/test/mysql/mys

How to enable tabular output when reading command from file?

2011-10-16 Thread Peng Yu
Hi, ~/linux/test/mysql/mysql/SELECT$ ./main.sh namedatetyperemark Fluffy 1995-05-15 litter 4 kittens, 3 female, 1 male Buffy 1993-06-23 litter 5 puppies, 2 female, 3 male Buffy 1994-06-19 litter 3 puppies, 3 female Chirpy 1999-03-21 vet needed beak stra

Re: Is downloads.mysql.com download?

2011-10-15 Thread Peng Yu
On Sun, Oct 9, 2011 at 10:33 AM, Peng Yu wrote: > Hi, > > I'm not able to connect to downloads.mysql.com. Is it down? I guess the problem is that this website is too slow for a browser (like firefox) to download (it takes too long to initiate the transaction because the browser f

Why the same command have different results when it is in a bash script and when it is not?

2011-10-09 Thread Peng Yu
Hi, It is seems strange to me why the same command "mysql -hlocalhost -uxxx" when it is run from the command line, it will show an error. When it is run in a bash script, it runs fine. I guess this might be described somewhere, but I'm yet to find the answer. Does anybody know why this happens and

Re: Is downloads.mysql.com download?

2011-10-09 Thread Peng Yu
wo URLs. I guess either links on http://dev.mysql.com/doc/ should be fixed or downloads.mysql.com should be fixed. On Sun, Oct 9, 2011 at 10:47 AM, Carlos Proal wrote: > Downloads are available in http://dev.mysql.com/downloads > > Carlos > > > On Sun, Oct 9, 2011 at 10:33

Is downloads.mysql.com download?

2011-10-09 Thread Peng Yu
Hi, I'm not able to connect to downloads.mysql.com. Is it down? -- Regards, Peng -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

ERROR 1 (HY000): Can't create/write to file '/var/lib/mysql/#sql_9e1_0.MYI' (Errcode: 13)

2011-01-17 Thread Peng Yu
Hi, I run the following command. But I got the following error. I'm not sure what causes the problem. I have seen the same issue before, but it disappeared even I didn't take any action. Could anybody let me know how to fix the problem? mysql -ugenome -hgenome-mysql.cse.ucsc.edu mm9 -A mysql> se

concatenate sql query with group by and having

2010-07-28 Thread Peng Yu
mysql -ugenome -hgenome-mysql.cse.ucsc.edu mm9 -A I start mysql with the above command. Then I want to select the rows from the result of the following query, provided that for any rows that have the same symbol, chrom and strand should be the same (basically, discard the rows that have the same s

multiple level database hierarchy

2010-05-13 Thread Peng Yu
I seems that mysql and may SQL has only two levels databases->tables. Where there many tables, it become hard to properly name the tables and databases. I'm wondering if there is any variant of SQL or some other database that support arbitrary levels of complexity. -- Regards, Peng -- MySQL Gen

How to select rows from only the first N rows in a table?

2010-04-27 Thread Peng Yu
It seems that there is no direct support to limit 'select' to only the first N rows in a table. Could you let me know what the best way select rows from the first N rows in a table is? -- Regards, Peng -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

How to compute the min and max of two numbers?

2010-04-26 Thread Peng Yu
I don't see there is a function to compute min or max of two numbers in a row. Essentially I want to select all the rows where the minimum of column1 and column2 are bigger than the maximum of col3 and col4 (The following code won't work as I expected, if I am correct). select * from a_table where

Configure error of mysql-connector-odbc-5.1.5r1144 (missing sqlext.h)

2009-09-26 Thread Peng Yu
Hi, I try to configure mysql-connector-odbc-5.1.5r1144, But I got the following error. Can somebody let me know where to download the package which includes sqlext.h? Regards, Peng checking whether the f95 linker (/home/pengy/utility/linux/bin/ld -m elf_x86_64) supports shared libraries... yes c