create temporary table foo as select patientnumber, count(*) as rcount
from source_table
group by patientnumber
having count(*) > 1;
select count(*) from foo;
-Original Message-
From: Jon Rosenberg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 1:29 PM
To: [EMAIL PROTECTED]
Sub
seems to me that the first query uses your primary key index. Since you have
specified qualifications on crcid and tag in both aliases, it will resolve
to a small number of rows in each alias table. The second query will join
your aliases on the crcid index, and then the tag qualifications will
r
last_insert_id is a function. It will return a value for each row in the
table. You want to run:
select last_insert_id() as lid;
instead of selecting from a table.
-Original Message-
From: Graeme B. Davis [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 3:17 PM
To: [EMAIL PROTECT
isn't this the expected behavior?
(1008306000-988344000)/86400 = 231.04
select mod(231.04,7);
0
231.04 mod 7 is .04, rounded down to 0. 7*33=231
the mod function rounds the result - that's expected, right? Other than that
I don't see what the problem is.
braxton
-Original Message-
Fr
howzabout
SELECT Table1.id, Table1.name, count(1/(Table2.offon = 'off')) AS NOFF
FROM Table1 , Table2
WHERE Table1.id = Table2.id
GROUP BY Table1.id, Table1.name
HAVING NOFF=0;
works for me:
mysql> create table Table1 (id int, name varchar(10));
Query OK, 0 rows affected (0.01 sec)
mysql> crea
I think this is an interesting question. Note the following:
count(col1) will tell you the number of non-null occurrences of col1
col1=value will return 1 is col1=value, 0 if col1<>value
1/0 will return null
thus,
count(1/(col1=value)) will tell you the number of occurences of value in
col1.
t
if you are using tcsh:
set docroot='path to your html root directory'
find $docroot -name "*.html"> allhtml.list
foreach FILE (`cat allhtml.list`)
echo $FILE >> outhtml.list
grep 'link' $FILE >> outhtml.list
end
you can get more sophisticated than this, but this will work. then look
through outht
the name you are getting is random. you want:
create temporary table t1 as
select distance, min(speed) fastest_speed
from table1 group by distance;
select table1.name, table1.distance, table1.speed from
table1, t1
where table1.distance=t1.distance
and table1.speed=t1.fastest_speed;
P.S. I think
Andrzej,
As I understand it,
MySQL does not have the concept of tablespaces like in Oracle. Databases are
subdirectories underneath the /var/lib/mysql directory and files are tables
within those subdirectories, so you can put an entire database or individual
files on a different disk by creating
why are you using distinct(ref1)?
also count(*) is ambiguous in this case. should be count(a.*).
you have a ref1 column in both tables, but you don't join them on it. that's
kind of confusing but won't cause the problem. member_id is the primary key
on the members table, right? Otherwise you co
I think your problem is at the netscape<>apache level, not the mysql level.
Can you view static html pages served by your local apache with netscape?
since netscape, opera, and IE all connect to apache, and then apache calls
perl to connect to mysql, I doubt your problem has anything to do with
Robbason
Cc: Mysql
Subject: Re: max FULLTEXT index size?
Hi!
On Apr 19, Braxton Robbason wrote:
> Hi all,
>
> I'm creating a fulltext index on a 400MB table, and the creation process
> gets very slow. It's fast for the first 50MB of the index, and then it
> grinds to what seem
you want a function that prepends the letter a to the category/subcategory
names that are not other. then you order by that function, but do not
display it.
select category,subcategory from foo2
order by if(category=
'other','zz',concat('a',category));
i.e. everything except other begins with an
John,
I don't think anyone can say for sure which is 'better'. MySQL is used in a
different kind of environment than Oracle. Oracle is designed for an
enterprise environment, where many different applications are used
simultaneously to add or retrieve data from a central data store. MySQL is
de
select word, count(word) as total
from search_words
where word is not null
group by word
order by total desc
limit 20
-Original Message-
From: Graham Nichols [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 1:36 PM
To: [EMAIL PROTECTED]
Subject: Correct syntax?
Thanks for help
Hi all,
I'm creating a fulltext index on a 400MB table, and the creation process
gets very slow. It's fast for the first 50MB of the index, and then it
grinds to what seemed like a halt after days. My question is - is there
anyone who's created fulltext indexes on this much data who can assure m
http://www.mysql.com/doc/M/a/Mathematical_functions.html
describes how to do this using the RAND() function.
-Original Message-
From: Alec Smith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 6:27 PM
To: [EMAIL PROTECTED]
Subject: How to structure a random query
I'm just
I thought I read that was in the plan for 4.0. I can't find where that's
stated in the docs though - all I see is the stuff about boolean operators.
Does anyone have experience with using the AOL PLS package for text
searching? I am thinking of using it.
Braxton
-Original Message-
Fro
18 matches
Mail list logo