Re: MySQL Manager Issue

2007-10-05 Thread Michael Raven
Right click in query editor window, select "Properties" from popup menu, Select "Quick Code" in Editor options tree. On the right side of the dialog window in "Automatic features" group deselect "Code completion" and/or "Code Parameters" checkboxes. p.s. It seems that ticket system is working now

DROP TRIGGER IF EXISTS throws error??

2007-10-05 Thread Jesse
I'm attempting to restore a couple of backups, and part way through, I get the error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS alumni' at line 1 Query is: DROP TRIGGER IF EXISTS `alumni`; S

Re: MySQL Manager Issue

2007-10-05 Thread Jesse
Right click in query editor window, select "Properties" from popup menu, Select "Quick Code" in Editor options tree. On the right side of the dialog window in "Automatic features" group deselect "Code completion" and/or "Code Parameters" checkboxes. Thanks so much for the reply. I usually right

Re: DROP TRIGGER IF EXISTS throws error??

2007-10-05 Thread Baron Schwartz
Hi, Jesse wrote: I'm attempting to restore a couple of backups, and part way through, I get the error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS alumni' at line 1 Query is: DROP TRIGGER IF

Re: Debugging batch sql statements

2007-10-05 Thread Baron Schwartz
Arun wrote: I have a large batch of insert sql statements, of which some of them are failing. I want to know which one is failing exactly. Is there anyway I can debug it and which statement went wrong. I have only 4 or 5 out of 200 statements that are failing. It depends on how you're running t

Re: LIMIT within GROUP BY

2007-10-05 Thread Miroslav Monkevic
Thanks Baron, great advice (as always). My real query is a bit more complicated but speaking in terms of example I provided, I took this path: create table results ( person_id int(11), points int(11) ); insert into results values(1, 34); insert into results values(1, 33

Debugging batch sql statements

2007-10-05 Thread Arun
I have a large batch of insert sql statements, of which some of them are failing. I want to know which one is failing exactly. Is there anyway I can debug it and which statement went wrong. I have only 4 or 5 out of 200 statements that are failing. -- Thanks Arun George

Re: LIMIT within GROUP BY

2007-10-05 Thread Baron Schwartz
Change the > to >= and the < to <= to deal with this. Baron Miroslav Monkevic wrote: Thanks Baron, great advice (as always). My real query is a bit more complicated but speaking in terms of example I provided, I took this path: create table results ( person_id int(11),

Re: LIMIT within GROUP BY

2007-10-05 Thread Miroslav Monkevic
I tried. Then I get: ### person_idpoints 1 34 2 49 2 46 2 37 3 42 3 35 3 24 instead of desired: person_idpoints 1

MySQL 4.0, max_allowed_packet and blob insert

2007-10-05 Thread Kilian
Hello all, I'm running MySQL 4.0.24 on Debian Linux and have a problem with a very large blob insert query - it always fails with "#2020: Got packet bigger than 'max_allowed_packet'". I searched the docs and found some references that this value can not be greater than 1 GB with MySQL 4.x - indeed

Re: Debugging batch sql statements

2007-10-05 Thread Arun
Baron, I am sourcing it. I do not know if that is the best way though.. I am running the insert statement from a mysql prompt in a linux/windows machine. My script has a single build script which sources other scripts. build.sql == source ./ddl/useraccount/useraccountddl.sql source ./mobchanne

Re: Debugging batch sql statements

2007-10-05 Thread Jørn Dahl-Stamnes
On Friday 05 October 2007 16:50, Arun wrote: > Baron, > I am sourcing it. I do not know if that is the best way though.. I am > running the insert statement from a mysql prompt in a linux/windows > machine. > My script has a single build script which sources other scripts. > build.sql > == > s

do I need two tables or one will do just fine?

2007-10-05 Thread Afan Pasalic
hi, I have a employees table (first name, last_name, address, city, state, zip, phone,...). though, I got a requested to add additional info about people, like phone_extension, zip+4, nick, DOB... that will not be used very often. what would be better solution: a) add these columns to employees

Re: DROP TRIGGER IF EXISTS throws error??

2007-10-05 Thread Jesse
Are you sure that's the exact query and error message? The query has a backtick; the error message has none, which is unusual for a purely syntactic error. It makes me suspicious that the error is coming from something else: maybe a subtly mangled file. I found the problem. When I ran the M

RE: do I need two tables or one will do just fine?

2007-10-05 Thread Jerry Schwartz
Unless you expect to have more than one set of "additional information" per person, then you should add the new fields to your existing records. Don't worry too much about space, it doesn't sound like you will be adding that much. I don't think that adding a new table improves normalization; in fa

Re: Debugging batch sql statements

2007-10-05 Thread Arun
I just want to see the original insert statement which failed, so that I can do a search on it. Is there any option for seeing the insert statement that gets executed and the error line next to next.? On 10/5/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: > > Arun wrote: > > I have a large batch of

RE: do I need two tables or one will do just fine?

2007-10-05 Thread Daevid Vincent
A wise man once taught me, "organization is the key to success". Put all the data in the same table you have. 200k people is nothing for mySQL to handle, and the cost of an extra JOIN is going to be a nightmare to deal with all the time. I thought I learned/read somewhere a long time ago that u

how to select second records in a group

2007-10-05 Thread Steve Kiehl
I was a bit stumped on a good method to select the second record for each distinct group in a table. Say I have a table like the following: NAME DATE AMOUNT joe 2007-10-03 19:44:57 45 joe 2007-10-06 19:46:18 90 joe 2007-10-07 19:37:21 12 matt2007-10-0

Re: how to select second records in a group

2007-10-05 Thread Baron Schwartz
Hi Steve, Steve Kiehl wrote: I was a bit stumped on a good method to select the second record for each distinct group in a table. Say I have a table like the following: NAME DATE AMOUNT joe 2007-10-03 19:44:57 45 joe 2007-10-06 19:46:18 90 joe 2007-10-07 19:37:21