select * from table
where
strcol REGEXP ^[[:digit:]]+$
order by strcol
Regards
Dan
-Original Message-
From: Prospect'In [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 28 February 2002 11:31 a.m.
To: [EMAIL PROTECTED]
Subject: Order by on Alphnumeric
sql,query
Good
David,
I think the nominal minimum word length is 4 so 'fiat' will not be indexed.
This can be modified however.
regards,
Dan
-Original Message-
From: David yahoo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 28 February 2002 12:28 p.m.
To: [EMAIL PROTECTED]
Subject: ignore words in
Perhaps this is something like what your looking for?
select
substring(round(number,digits) ,1,instr(round(number,digits),'.')+digits) as
roundednumber,digits,number
from testme
Regards,
Dan
-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 27 February
Have privileges changed?
Dan
-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 27 February 2002 11:55 a.m.
To: DL Neil
Cc: MySQL List
Subject: Re: SET field=field+1 no longer works?
Well, here's the query that PHP is generating:
UPDATE users
You could create a table that is the combination of manufacturer and
products table, with identical column and key information as the custom
table -- call this say manprod table, then create a merge table from the
manprod and custom table, and run one select query against the newly created
merge
SQL statement are:
What is proper way to define a variable to include all dates newer than
1995-01-01?
$query = ???
select * from table where date '1995-01-01'
What is proper way to define a variable to include all dates older than
1995-01-01?
$query = ???
select * from table where
Change it to
INSERT into book(
isbn,
title,
authlname,
authfname,
publisher,
pubdate,
dewey,
lcnum
)
values (
'1-56592-434-7',
'MySQL mSQL',
'Yarger',
'Randy Jay',
O'Reilly,
null,
null,
null
),
what about
RENAME current_table temp_table
CREATE TABLE current_table (identical create_definition to current_table
except adding the datetime column type) select * from temp_table
checking here
DROP TABLE temp_table
Regards,
Dan
-Original Message-
From: Laszlo G. Szijarto
Jamie,
I think your approach of a cross-reference table is a good start. This is
similar to creating a stemming index. Perhaps you might like to look into,
for example, some perl Modules for stemming (like Linga::Stem) to further
reduce your data space.
Perhaps since there may be a large
If you only interested in getting the overall sum from the child tables you
could try the following:
1)
Change your child create statements to:
CREATE TABLE child1
(
auto_nr int(11) unsigned zerofill NOT NULL,
link int(11) unsigned ,
value int(11),
PRIMARY KEY auto_nr(auto_nr),
KEY
I presuming you are expecting more results from the first select statement,
hence the reason and indicating this in the second, should then your first
statement be:
select edate from traffic where year(edate)='2001' group by
edate;
?
Regards,
Dan
-Original Message-
From: [EMAIL
it?
R.B.Roa
Traffic Management Engineer
PhilCom Corporation
Tel.No. (088) 858-1028
Mobile No. (0919) 30856267
-Original Message-
From: Daniel Rosher [SMTP:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 11:15 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED
use LAST_INSERT_ID() to get the last inserted id
http://www.mysql.com/doc/G/e/Getting_unique_ID.html
and
'The most recently generated ID is maintained in the server on a
per-connection basis. It will not be changed by another client. It will not
even be changed if you update another
You can also try:
Select SUBSTRING( MAX( CONCAT(LPAD(calltime,6,'0'),finishcode) ), 7) AS
finishcode,
0+LEFT( MAX( CONCAT(LPAD(calltime,6,'0'),finishcode )), 6) AS calltime
From callhistory As H,calllist As L
where
H.rowid = L.rowid
group by H.rowid
This is from:
What about REPLACE?
http://www.mysql.com/doc/R/E/REPLACE.html
'REPLACE works exactly like INSERT, except that if an old record in the
table has the same value as a new record on a unique index, the old record
is deleted before the new record is inserted'
Regards,
Dan
-Original
David,
try
1) create temporary table x (a INT PRIMARY KEY AUTO_INCREMENT)
[select_statement]
where [select_statement] is some legal select statement, presumebly
select g.Description,sum(i.Retail_Value)
from Groups g, Item i
where i.Group_ID =g.Group_ID
and i.Group_ID 0
group by i.Group_ID
http://www.mysql.com/doc/N/u/Numeric_types.html
20 is the display width:
'for a column declared as INT(5) ZEROFILL, a value of 4 is retrieved as
4'
Regards
Dan
-Original Message-
From: John D. Kirkpatrick [mailto:[EMAIL PROTECTED]]
Sent: Friday, 15 February 2002 12:27 p.m.
To:
on that client connection).
So... if there is a way to set the interactive_timeout to
infinite, that would
be most handy.
Regards,
Becky
Daniel Rosher wrote:
If you set the interactive_timeout to infinite then no clients will get
disconnected until the server is restarted. I know the perl DBI
This may be due to 'max_allowed_packet' size ... have a look at
http://www.mysql.com/doc/P/a/Packet_too_large.html
This is configurable
Regards,
Dan.
-Original Message-
From: Alain Fontaine - Consultant and developer
[mailto:[EMAIL PROTECTED]]
Sent: Friday, 8 February 2002 1:30
http://www.mysql.com/doc/p/e/perror.html
use perror to get more information:
Error code 2: No such file or directory
Regards,
Dan
-Original Message-
From: user lacko [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 12 February 2002 4:15 a.m.
To: MYSQL
Subject: error messages
Try
1) create table c as select a,b as b1,b as b2 ... from a
2) drop a;
3) alter table c rename to a;
Instead of 2) you can rename the table and drop later, or tar-up the
.MYI,.MYD and .frm files for the table before doing the above.
Regards,
Dan
-Original Message-
From: Keith A.
If you set the interactive_timeout to infinite then no clients will get
disconnected until the server is restarted. I know the perl DBI allows for a
client to implement ping ($dbh-ping) ... this will reset the timeout for
that particular client, allow the client to check for connectivity, without
You can do the following to remove duplicates:
- create table foo as select distinct cols from
table_name_containing_duplicates;
- drop table_name_containing_duplicates;
- alter table foo rename to table_name_containing_duplicates;
Done.
Now, make a primay key for the new table!! -- this will
From the Manual (21.11 Problems with File Permissions)
By default MySQL will create database and RAID directories with permission
type 0700. You can modify this behavior by setting the UMASK_DIR variable.
If you set this, new directories are created with the combined UMASK and
UMASK_DIR. For
24 matches
Mail list logo