Error with SUM

2008-07-11 Thread e.krijgsman
Hi, The following query gives an error in MySql: SELECT SUM((SELECT SUM(a.id) FROM users AS b)) FROM users AS a Error: # - Invalid use of group function I know the query doesn't really make sense and it is easy to rewrite it, but the error occurred in some generated sql (this is obviousl

Error with SUM

2008-07-11 Thread e.krijgsman
Hi, The following query gives an error in MySql: SELECT SUM((SELECT SUM(a.id) FROM users AS b)) FROM users AS a Error: # - Invalid use of group function I know the query doesn't really make sense and it is easy to rewrite it, but the error occurred in some generated sql (this is obviousl

Re: ORDER BY problem

2008-07-11 Thread Obantec Support
- Original Message - Subject: RE: ORDER BY problem Try your query with either back quotes around Company SELECT * FROM Contacts WHERE Categories="Services" and BusinessCodes REGEXP "^R" and gold_id="2" ORDER BY `Company` ASC Or no quotes around Company SELECT * FROM Contacts WHERE

RE: MySQL License

2008-07-11 Thread Rolando Edwards
Please change your password right away !!! It's in the message below !!! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2008 2:53 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: FW: MySQL License Hi, This is re

RE: ORDER BY problem

2008-07-11 Thread Rolando Edwards
Try your query with either back quotes around Company SELECT * FROM Contacts WHERE Categories="Services" and BusinessCodes REGEXP "^R" and gold_id="2" ORDER BY `Company` ASC Or no quotes around Company SELECT * FROM Contacts WHERE Categories="Services" and BusinessCodes REGEXP "^R" and gold_id="

ORDER BY problem

2008-07-11 Thread Obantec Support
Hi while testing an upgrade from 3.23.58 to 4.1.22 on an FC3 test box SELECT * FROM Contacts WHERE Categories="Services" and BusinessCodes REGEXP "^R" and gold_id="2" ORDER BY "Company" ASC on mysql server3.23.58 i get company result in ASC order. on mysql server4.1.22 i get non ASC order f

Re: Count total number of records in db

2008-07-11 Thread Warren Windvogel
Radoulov, Dimitre wrote: mysql -NBe'show databases' | while IFS= read -r db; do printf "show tables from %s;\n" "$db" | mysql -N | while IFS= read -r t; do printf "select count(1) from %s.%s;\n" "$db" "$t" done done | mysql -N | awk '{ s += $1 }END{ print s }' I quickly

Re: Count total number of records in db

2008-07-11 Thread Radoulov, Dimitre
Warren Windvogel wrote: Hi, Can anyone tell me how to check the total number of records in a database in MySQL version 4.0 Googling doesn't seem to help and all previous posts assume version 5.* [...] Something like this: mysql -NBe'show databases' | while IFS= read -r db; do printf

FW: MySQL License

2008-07-11 Thread hemant.pandey
Hi, This is regarding MySQL license we had bought for Bharti Jersey Project. Could you please let me know the Warranty period for the same. Also, please let me know if we have any Maintenance and Support contract with MySQL against this license. If not, please provide me the quotation for t

Re: Count total number of records in db

2008-07-11 Thread MarisRuskulis
Warren Windvogel wrote: > Hi, > > Can anyone tell me how to check the total number of records in a > database in MySQL version 4.0 > Googling doesn't seem to help and all previous posts assume version 5.* > > Regards > Warren > for table you can use: SELECT COUNT(*) from the_table_name; in whole da

Count total number of records in db

2008-07-11 Thread Warren Windvogel
Hi, Can anyone tell me how to check the total number of records in a database in MySQL version 4.0 Googling doesn't seem to help and all previous posts assume version 5.* Regards Warren -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lis