Aw: Re: Retrieve most recent of multiple rows

2013-03-14 Thread Stefan Kuhn
> not all the rows, only the distinct q_id, The subquery will give all distinct q_ids, but the select from in(subquery) will give everything, because each row must have a q_id which is returned by the subquery. The query after all says "select all rows where the q_id is one of the q_ids occuring

Aw: SELECT subquery problem

2013-02-05 Thread Stefan Kuhn
You cannot do this. A sql result alwas has the same number of columns in each row. You could have null or "" in the column, though. This could be done via the if(,,)-statement of mysql or by using a union and two selects, one for pub_email=n and the other for the rest. Gesendet: Dienstag, 05.

Re: UDF behaves non-deterministic

2012-11-07 Thread Stefan Kuhn
not, the man page will likely suggest a threadsafe alternative if > one is available. If none are available, you might have to consider a > mutex. > > - michael dykman > > On Mon, Nov 5, 2012 at 9:28 AM, Stefan Kuhn wrote: > > Hi Dan, > > > > thanks for your

Re: UDF behaves non-deterministic

2012-11-05 Thread Stefan Kuhn
On Monday 05 November 2012 18:02:28 h...@tbbs.net wrote: > >>>> 2012/11/04 22:23 +0000, Stefan Kuhn >>>> > > select * from table order by udf(column, 'input_value') desc; > For my understanding, this should give the same result always. > <<&

Aw: Re: UDF behaves non-deterministic

2012-11-05 Thread Stefan Kuhn
Hi Dan, thanks for your answer. The UDF only contains functions (the one called in sql plus two functions called in it). There are no variables outside them and nothing is declared static. All variables inside the functions are declared just like "double x=0;" etc. I am not an expert on C, but

Re: UDF behaves non-deterministic

2012-11-04 Thread Stefan Kuhn
vocations.. the order by > clause is frequently referred to in the process of sorting.. keeping that > static instead of dynamic might sanitize your issue. > > On 2012-11-04 4:24 PM, "Stefan Kuhn" wrote: > > Hi all, > I have a weired (for me at least) problem with

UDF behaves non-deterministic

2012-11-04 Thread Stefan Kuhn
Hi all, I have a weired (for me at least) problem with a user defined function, written in C. The function seems to return different results in different runs (the code of the function does not contain random elements). Basically, the function calculates a score based on a column in a table and

Re: get a partial dump

2012-10-24 Thread Stefan Kuhn
ere clause. > > On Thursday, October 18, 2012, Stefan Kuhn wrote: > > Hi everybody, > > I want to get insert statements from a mysql database for a number of > > rows of > > a table, specified by a where clause. I also need the inserts for the > > datasets linked

get a partial dump

2012-10-22 Thread Stefan Kuhn
Hi everybody, I want to get insert statements from a mysql database for a number of rows of a table, specified by a where clause. I also need the inserts for the datasets linked via foreign keys in other tables. So I need a sort of partial dump, a bit like mysqldump, but restricted to a (small)

Re: Simple Query Question

2012-04-14 Thread Stefan Kuhn
On Saturday 14 April 2012 09:51:11 Willy Mularto wrote: > Hi, > Please help what is wrong with this simple query "SELECT COUNT(key_agent) > total FROM agents_consolidated WHERE total = 180" Thanks. You need to use having instead of where, see the documentation. Stefan > > > > Willy Mularto > F300H

Re: Putting two queries in one

2007-07-16 Thread Stefan Kuhn
a > union select f1,f3 from test.flipdata order by 1; Query OK, 0 rows affected > (0.00 sec) > > mysql> select * from test.RotatedData; > +--+--+ > > | f1 | f2 | > > +--+--+ > > | 1 | a| > |1 | b| > |2 | c| > |

Putting two queries in one

2007-07-16 Thread Stefan Kuhn
view? It would need to be done in one query, if I understood it right. Anybody an idea? Thanks, Stefan -- Stefan Kuhn BSc MA IPB Halle AG Bioinformatik & Massenspektrometrie Weinberg 3 06120 Halle http://www.ipb-halle.de http://msbi.bic-gh.de [EMAIL PROTECTED] +49 (0) 345 5582 1474 Fax.+49 (0)

Re: Find records not in many-to-many table?

2006-03-26 Thread Stefan Kuhn
The query hit 6 million records before I aborted it . > > > > > > I'm certain this can be done ... I seem to remember a similar process > > > from the DB2 corporate days ... but I just cannot wrap my head around > > > it. Anybody have any ideas, please? > &

Re: Find records not in many-to-many table?

2006-03-25 Thread Stefan Kuhn
n be done ... I seem to remember a similar process from > the DB2 corporate days ... but I just cannot wrap my head around it. > Anybody have any ideas, please? > > Make a good day ... > ... barn -- Stefan Kuhn M. A. Cologne University BioInformatic

Re: Circular Replication

2005-10-27 Thread Stefan Kuhn
Am Thursday 27 October 2005 12:56 schrieb Raphaël 'SurcouF' Bordet: > Le vendredi 16 septembre 2005 à 18:14 +0200, Stefan Kuhn a écrit : > > I'm using it with four machines (geographically separate) and it works > > fine. Stefan > > And can writes on each s

Re: Need help with fulltext search and left join

2005-10-23 Thread Stefan Kuhn
gt; pn_coupons_network ON (pn_coupons_network.network_id = > pn_coupons_store.store_network_id) ORDER BY score DESC > > Thanks, > Grant > > > > __ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com -- S

Re: Circular Replication

2005-09-16 Thread Stefan Kuhn
#x27;re carefull with your client > applications and the way they write/update the db. Just wondering if > anyone has had success or problems with this type of situation. > > Thanks, > > Jeff -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.

Re: EOFException with jdbc driver

2005-09-15 Thread Stefan Kuhn
ver and your application > that times-out connections > 3) MySQL isn't crashing in between queries (see your mysql server error > log) Nothing in the log > > -Mark > > -- > Mark Matthews > MySQL AB, Software Development Manager - Connectivity > www.mysql.com --

EOFException with jdbc driver

2005-09-15 Thread Stefan Kuhn
-connector-java-3.1.7, Java 1.4.2. I did not find anything about how to resolve this and also not a real explanation what the error means. Any ideas? Thanks, Stefan -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel

Re: free MySQL conversion to MSSQL tool

2005-07-28 Thread Stefan Kuhn
Perhaps there are tools reading from a (mysql) db and writing to another (mssql) database via a programming language. But conversion of database files? I don't think this exists. Stefan > > Thank you > Andrew -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://

Re: Primary and Foreign Keys (Follow Up)

2005-06-15 Thread Stefan Kuhn
a one-to-many relation two tables make sense, but then your FK can't be unique. Stefan Am Wednesday 15 June 2005 12:41 schrieb Asad Habib: > As a follow up to my question, I did want to mention that the foreign key > I am using is unique. > > - Asad -- Stefan Kuhn M.

Re: ERROR 1111 (HY000): Invalid use of group function

2005-05-11 Thread Stefan Kuhn
ing_ID = 6030 > -> GROUP BY PRACT_NUMBER; > ERROR (HY000): Invalid use of group function > mysql> > > Can anyone tell me why this is happening? > > Thanks for your advice -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koel

Re: LIKE question - is it possible?

2005-04-14 Thread Stefan Kuhn
a query where the LIKE (or > anything else) searches for my given strings in any order. > I'm using MySQL 4.1.11 on windows XP, if it matters. > > Thanks. > Micha. -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47,

Re: Setting up a Chemical database

2005-04-04 Thread Stefan Kuhn
l products > in word format? How do I translate this into mysql tables? -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7428 Fax: +49 (0) 221-470-7786 My public PGP key is available at http://

Re: Queries taking 60 seconds+

2004-11-11 Thread Stefan Kuhn
composit indexes as suggested, does your performance > > improve? > > Erm, do you think it would? Its just that with such a large table and it > being compressed it takes ages? -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) ZÃlpicher St

Re: Mysqldump very slow

2004-10-28 Thread Stefan Kuhn
buffer_pool_size : 1000MB > > i am using --quick option in mysqldump > > Thanks > Anil > DBA -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7428 Fax: +49 (0) 221-470-7786

Re: great problem with questions

2004-09-23 Thread Stefan Kuhn
Am Thursday 23 September 2004 13:22 schrieb Stefan Kuhn: > This is probably due to having indexed only single columns. MySQL uses only > one index per column, meaning if you have a where with two conditions you Sorry, this should read "one index per table"... > need a com

Re: great problem with questions

2004-09-23 Thread Stefan Kuhn
> klientmiejscowosc, branzaslowa, branzaslowo, klientbranza, klientslowa, > klientslowo > where wojewodztwoid=7 AND klientulica.klientulica like'dwo%' AND > klient.klientid = klientulice.klientid AND klientulice.klientulicaid= > klientulica.klientulicaid AND klientmiejscowosc.klientmiej

Re: JOIN/WHERE and index confusion

2004-07-30 Thread Stefan Kuhn
sic about > > >>>>indexes. I have a SELECT like so: > > >>>> > > >>>>SELECT * > > >>>>FROM a > > >>>>LEFT JOIN b ON a.a_id = b.a_id > > >>>>JOIN c ON a.c_id = c.c_id > > >>>>JOIN d

Re: newbie join issue

2004-07-20 Thread Stefan Kuhn
d a number of selects that just sat and hung the computer. > I know I must be doing something wrong. I figure I'll need to do a left > join on it, but I've not had much experience with joins as such and I > need a little assistance. > > Can anyone help me work this out? If y

Re: Sql Query Issue

2004-07-12 Thread Stefan Kuhn
ual(s) or entities addressed. If you are not the > intended recipient, you are hereby notified that any copying, disclosing, > distributing, or use of this e-mail and/or attachment is strictly > prohibited. If you received this transmission in error please notify the > sender immediate

Re: Upgrade 4.1.1 to 4.1.2

2004-06-01 Thread Stefan Kuhn
t; I seem to always have this problem with rpm packages. > > What is the best way to get this installed? > > TIA > > Larry Lowry -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7428 F

Fwd: Re: Another Performance query

2004-03-22 Thread Stefan Kuhn
-- Weitergeleitete Nachricht -- Subject: Re: Another Performance query Date: Mon, 22 Mar 2004 16:13:29 +0100 From: Stefan Kuhn <[EMAIL PROTECTED]> To: A Z <[EMAIL PROTECTED]> Indices can never be used with like "%x" (but with like "x%). This

Re: Horizontal list...

2004-03-17 Thread Stefan Kuhn
ir is any why to obtain something like that : > +---++ > > | a | b | > > +---++ > > | 1 | 1,2,3 | > | 2 | 1,2 | > | 3 | 1 | > > +---++ > > Based on a group by or

Re: Replication broken after upgrade from 4 to 4.1

2004-03-08 Thread Stefan Kuhn
hanks, Stefan Am Friday 05 March 2004 19:23 schrieb Sasha Pachev: > Stefan Kuhn wrote: > > Hi everybody, > > I have three mysql servers doing a circular replication. They (still) run > > Redhat 7.3. I started with Mysql 3.23, upgraded to 4 and yesterday I > > tried 4.1. I&

Replication broken after upgrade from 4 to 4.1

2004-03-05 Thread Stefan Kuhn
uration, passwords etc. It's all the same. Something to note: The two servers able to replicate are in the same network, the one which makes trouble is in another, firewall protected network. Port 3306 is open in both firewalls and it always worked. Does anybody have any tips? Thanks a lot

Re: auto sorting

2004-01-25 Thread Stefan Kuhn
rst, a column which records the insert order (auto increment, timestamp ...) and, secondly, an order by in your select. No chance without these. > > thanks in advance, > -Lorderon -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) ZÃlpicher

Re: Problem with 'OR' statement

2004-01-09 Thread Stefan Kuhn
Am Friday 09 January 2004 17:57 schrieb Stefan Kuhn: > Am Friday 09 January 2004 17:22 schrieb Hunter, Jess: > > Could someone have a look at this syntax and give me some guidance what I > > may be overlooking? > > > > SELECT * from $TableName WHERE machinename

Re: Problem with 'OR' statement

2004-01-09 Thread Stefan Kuhn
mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.558 / Virus Database: 350 - Release Date: 1/2/04 -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) ZÃlpicher Str. 47, 50674 Cologne Tel: +49

Re: Problem with 'OR' statement

2004-01-09 Thread Stefan Kuhn
Jess > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.558 / Virus Database: 350 - Release Date: 1/2/04 -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) ZÃlpicher

Re: How to Uninstall Mysql

2003-12-20 Thread Stefan Kuhn
QL is available on > > > > the web at > > > > >>http://www.mysql.com > > >>Support MySQL by buying support/licenses at > > > > https://order.mysql.com > > > > >>[EMAIL PROTECTED] root]# mysql > > >>ERROR 2002

Re: Replication

2003-12-03 Thread Stefan Kuhn
aster. That's > >>why it's a slave. > >> > >>I suspect you want each machine to be a Master and a slave. > > > >-- > >Lloyd Kvam > >Venix Corp. > >1 Court Street, Suite 378 > >Lebanon, NH 03766-1358 > > > >voice:

Re: Security Question

2003-11-26 Thread Stefan Kuhn
ftware?) and it might be that the files are spread all over the computer and hard to find. But basically, it is the same with oracle (but I never used oracle, this is common sense). Stefan -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher St

Re: Security Question

2003-11-26 Thread Stefan Kuhn
sibility for any breach of confidence, which may arise from the use > of email. Please note that any views or opinions presented in this email > are solely those of the author and do not necessarily represent those of > the Company. This message has been scanned for known computer viruses

Re: 2-way replication

2003-11-14 Thread Stefan Kuhn
n the application and there will never be same pks used on different machines. HTH Stefan -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7428 Fax: +49 (0) 221-470-7786 My public PGP key

Re: insert ... select .. order by, problem

2003-09-02 Thread Stefan Kuhn
> > ----- Original Message - > From: "Stefan Kuhn" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 02, 2003 6:57 AM > Subject: Re: insert ... select .. order by, problem > > > Hi, > > I think you can't do this. The

Re: insert ... select .. order by, problem

2003-09-02 Thread Stefan Kuhn
> > So you see what I mean ? > > thanks ! > > ______ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http

Re: insert ... select .. order by, problem

2003-09-02 Thread Stefan Kuhn
(but > the two users used to access the DB are different, > the mysql cli user is root, and the other just have > enough permissions to select, > update,delete and insert in the tables). > > I would like to know (if that is possible) what > happens. > > Thanks in advance. &g

Replication with multiple servers in Mysql ?

2003-08-26 Thread Stefan Kuhn
(until the server is back, obviously). Does anybody have an idea how to establish such a replication in a fail-save manner ? Thanks, Stefan -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7428 Fax: +49 (

Doing a count of a count in mysql

2003-06-11 Thread Stefan Kuhn
from SPECTRUM where SPECTRUM.REVIEW_FLAG ="true" group by count(*),MOLECULE_ID; but this seems not possible. Anybody any idea ? Thanks a lot Stefan -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel: +49(0)221-4

Long text with index in InnoDB

2002-12-16 Thread Stefan Kuhn
so I can't use this either. Is there a solution, i.e. is there a data type for text longer 256 chars and with indexing in InnoDB ? Thanks for your answers Stefan -- Stefan Kuhn M. A. MPI of Chemical Ecology, Winzerlaer Str. 10, Beutenberg Campus, 07745 Jena, Germany Tel: +49(0)3641 5712

Re: Re: Re: Re: UNIQUE on blob

2002-07-12 Thread Stefan Kuhn
> Hi everybody, > my humble excuse to all I bothered with that ... mysql type mediumblob is working > perfectly, but there's another column in the tabel of type varchar > containing mostly the same values. So that's it > Stefan > > > P. S: I do the select first because I need the ID anyway. > > >

UNIQUE on blob

2002-07-11 Thread Stefan Kuhn
idea about how to solve this (I need the column to be case-sensitive). Many thanks Stefan -- Stefan Kuhn M. A. MPI of Chemical Ecology, Winzerlaer Str. 10, Beutenberg Campus, 07745 Jena, Germany Tel: +49(0)3641 571261 - Fax: +49(0)3641 5