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
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'
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
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
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
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
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
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
Mysql 4.1 also support this group_concat().
Thank you !
Shuming Wang
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
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
Hi,
Could query multi SQLs in a query? How?
Thanks !
Shuming Wang
For example:
Query(update a1 ... ; insert into ...; ...)
Regards!
Shuming Wang
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
//
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
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
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
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
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
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:
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
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 ...
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
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
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
25 matches
Mail list logo