Re: Which choice of mysql??

2017-05-24 Thread Peter Brawley
On 5/24/2017 12:21, Papa wrote: I am learning Java and I'd like to use MySQL to create, delete and update databases using Java. I have done this with C++ SQLite, but now, as I said, I want to port my code to Java [not easy for a Java nubby]. However, the MySQL installer

Re: Can not add foreign key constraint

2017-04-24 Thread Peter Brawley
files. Did you try recreating virtual_users? PB - Thanks. Dave. On 4/24/17, Peter Brawley <peter.braw...@earthlink.net> wrote: On 4/24/2017 18:16, David Mehler wrote: Hello, I'm running Mysql 5.7.18. My virtual_users are working fine, it's the new table that isn't. Or am I m

Re: Can not add foreign key constraint

2017-04-24 Thread Peter Brawley
On 4/24/2017 15:28, Peter Brawley wrote: On 4/24/2017 13:59, David Mehler wrote: Hello, root@localhost [mail]> show engine innodb_status; ERROR 1286 (42000): Unknown storage engine 'innodb_status' Well it's very unlikely InnoDB made that up, it's probably in one of your Create texts.

Re: Can not add foreign key constraint

2017-04-24 Thread Peter Brawley
tup. Thanks. Dave. On 4/24/17, Peter Brawley <peter.braw...@earthlink.net> wrote: On 4/24/2017 12:28, David Mehler wrote: Hello, Here's the create table sand error message. root@localhost [(none)]> use mail; Database changed root@localhost [mail]> CREATE TABL

Re: Can not add foreign key constraint

2017-04-24 Thread Peter Brawley
On 4/24/2017 12:28, David Mehler wrote: Hello, Here's the create table sand error message. root@localhost [(none)]> use mail; Database changed root@localhost [mail]> CREATE TABLE IF NOT EXISTS `lastauth` ( -> `user` varchar(40) NOT NULL, -> `remote_ip` varchar(18) NOT

Re: Can not add foreign key constraints

2017-04-24 Thread Peter Brawley
On 4/24/2017 9:18, David Mehler wrote: Hello, I'm trying to add a table to an existing database. I'm wanting it to get one of it's fields from an already existing table. I've done this before in this database. This works: CREATE TABLE `virtual_users` ( `id` int(11) NOT NULL

Re: Changing a field's data in every record

2017-02-19 Thread Peter Brawley
On 2/18/2017 15:13, debt wrote: I’ve been asked to post a question here for a friend. Is there a formula to change the format of the data in a single field in every record of a table? She has a "timestamp” in a text field formatted as 2017|02|16|04|58|42 and she wants to

Re: rescue Inno tables from an abandoned data directory?

2016-12-03 Thread Peter Brawley
On 12/3/2016 14:23, Martin Mueller wrote: I abandoned a MySQL 5.22 database There's been 5.0m 5,1, 5,4 (briefly), 5.5, 5.6 and now 5.7. No 5,.2. that quite suddenly andthat I wasn’t able to start up again. The data directory consists of a mix of ISAM and Inno tables. You mean MyISAM?

Re: a curse on OS sierra and MySQL?

2016-12-03 Thread Peter Brawley
could and should be more explicit about what is a significant change in Apple’s start/stop routines. If you mean that seriously, it needs to be more specific. PB - On 12/3/16, 12:43 PM, "Peter Brawley" <peter.braw...@earthlink.net> wrote: On 12/2/2016 17:58, Mart

Re: a curse on OS sierra and MySQL?

2016-12-03 Thread Peter Brawley
On 12/2/2016 17:58, Martin Mueller wrote: Alas, running the stop and start commands under sudo makes zero difference. ?! The cited page recommends more than sudo starts and stops, eg ... |unset TMPDIR mysql_install_db | Did you try that? Did you check the pid setting in my.cnf, eg

Re: a curse on OS sierra and MySQL?

2016-12-02 Thread Peter Brawley
On 12/2/2016 16:59, Martin Mueller wrote: I have been trying repeatedly and in vain to install the community edition of MySQL 5.7.16 on an iMac running OS sierra. I religiously followed the instructions for uninstalling previous versions found at

Re: Adding values returned by GREATEST

2016-05-14 Thread Peter Brawley
On 5/14/2016 11:16, shawn l.green wrote: Hello Sukhjinder, On 5/3/2016 8:55 AM, Sukhjinder K. Narula wrote: Hello, i have a question regarding the GREATEST function of mysql. I would like to add the values returned by GREATEST function is mysql, so a query is like below: For example table t

Re: Lost Connection Upon Loading Dump

2016-04-21 Thread Peter Brawley
On 4/21/2016 10:51, Stephen R Guglielmo wrote: Hello, I have a empty db that I'm trying to load a .sql file (created via mysqldump) into. The dump has 791611 lines and is 807 MB. Loading the dump is consistently failing at line 1763. Line 1763 is an INSERT statement. The line is 95610

Re: commands out of sync, you can't run this command now'

2016-01-08 Thread Peter Brawley
On 1/8/2016 3:14, Nitin Mehta wrote: Looks like some kind of locking mechanism in the application. Should not be a database issue. On Friday, January 8, 2016 10:47 AM, geetanjali mehra wrote: Hi all, Suddenly I have started getting below error from

Re: help with query to count rows while excluding certain rows

2016-01-01 Thread Peter Brawley
On 12/31/2015 0:51, Larry Martell wrote: I need to count the number of rows in a table that are grouped by a list of columns, but I also need to exclude rows that have more then some count when grouped by a different set of columns. Conceptually, this is not hard, but I am having trouble doing

Re: Query Help...

2015-10-20 Thread Peter Brawley
On 2015-10-20 12:54 PM, Don Wieland wrote: Hi all, Trying to get a query working: SELECT ht.*, CONCAT(o.first_name, " ", o.last_name) AS orphan, GROUP_CONCAT(DISTINCT hti.rec_code ORDER BY hti.rec_code ASC SEPARATOR ", ") AS alloc FROM hiv_transactions ht LEFT JOIN tk_orphans o ON

Re: Trouble with LEFT JOIN

2015-09-04 Thread Peter Brawley
On 2015-09-04 9:40 AM, Richard Reina wrote: I have the following two tables; mysql> select * from challenge; +++-++--+-+--+ | ID | PLR_ID | ACC_TYPE_ID | season | year | CHAR_ID |

Re: Trouble with LEFT JOIN

2015-09-04 Thread Peter Brawley
On 2015-09-04 11:39 AM, Richard Reina wrote: 2015-09-04 11:18 GMT-05:00 Peter Brawley <peter.braw...@earthlink.net <mailto:peter.braw...@earthlink.net>>: On 2015-09-04 9:40 AM, Richard Reina wrote: I have the following two tables; mysql> select *

Re: Sequence Numbering

2015-06-29 Thread Peter Brawley
On 2015-06-29 7:03 PM, Johnny Withers wrote: Hello all, I have a tabled defined: CREATE TABLE `store_seq` ( `seq_type_id` smallint(3) unsigned NOT NULL DEFAULT '0', `store_id` int(10) unsigned NOT NULL DEFAULT '0', `loan_model_id` int(10) unsigned NOT NULL DEFAULT '0',

Re: Issue with em dash character

2015-06-03 Thread Peter Brawley
On 2015-06-03 2:55 PM, Robert Voliva wrote: We're finding that, when working with the em dash character, the LEFT and LENGTH functions don't work well together. This query shows trying to strip off the last character from a string containing an em dash: mysql select LEFT('031492349−0002,',

SUPER privilege required for simple update

2015-05-09 Thread Peter Abplanalp
have not tried them all. I am at a loss. Any and all help appreciated. thanks, -peter

Select one value, not the other

2015-04-29 Thread Peter Brawley
On 2015-04-29 12:20 AM, Olivier Nicole wrote: SELECT * FROM table WHERE item_number=1; Sorry if my question was not clear: what I am looking for is: SELECT * FROM table WHERE data_value=1 AND there is not any reccord with the same item_number and data_value=2 Assuming a table named t ...

Re: forum vs email

2014-12-09 Thread Peter Brawley
On 2014-12-09 9:55 AM, Johan De Meersman wrote: - Original Message - From: Sándor Halász h...@tbbs.net Subject: Re: forum vs email That is, this list, right? What does it lack (besides readers)? This list interacts with the forums on mysql.com? Nope. PB - Every thread here

Re: table-for-column

2014-12-05 Thread Peter Brawley
On 2014-12-04 9:56 PM, shawn l.green wrote: On 12/1/2014 6:09 AM, Johan De Meersman wrote: - Original Message - From: peter brawley peter.braw...@earthlink.net Subject: Re: table-for-column I wonder if anyone knows why sites like Stack Overflow and those of ours I mentioned

Re: table-for-column

2014-11-27 Thread Peter Brawley
On 2014-11-27 9:31 AM, h...@tbbs.net wrote: 2014/11/26 20:06 -0600, Peter Brawley Why do you call it a hack, you get outta bed on the wrong side? 2014/11/27 14:08 +0100, Johan De Meersman Doesn't really belong on the list; but I'd love to hear reasonable arguments why that would be a bad

Re: MySQL dying?

2014-11-26 Thread Peter Brawley
On 2014-11-24 3:24 PM, Neil Tompkins wrote: Personally I think people, myself included are using other resources like stackoverflow to get answers to my MySQL questions. Visits to our MySQL article pages (www.artfulsoftware.com/queries.php,

Re: Help optimize query.

2014-11-14 Thread Peter Brawley
Let's see the results of Explain Extended this query, result of Show Create Table cc_member_queue_end_log. PB - On 2014-11-13 1:34 PM, Mimiko wrote: Hello. I have this table: show create table cc_agents_tier_status_log: CREATE TABLE cc_agents_tier_status_log ( id int(10) unsigned

Re: Returning years of data by month

2014-11-09 Thread Peter Brawley
On 2014-11-09 10:37 AM, Steffan A. Cline wrote: Looking for suggestions on how to best pull some data. I need to do some calcs but pull the data by year and month to make a table like such. 201220132014 Jan $243$567$890 Feb $123$456

Re: Query with variable number of columns?

2014-10-08 Thread Peter Brawley
On 2014-10-08 1:38 PM, Jan Steinman wrote: I often use CASE WHEN ... to pivot tables. For example, splitting sales data by year: SELECT s_product.name AS `Product`, SUM(CASE WHEN YEAR(sales.Date)='2007' THEN sales.Total ELSE NULL END) AS `2007`, SUM(CASE WHEN

Re: extract year-month-day-hour

2014-09-18 Thread Peter Brawley
On 2014-09-18 5:25 PM, Jopoy Solano wrote: Hi! I want to say sorry in advance for my ignorance. I was wondering how can I extract year-month-day-hour in one go. For example: From 2014-09-17 12:22:16 to 2014-09-17 12 Is this what you mean? date_format( tsvalue, '%Y-%m-%d %H' ) PB -

Re: mysql Access denied error

2014-05-05 Thread Peter Brawley
On 2014-05-04 9:17 PM, EdwardKing wrote: I use mysql to create a database and grant rights to a user hadooptest,then I use hadooptest to login mysql and use the database,but it failed. Why raise error after I grant rights? How to solve it? Thanks. The command sequence ... mysql create

Re: Data masking for mysql

2014-04-15 Thread Peter Brawley
On 2014-04-15 5:37 AM, reena.kam...@jktech.com wrote: It can be done by data masking tool itself. Its one time activity, I do not need it again again. Rilly? If that's so, the data will never be accessed. 'PB Please suggest data masking tool link. -Original Message- From: Reindl

Re: Locking a Database (not tables) x

2014-03-23 Thread Peter Brawley
On 2014-03-23 8:02 PM, David Lerer wrote: Thanks Shawn, This may work for us with some script changes. We'll take a look. By the way, too bad we cannot rename a database, or can we? See http://dev.mysql.com/doc/refman/5.1/en/rename-database.html about removal of a dangerous RENMAE DATABASE

Re: grouping by the difference between values in rows

2014-01-12 Thread Peter Brawley
On 2014-01-12 1:17 PM, Larry Martell wrote: I've been asked to do something that I do not think is possible in SQL. I have a query that has this basic form: SELECT a, b, c, d, AVG(e), STD(e), CONCAT(x, ',', y) as f FROM t GROUP BY a, b, c, d, f x and y are numbers (378.18, 2213.797 or

Re: grouping by the difference between values in rows

2014-01-12 Thread Peter Brawley
On 2014-01-12 9:13 PM, Larry Martell wrote: On Sun, Jan 12, 2014 at 2:47 PM, Peter Brawley peter.braw...@earthlink.net wrote: On 2014-01-12 1:17 PM, Larry Martell wrote: I've been asked to do something that I do not think is possible in SQL. I have a query that has this basic form: SELECT

Re: regexp in conditional

2014-01-07 Thread Peter Brawley
On 2014-01-07 1:22 PM, Larry Martell wrote: Can I use an regexp in a conditional? I need to do something like this: SELECT (IF r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no') FROM s; I'm getting an error from that. Is there some way to do this? SELECT IF( r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no' )

Re: 5.1 to 5.6 upgrade: is it possible?

2013-12-04 Thread Peter Brawley
On 2013-12-04 1:33 PM, Ilya Kazakevich wrote: Hello, Have anybody tried to upgrade 5.1 to 5.6? I believe running mysql_upgrade should be enough, but does there are some caveats? Ilya Kazakevich. The MySQL recommendation is to upgrade one major version at a time, ie 5.1-5.5-5.6. There are so

Re: grouping and limiting results and rand()

2013-09-23 Thread Peter Brawley
On 2013-09-23 8:10 PM, Jeremiah Jester wrote: Hello, How would i go about selecting 5 random cars that are flagged as internet_special (value 1) for each dealer from a specific table? Ive tried sub selects with no luck. Here's a basic query that has my required conditional. Note that I get all

Re: help: innodb database cannot recover

2013-06-21 Thread Peter
: Got error: 2013: Lost connection to MySQL server during query when using LOCK TABLES it looks that all data from innodb is messed up and gone forever even though *.frm is still there. Peter

help: innodb database cannot recover

2013-06-20 Thread Peter
help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. is there a way to start the database again? Thanks for your help in advance. Peter -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: help: innodb database cannot recover

2013-06-20 Thread Peter
2013/6/20 Peter one2001...@yahoo.com Hello, I copied innodb database (ib_logfile0  ib_logfile1  ibdata1 and the whole database directory) from one crashed machine to another. I find that I cannot start database to get the database data any more. How did you copy the database? Manuel I copy

Re: help: innodb database cannot recover

2013-06-20 Thread Peter
Am 20.06.2013 15:18, schrieb Peter: I copied innodb database (ib_logfile0  ib_logfile1  ibdata1 and the whole database directory) from one crashed machine to another. I find that I cannot start database to get the database data any more. How did you copy the database? Manuel I copy

Re: help: innodb database cannot recover

2013-06-20 Thread Peter
Am 20.06.2013 15:18, schrieb Peter: I copied innodb database (ib_logfile0  ib_logfile1  ibdata1 and the whole database directory) from one crashed machine to another. I find that I cannot start database to get the database data any more. How did you copy the database? Manuel I copy

Re: help: innodb database cannot recover

2013-06-20 Thread Peter
2013/6/20 Peter one2001...@yahoo.com 2013/6/20 Peter one2001...@yahoo.com Hello, I copied innodb database (ib_logfile0  ib_logfile1  ibdata1 and the whole database directory) from one crashed machine to another. I find that I cannot start database to get the database data any more

Re: help: innodb database cannot recover

2013-06-20 Thread Peter
 ibdata1 into /var/lib/mysql in linux and the whole database directory my_database_name into /var/lib/mysql/my_database_name, the same location as previous machine  /var/lib/mysql/my_database_name peter If I remove  ib_logfile0  ib_logfile1  ibdata1, then restart mysql. still I am unable to open

Re: Show ROUTINE body, not PROCEDURE

2013-03-29 Thread Peter Brawley
On 2013-03-29 9:57 AM, Dotan Cohen wrote: On Thu, Mar 28, 2013 at 11:15 PM, Peter Brawley peter.braw...@earthlink.net wrote: Can someone run the server with --skip-grant-tables to retrieve this code? Possibly, I'll ask. However, it is highly unlikely that such a thing was done to create

Re: Show ROUTINE body, not PROCEDURE

2013-03-28 Thread Peter Brawley
On 2013-03-28 3:33 PM, Dotan Cohen wrote: On Wed, Mar 27, 2013 at 5:46 PM, h...@tbbs.net wrote: 2013/03/27 08:01 +0200, Dotan Cohen Actually, it is the user that I am logged in as that created the function. That is why I find it hard to believe that one needs root / admin access to see its

Re: Show ROUTINE body, not PROCEDURE

2013-03-25 Thread Peter Brawley
On 2013-03-25 4:28 AM, Dotan Cohen wrote: On Sun, Mar 24, 2013 at 11:08 PM, Peter Brawley peter.braw...@earthlink.net wrote: Log in as admin@localhost. Thanks. I don't have the admin or root privileges on this database. Is that the only way to see the code behind the function? Ask admin

Re: Show ROUTINE body, not PROCEDURE

2013-03-24 Thread Peter Brawley
On 2013-03-24 8:25 AM, Dotan Cohen wrote: A MySQL database is using a stored function avg_sales in some SQL queries. I am having a hard time finding the code for this function, in order to track down a bug that I suspect is in the function. Here is what I get when I try to query MySQL for the

Re: Foreign key on multiple columns

2013-03-21 Thread Peter Brawley
On 2013-03-21 8:12 AM, Norah Jones wrote: I'm trying to create a foreign key on two columns but getting error... Here's what I tried: CREATE TABLE test2 ( ID INT NOT NULL AUTO_INCREMENT, col1 INT NOT NULL, col2 INT NOT NULL, PRIMARY KEY (ID), CONSTRAINT

Re: Major MySQL Revision Takes on NoSQL

2013-02-07 Thread Peter Brawley
On 2013-02-07 8:29 PM, Daevid Vincent wrote: http://adtmag.com/articles/2013/02/06/mysql-update.aspx The headline is weirdly deceptive. Mebbe they thought the headline would draw eyes to their ads. This edition of MySQL is less like NoSQL, and more determinedly relational, than any before.

Re: Complex MySQL Select Statement Help

2013-02-02 Thread Peter Brawley
On 2013-02-01 10:18 PM, h...@tbbs.net wrote: 2013/01/31 22:24 -0600, Peter Brawley Is this what you mean? Select, pricelist If( !IsNull(specialprice) And specialprice unitprice And CurDate() Between startingDate And endingDate, specialprice, unitprice ) as used_price From catalog Where

Re: Complex MySQL Select Statement Help

2013-01-31 Thread Peter Brawley
On 2013-01-31 8:13 PM, Angela Barone wrote: Hello, I'm trying to write a select query that grabs two prices from my db and displays them on a web page. I want it to grab the `listprice`, and either the `unitprice` or the `specialprice` depending on the following criteria: if the

Re: sales data every publisher

2012-12-18 Thread Peter Brawley
On 2012-12-18 2:52 AM, Haidar Pesebe wrote: Hi all-- There are 3 tables which each like this: NOTE: The linkage between table A and table B is ID and IDPUBLISHER, while Table B to C is the ISBN. Sometimes there are some titles that are not sold in a given month. TABLE A (Publisher)

Re: Get lowest value

2012-12-14 Thread Peter Brawley
On 2012-12-14 3:28 AM, Neil Tompkins wrote: Hi, I've the following data total, supplier_id, product_name, supplier_code 125,2,iPod,xyz123 100,1,iPod,abc123 145,3,iPod,1213113 245,4,iPod,12345 What query do I need to get the lowest total in this case 100 for supplier_id 1 ? See Within-group

Re: Help with left outer join

2012-12-11 Thread Peter Brawley
On 2012-12-11 3:19 PM, Larry Martell wrote: I have this query: SELECT data_target.name, ep, wafer_id, lot_id, date_time, data_file_id, data_cstimage.name, bottom, wf_file_path_id, data_measparams.name, vacc, data_category.name FROM data_cst, data_target, data_cstimage,

Re: Help with left outer join

2012-12-11 Thread Peter Brawley
ERROR 1054 (42S22): Unknown column 'data_tool.category_id' in 'on clause' But category_id is a column in data_tool. Then a bit of reordering is required ... SELECT data_target.name, ep, wafer_id, lot_id, date_time, data_file_id, data_cstimage.name, bottom, wf_file_path_id,

Re: MUltiple value in single insert is not working in mysql procedure

2012-12-03 Thread Peter Brawley
On 2012-12-03 7:40 AM, amit wrote: Hi Team, I am not able to use multi value insert via argument in mysql stored procedure, Please help where am I wrong. Thanks in Advance ! mysql insert into input_data1 values(),(),(),(); Query OK, 4 rows affected (0.00 sec) *Problem* mysql

Re: Stored Procedure Question?

2012-11-23 Thread Peter Brawley
when I call a stored procedure does the control get backs immediately to the php script? No, sprocs wil lvery likely slow you down. Probably best to split the job into several part-tasks (i) read rows into a work buffer, (ii) walk the work buffer and mark done rows, (iii) walk the done list

Re: Dynamic crosstab got me lost.

2012-11-14 Thread Peter Brawley
On 2012-11-14 5:08 PM, Mogens Melander wrote: Thanks Rick Yes, I know it's not going the most (in lack of descriptive words) pretty piece of code. The variable number of columns is the key phrase here. I've already told them, this is not a SQL task, but having infinite trust in my peers out

Re: getting certain rows from a group by

2012-09-18 Thread Peter Brawley
On 2012-09-18 5:53 AM, Larry Martell wrote: I have this query: SELECT data_target.name as Target, q1.ep as EP, COUNT(*) as Wafers, Lots, SUM(numonep)/(COUNT(*)+SUM(CASE WHEN reruns 0 THEN reruns ELSE 0 END)) as 'Sites/Wafer', MAX(LastRun) as Last Run,

Re: function INTERVAL in view

2012-09-17 Thread Peter Brawley
n 2012-09-17 12:58 PM, h...@tbbs.net wrote: My MySQL is of version 5.5.8-log. I find I cannot save a query with INTERVAL in a view: redundant round brackets are added. If the query is SELECT INTERVAL(1, 2, 3, 4) within the frm file there is the expression interval((1, 2, 3, 4)) which is

Re: suggestion needed for table design and relationship

2012-08-15 Thread Peter Brawley
On 2012-08-15 1:54 PM, Rajeev Prasad wrote: I have to keep this data in MySql, and i am not sure (as SQL/databse is not my field) how to organise this into one or many tables? right now I would represent my info as follows:

Re: suggestion needed for table design and relationship

2012-08-15 Thread Peter Brawley
On 2012-08-15 5:27 PM, Rajeev Prasad wrote: hello Peter, data_specific_to_device = contains diff values, and is different for different devices associated_service = will also be a list of values which will be different for different devices and same for associated_device column. this data

Re: Subquery taking too much time on 5.5.18?

2012-07-07 Thread Peter Brawley
On 2012-07-07 9:52 AM, Cabbar Duzayak wrote: Hmm, Looking at the link http://www.artfulsoftware.com/infotree/queries.php and explanations here, EXISTS() should have performed better, but does not seem to??? I stopped it after about 5 minutes. I tried both: SELECT * FROM A WHERE EXISTS

Re: Subquery taking too much time on 5.5.18?

2012-07-06 Thread Peter Brawley
On 2012-07-06 5:07 PM, David Lerer wrote: Cabbar, try to replace the IN subquery with an EXISTS. Something like: SELECT * FROM A WHERE EXISTS (SELECT * FROM B WHERE A.id=B.A_ID and B.name like 'X%'); See The unbearable slowness of IN() at

Re: category with parentid

2012-05-25 Thread Peter Brawley
On 2012-05-25 8:35 AM, h...@tbbs.net wrote: 2012/05/25 14:57 +0700, HaidarPesebe id | name | parentid -- 1 | cat A | 0 2 | cat B | 0 3 | subcat A | 1 4 | subcat A | 1 5 | subncat B | 2 - I want to display the result like this: 1. Cat A

Re: Query assistance...

2012-05-21 Thread Peter Brawley
On 2012-05-21 11:17 AM, Don Wieland wrote: I have got this query that returns the correct rows I want to display, BUT the columns dr_ther_qty, dr_not_ther_qty, and dr_all_ther_qty are not calculating correctly: --- START QUERY ONE --- SELECT q1.* FROM (SELECT apt.user_id, apt.client_id,

Re: Query help,,,

2012-05-17 Thread Peter Brawley
On 2012-05-17 9:37 AM, Don Wieland wrote: Hi folks, I am trying to compile a query that does statistics on appointments based on specific criteria. Here is my starting query: SELECT u.user_id, c.client_id, c.first_name, c.last_name, a.time_start AS stime,

Re: The most elegant/efficient way to pull this SQL query

2012-04-11 Thread Peter Brawley
On 4/11/2012 1:30 PM, Haluk Karamete wrote: I've got this relational mySQL table that ties peopleIDs from the people table to the states IDs peopleID___stateID 1__1 2__4 3__5 people table is like this;

RE: Error in starting MySQL service on LINUX

2012-04-05 Thread Peter Boros
Hi, What are the parameters you are trying to change? What does the error log say? Peter On Thu, 2012-04-05 at 14:40 +, Manivannan S. wrote: I am not facing the MySQL server problem during installation. I have installed those two rpm packages in my machine successfully

Re: MySQL Session Variables with PHP

2012-02-22 Thread Peter Brawley
On 2/22/2012 9:47 AM, Steven Staples wrote: Good [insert time of day here] all! I am trying to reorder my auto-inc field in my database, and I have successfully done it with my front end that I use (SQLYog) with the following code: SET @var_name = 0; UPDATE `my_database`.`my_table` SET `id` =

Re: weird difference in workbench and CLI query

2012-02-13 Thread Peter Brawley
On 2/13/2012 10:18 AM, James W. McNeely wrote: When I run this query in workbench: select c.acc_number 'Accession Number', e.DateExam 'MBI Exam Date', s.ExamDate 'SJH Exam Date' from chestcon_log c left join exams e on CONCAT(000,c.acc_number) = e.LastWordAccNum left join sjhreports_ s on

Re: Indexed Query examining too many rows!

2012-02-12 Thread Peter Brawley
On 2/12/2012 4:40 PM, Reindl Harald wrote: Am 12.02.2012 23:25, schrieb Cabbar Duzayak: Hi All, I have a table with a btree index on its searchKey column, and when I send a simple query on this table: explain select * from DataIndex where (searchKey like 'A%') order by searchKey limit 10

Re: how to changing default '-' character in Datetime in MySQL?

2012-02-05 Thread Peter Brawley
On 2/5/2012 9:21 PM, Michael Dykman wrote: You are right. It seems to have fallen into disuse since I used it last. AFAIK it has never been used. PB - At any rate, the format does not affect storage. I, like most others, generally specify the format using the date_format function

Re: cannot pass time to function

2012-01-27 Thread Peter Brawley
On 1/27/2012 12:09 PM, John Heim wrote: I'm trying to create a function that formats a time in a standard way ('%H:%i'). But all I can seem to get back is null. DROP TABLE IF EXISTS bogus_table; CREATE TABLE IF NOT EXISTS bogus_table ( btime TIME ); INSERT INTO bogus_table VALUES

Re: setting the default of a date field

2012-01-27 Thread Peter Brawley
On 1/27/2012 11:18 AM, william drescher wrote: Is there a way to set the default of a date field to the date the record is generated ? bill Use a TIMESTAMP. Default DATE(TIME) columns with Triggers. PB -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: setting the default of a date field

2012-01-27 Thread Peter Brawley
On 1/27/2012 2:24 PM, william drescher wrote: On 1/27/2012 3:21 PM, Peter Brawley wrote: On 1/27/2012 11:18 AM, william drescher wrote: Is there a way to set the default of a date field to the date the record is generated ? bill Use a TIMESTAMP. Default DATE(TIME) columns with Triggers

Re: mysql guru??

2012-01-20 Thread Peter Brawley
On 1/20/2012 5:54 AM, bruce wrote: Hi. Got a major pain that I'm trying to solve using mysql. Trying to handle a hierarchical tree structure, where I have a parent/child structure that grows as data is added to the system. The process needs to continuously determine if the overall tree, and

Re: Parent/Child - Linked List

2012-01-16 Thread Peter Brawley
On 1/16/2012 12:53 PM, bruce wrote: On Mon, Jan 16, 2012 at 1:52 PM, brucebadoug...@gmail.com wrote: Hey Authur. Should have been more clear. I've looked over a number of sites. And with the exception of the the articles that talk about using the Nested List approach, nowhere did I find data

Re: Parent/Child - Linked List

2012-01-16 Thread Peter Brawley
On 1/16/2012 4:14 PM, bruce wrote: hi Peter. Sorry.. Been looking at this for awhile. In the sample data/tbl I provided, it has two top level root/parents. Ie, I have two entries that don't have a parentID. I use 0 to be null. Mistake. use Null. The items are (0,1), and (0,8

Re: Date and Time

2012-01-08 Thread Peter Brawley
On 1/8/2012 2:21 PM, Donovan Brooke wrote: Hello, I'm doing an insert into with date and time type fields. I was reading: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-literals.html My question is: is the format always 'year month day'?.. or can we save dates in 'month day year' as

Re: errors running WHILE loop

2011-12-27 Thread Peter Brawley
On 12/27/2011 12:13 PM, Mark Haney wrote: I've had a DEVIL of a time with this problem and I'm sure it's something simple, but I can't find it anywhere in the documentation or online what the problem is. Let me explain. I cannot get any WHILE loop to work from either a CLI or a script on

Re: Query query

2011-12-03 Thread Peter Brawley
On 12/3/2011 9:35 PM, Jan Steinman wrote: Second attempt, using a join, returns just one row for Dewey 000 with the COUNT being about half the volumes in the library, which isn't right... I thought a LEFT OUTER JOIN would have returned a record for every record in s_library_dewey, but it only

Re: how to check how big a database is

2011-11-15 Thread Peter Brawley
On 11/15/2011 2:10 PM, Angela liu wrote: In mysql 5.0 ,how to check how big a database is? Thanks See Database size at http://www.artfulsoftware.com/queries.php PB -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: How to dynamically create database and tables on mysql?

2011-10-22 Thread Peter Brawley
On 10/21/2011 3:05 AM, 王科选 wrote: Hi, Is there any way to dynamically create database and tables on mysql? For example, if I want to create 100 databases(dbname is unknown until run time), with 100 predefined tables in it, how to achieve that? Thanks in advance! Easiest mebbe from a scripting

Re: What is wrong with this outer join?

2011-10-20 Thread Peter Brawley
On 10/20/2011 9:11 AM, Shawn Green (MySQL) wrote: On 10/19/2011 20:03, Dotan Cohen wrote: ... Thank you Shawn. I very much appreciate your help, and I also appreciate your employer's initiative to have such a position monitoring the mailing list. Is that an Oracle-created position, or did it

Re: Inconsistent query result.

2011-10-11 Thread Peter Brawley
On 10/11/2011 8:11 AM, Paul Halliday wrote: I have the following query: SELECT COUNT(signature) AS count, MAX(timestamp) AS maxTime, INET_NTOA(src_ip), map1.cc as src_cc, INET_NTOA(dst_ip), map2.cc as dst_cc, signature, signature_id, ip_proto FROM event LEFT JOIN mappings AS map1 ON

Re: Inconsistent query result.

2011-10-11 Thread Peter Brawley
On 10/11/2011 12:26 PM, Paul Halliday wrote: On Tue, Oct 11, 2011 at 10:37 AM, Peter Brawley peter.braw...@earthlink.net wrote: On 10/11/2011 8:11 AM, Paul Halliday wrote: I have the following query: SELECT COUNT(signature) AS count, MAX(timestamp) AS maxTime, INET_NTOA(src_ip), map1.cc

Socket not found

2011-10-09 Thread Peter Schrock
/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! Help please. Peter

Re: Is downloads.mysql.com download?

2011-10-09 Thread Peter Schrock
For an appropriate response, try: www.msyql.com/downloads/ Peter On Oct 9, 2011, at 8:33 AM, Peng Yu pengyu...@gmail.com wrote: 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

A Newbie question about make and the term.c file

2011-10-08 Thread Peter Schrock
: passing argument 1 of ‘tgetnum’ discards qualifiers from pointer target type make[2]: *** [term.o] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1 I can't figure out what it means or how to fix it. Help please. Peter

MySQL fora overrun by spam

2011-10-08 Thread Peter Brawley
Several MySQL fora, including all the Usage fora, have been overrun by spam to the point of unusability, with no sign of effective remediation. This gives the impression that a process of letting MySQL die of neglect has begun. PB -- MySQL General Mailing List For list archives:

Re: A Newbie question about make and the term.c file

2011-10-08 Thread Peter Schrock
binary for ppc and then try upgrading. About the error, I am sure it is harmless, but I can't get past it, which means I can't use mysql. Peter On Oct 8, 2011, at 7:54 AM, Michael Dykman mdyk...@gmail.com wrote: I can't help directly with the error message (the warning seems fairly harmless

Re: Variables in stored procedure

2011-10-04 Thread Peter Brawley
On 10/4/2011 4:20 PM, Adam Gerson wrote: I am getting the error that TABLENAME does not exist. How do I get it to substitute the value stored in TABLENAME, and not the literal string? See the manual page for PREPARE. PB - begin declare v_max int unsigned default 1; declare v_counter

Re: replication between two tables in same database

2011-09-30 Thread Peter Boros
. For the fulltext problem, sphinx is the better solution. Peter On Thu, 2011-09-29 at 22:59 +0100, Tompkins Neil wrote: I've now just upgraded to MySQL 5.6 on our test server. Just trying to find a date as to when it will go into production On Thu, Sep 29, 2011 at 8:10 PM, mos mo

Re: mysql listed as attach page by google?

2011-09-26 Thread Peter Brawley
On 9/26/2011 1:30 PM, Michael Albert wrote: I don't suppose I am the first to notice this, but most of the pages on dev.mysql.com have been listed by google as attack pages, e.g http://dev.mysql.com/downloads/. Has there been a problem, or is google being overzealous? No. There are problems on

Binary builds for AIX

2011-09-09 Thread Peter Gershkovich
I noticed that there is no binary builds for AIX any more. What would be the best way to install a current version of MySQL (5.5) on AIX? Specifically I am looking for instructions for AIX 6.1 and/or 7.1 Thanks, Peter -- MySQL General Mailing List For list archives: http://lists.mysql.com

Re: Seconds Behind the master 0 but in reality it's over 10 minutes or hours..

2011-09-04 Thread Peter Boros
replication lag, you can use mk-heartbeat. Peter On Sun, 2011-09-04 at 20:33 +0200, Adam PAPAI wrote: Dear List, I have a Master - [ Slave 1, Slave 2 ] setup for years. Last week we've reinstalled the whole setup to: 5.1.58 from: 5.1.54. The situation is: the master says: (show

Re: locked non-existent row

2011-09-02 Thread Peter Brawley
On 9/1/2011 9:06 AM, Jerry Schwartz wrote: -Original Message- From: Peter Brawley [mailto:peter.braw...@earthlink.net] Sent: Wednesday, August 31, 2011 10:40 AM To: r...@grib.nl; mysql@lists.mysql.com Subject: Re: locked non-existent row On 8/31/2011 4:50 AM, Rik Wasmus wrote: While

  1   2   3   4   5   6   7   8   9   10   >