Re: 5.1.44 community version select ordno=' ' error (2)

2010-03-04 Thread wang shuming
Oh, If any char fields add to index key ,then the =' ' gets wrong . ordno, qty ,mem 1 3 5 aaa18 b 20 1. CREATE TABLE `t1` ( `mid` int(11) NOT NULL, `qty` decimal(12,2) NOT NULL DEFAULT '0.00', `ordno` char(8) NOT NULL

5.1.44 community version select ordno=' ' error (2)

2010-03-03 Thread wang shuming
Hi, select * from t1 ordno qty 1 3 5 'aaa' 18 'b' 20 select * from t1 where ordno=' ' or ordno' ' ordno qty 1 3 5 'aaa' 18 'b' 20 select * from t1 where ordno=' ' ordno qty 'aaa' 18 'b'

5.1.42 community version select ordno=' ' error

2010-03-01 Thread wang shuming
Hi, Any table with a ordno char(n) not null field for example ordno qty 35 0 1 'abc' 3 '000' 100 select * from table1 where ordno' ' or ordno=' ' 3 rows select * from table1 where ordno=' ' 0 rows best regard! Shuming

5.1.42 community version select ordno=' ' error (2)

2010-03-01 Thread wang shuming
Hi, Any table with a ordno char(n) not null field for example ordno qty 35 0 1 'abc' 3 '000' 100 select * from table1 where ordno' ' or ordno=' ' 5 rows select * from table1 where ordno=' ' 2 rows best regard! Shuming

' . . ' can't insert into a date field,but update can

2008-04-11 Thread wang shuming
Hi, table table1 int1 int auto_increament , date date not null default '-00-00' 1) insert into table1 (date) values('. . ') // shows Incorrect date value: '. . ' for column date' at row 1 // '. . ' == space(4)+.+space(2)+.+space(2) 2) update

derived select can't find table

2007-12-26 Thread wang shuming
Hi, select * , ( select f2 from (select f1,f2 from t2 where t2.id=t1.id limit 1 union all ... order by f1 ) t2 limit 1 ) f2 from t1 Unknown column ' t1.id' in 'where clause' Best regard! Shuming Wang

table not found

2007-05-15 Thread wang shuming
Hi, SQL like select *,(select f1 from (select f1,date from table1 t1 where t1.f1=table1.f1 order by date desc limit 1 ) t2 ) lastf1 from table1 shows table1.f1 not found, mysql 5.0.37 . Thanks! Shuming Wang

How could write this sum string like SQL?

2007-04-23 Thread wang shuming
Hi, I want select item detials(date and qty) sum(qty) 'a01', '2007.01.01: 10/2007.02.03: 10',20 'a02', ' 2007.01.10: 20/2007.02.12: 30',50 'a03', ' 2007.01.18: 20', 20 from table2 date,item,qty

How could write this sum string like SQL?

2007-04-23 Thread wang shuming
Mysql 4.1 also support this group_concat(). Thank you ! Shuming Wang

How could write this SQL

2007-04-20 Thread wang shuming
Hi, How could select row1 a1,b1.qty, b2.qty, b3.qty row2 a2,b1.qty, b2.qty, b3.qty row3 a3,b1.qty, b2.qty, b3.qty ... from a table : row1 a1,b1,qty row2 a1,b2,qty row3 a1,b3,qty row4 a2,b1,qty row5 a2,b2,qty row6 a2,b3,qty row7 a3,b1,qty

Re: UPDATE and INSERT in one

2007-04-20 Thread wang shuming
insert into table1 (fa,fb,qty) values (fa1,fb1,qty1) on duplicate key update qty=qty+qty1 a primarykey or unique key must. Shuming Wang

Could query muti sql?

2007-04-13 Thread wang shuming
Hi, Could query multi SQLs in a query? How? Thanks ! Shuming Wang

Could query muti sql?

2007-04-13 Thread wang shuming
For example: Query(update a1 ... ; insert into ...; ...) Regards! Shuming Wang

5.0.37 ,sql a table still not found

2007-04-04 Thread wang shuming
Hi, from 5.0.27 till now 5.0.37, porblem still like this: select * from a1,a2 left join b1 on b1.f1=a1.f1 where a2.f2=a1.f2 // shows table a1 does not exist. if SQL changes into select * from a2,a1 left join b1 on b1.f1=a1.f1 where a2.f2=a1.f2 //

Re: left join , Unknown column 't1.itemid' in 'on clause'

2006-11-16 Thread wang shuming
Hi, select * from t1,t2 left join t3 on t3.itemid=t1.itemid left join t4 on t4.f2=t1.f2 mysql4.1 works, but mysql5.0 shows Unknown column 't1.itemid' in 'on clause' If change into select * from t2,t1 left join t3 on t3.itemid=t1.itemid left join t4 on t4.f2=t1.f2 mysql4.1

left join , Unknown column 't1.itemid' in 'on clause'

2006-11-03 Thread wang shuming
Hi, select * from t1,t2 left join t3 on t3.itemid=t1.itemid mysql4.1 works, but mysql5.0 shows Unknown column 't1.itemid' in 'on clause' If change into select * from t2,t1 left join t3 on t3.itemid=t1.itemid mysql5.0 works Shuming Wang

table not found

2006-10-31 Thread wang shuming
Hi! 2 level derived SQL like this: select field1,field2,(select sum(f3) from (select f3 from b1 where b1.f2=a1.f2) a3 ) field3 from a1 SQL error, table a1 not found , that is a1.f2 not found Regards! Shuming Wang Xtech Company limited Room 29H, 29/F,Plaza 2, Tiancheng Building,No 96 

select 9000000000000.10*19.80 wrong result 178200000000001.97

2006-05-29 Thread wang shuming
Hi, select 9.10*19.80 wrong result 1782001.97 if = 9000.10*19.80 right result178201.98 This is similiar to sum(qty*unitpri) result . Best regards Shuming Wang

select sum(qty*unitpri) wrong result

2006-05-28 Thread wang shuming
Hi, table a1 qty int(10) , unitpri foat(10,2) 35019.80 ... 350 19.80(total 48 lines) select sum(qty*unitpri) from a1 332639.99 ,it should return 332640.00 mysql version 4.1.19 Best regards! Shuming Wang

select substring_index(user(),_utf8'@',-1) not return ip on win2000/XP ?

2006-03-08 Thread wang shuming
Hi, If mysql database server installed on Linux without problem, but on win2000/XP: select substring_index(user(),_utf8'@',-1) return the local windows station computer name instead of IP ? Best regard! Shuming Wang -- MySQL General Mailing List For list archives:

select substring_index(user(),_utf8'@',-1) not return ip on win2000/XP ?

2006-03-07 Thread wang shuming
Hi, If mysql database server installed on Linux without problem, but on win2000/XP: select substring_index(user(),_utf8'@',-1) return the local windows station computer name instead of IP ? Best regard! Shuming Wang

what function could detect a row locked by other client ?

2005-11-18 Thread wang shuming
Hi, I know select .. update could lock selected rows, if the connection not release the lock, others always wait. If I use get_lock() to get a logical lock by key xxxtable+xxxrow , but others may not update other database on the same server . What function could detect a row locked (by select ...

run mysqld-nt.exe in background

2005-10-30 Thread wang shuming
Hi, How could run mysqld-nt.exe in background on win2000/XP, not as a service of windows. mysqld-nt.exe --console alway show a dos/ text window . Regards! Shuming Wang Xtech Company limited Room 17G,17/F,Plaza 2, Tiancheng Building,No 96 Longkouxi Road, Tianhe Guangzhou,Guangdong,China

reinstall mysql show innodb error

2005-10-20 Thread wang shuming
Hi, Our mysql 4.1 database server on win2000 was uninstalled by mistake, but reinstalled , caused the follow errors: InnoDB: Error: log file .\ib_logfile0 is of different size 0 14680064 bytes InnoDB: than specified in the .cnf file 0 10485760 bytes! 051020 19:30:42 [ERROR] Can't init databases

Clipper +Fivewin+ MYODBC EOF() bug

2002-02-25 Thread Wang Shuming
regards Wang Shuming Xtech Company Limited 17G,17/F,Plaza 2,Tiancheng Building, No 96,Longkouxi Road, Tianhe,Guangzhou,Guangdong,China www.xtech.com.cn Tel:(86-20)87595959,85265664,85260539 Fax:(86-20)87595959 - Before