!!
2005/6/29, Thomas Spahni [EMAIL PROTECTED]:
Hi all,
sometimes life would be easier with a more general 'REPLACE' function
available. That's when I find mysqlf dumping a database, editing with
sed
and reloading.
My feature request: a string editing function similar to sed's
s
Is this not the proper way to use a function in a select statement?
SELECT
t.field1,
t.field2,
functionPerformAdditionalQueryFromField(t.field2) AS 'customField'
FROM Table t
I'd like to perform the function on every row in the result set, and
store the returned value of that function in EACH
-
From: Scott Klarenbach [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 31, 2005 10:58 AM
To: My SQL
Subject: Call a function from a select statement?
Is this not the proper way to use a function in a select statement?
SELECT
t.field1,
t.field2
10:58 AM
To: My SQL
Subject: Call a function from a select statement?
Is this not the proper way to use a function in a select statement?
SELECT
t.field1,
t.field2,
functionPerformAdditionalQueryFromField(t.field2) AS 'customField'
FROM Table t
I'd like to perform
I am trying to figure something out about the compress function. If I
wanted to compress a field in a column/row and write it back to the table,
how can I do this? Is it possible to do it in one command? I tried:
update `conflicts` set `fname`=(SELECT compress(`fname`) FROM `conflicts`
WHERE
Steve Buehler [EMAIL PROTECTED] wrote on 05/11/2005 09:36:44 AM:
I am trying to figure something out about the compress function. If
I
wanted to compress a field in a column/row and write it back to the
table,
how can I do this? Is it possible to do it in one command? I tried:
update
From: Steve Buehler
I am trying to figure something out about the compress function. If I
wanted to compress a field in a column/row and write it back to the table,
how can I do this? Is it possible to do it in one command? I tried:
update `conflicts` set `fname`=(SELECT compress(`fname
At 08:50 AM 5/11/2005, you wrote:
Steve Buehler [EMAIL PROTECTED] wrote on 05/11/2005 09:36:44 AM:
I am trying to figure something out about the compress function. If I
wanted to compress a field in a column/row and write it back to the table,
how can I do this? Is it possible to do
(PRACT_NUMBER, 1, 4)) 1
- AND Booking_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
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http
'
- AND CHAR_LENGTH(PRACT_NUMBER) 4
- AND COUNT(SUBSTRING(PRACT_NUMBER, 1, 4)) 1
- AND Booking_ID = 6030
- GROUP BY PRACT_NUMBER;
ERROR (HY000): Invalid use of group function
mysql
Can anyone tell me why this is happening?
Because you cannot use aggregate functions in a WHERE clause.
WHERE determines
I would guess it's because you can't use an aggregate function in where, but
only in having. So use select group by PRACT_NUMBER having
COUNT(SUBSTRING(PRACT_NUMBER, 1, 4)) 1.
The reason is that where is applied before the count is done, whereas having
after that. And you can't select
'
- AND CHAR_LENGTH(PRACT_NUMBER) 4
- AND COUNT(SUBSTRING(PRACT_NUMBER, 1, 4)) 1
- AND Booking_ID = 6030
- GROUP BY PRACT_NUMBER;
ERROR (HY000): Invalid use of group function
mysql
Can anyone tell me why this is happening?
Because you cannot use aggregate functions in a WHERE
I have an ORDER statement like:
ORDER BY playlist.order_id ASC,RAND(playlistItems.playlist_order)
I am trying to get a random result very time the query is run ...
Unfortunately, this statement gives the SAME random result each time
how can I get mysql to randomly jumble the playlist items for a
got it to work
thanks
On May 10, 2005, at 7:22 PM, Graham Anderson wrote:
I have an ORDER statement like:
ORDER BY playlist.order_id ASC,RAND(playlistItems.playlist_order)
I am trying to get a random result very time the query is run ...
Unfortunately, this statement gives the SAME random
I have field varchar(20) that stores phone numbers. Phone number can
be in different format. So I need only digits from the field. How I
can do such replacement?
TH
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL
If I understand your problem, MySQL allows you to use regular
expressions - so you could use the REGEXP function to remove the
spaces. Check out the mysql site...
Chris
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL
Sadly, the REGEXP function is only for string comparison,
not substitution. You'll either have to handle the
replacement on the client side or string together an
unwieldy series of REPLACE functions, like so:
SET @phone = '(123) 456-7890';
SELECT
REPLACE(
REPLACE(
REPLACE(
REPLACE(@phone
Team,
I am trying to make apache-php and mysql work on Linux Redhat.
I have the following versions installed that came with Redhat Linux:
apache 2.0.46
mysql 3.23.58
php 4.3.2
I am getting the following error when I tried to connect to MySQL thru PHP.
Fatal error: Call to undefined function
with Redhat Linux:
apache 2.0.46
mysql 3.23.58
php 4.3.2
I am getting the following error when I tried to connect to MySQL thru PHP.
Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/includes/database.mysql.inc on line 31
Can anybody help? Your help
I am trying to return multiple values from a Function, not sure if it is
allowed:
delimiter |
create function cf_test()
returns integer, varchar(255)/* tried with semicolon after
varchar(255) */
begin
declare p_col2 smallint;
declare p_col3 varchar(255);
select col2, col3
Dear friends,
thanks for the link to the dev manual page on encryption function.
Which encryption is more secure (strongest)
AES
DES
SHA
?
I would have said AES, but after reading the manual chapters on DES, SHA I am
not s(ec)ure any more.
By the way, I did not understand if the bug
http
On Tuesday, March 22, 2005 07:15, symbulos partners wrote:
Dear friends,
thanks for the link to the dev manual page on encryption function.
Which encryption is more secure (strongest)
AES
DES
SHA
?
Are you using this for password storage or encrypting actual data?
If you are using
Hi everyone,
I'm following up on my own question. There appears to be a bug in the way
how QUOTE() interacts with the mysql client.
Using --raw mode can apparently solve the problem reported in my original
post:
shell mysql --raw -N -B -e SELECT QUOTE(sometext) FROM foo; test
'Pitt\'s Place'
to be leaving out the 3rd \.
http://dev.mysql.com/doc/mysql/en/string-syntax.html
Thomas, I think you should file a bug report on this. That way they FIX
the QUOTE() function. No middle-ground needed.
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
[EMAIL PROTECTED] wrote
employee
- order by if(fname is not null, 1, 2);
Works. Well, it executes, but it does not order by
the first or second column, just the natural order of
the table it seems.
One added feature is that our 'order by if' function
looks like this:
- order by if(fname is null, 0, 1);
Doing
Dear list,
I don't understand what happens here:
shell mysql -N -e SHOW VARIABLES LIKE 'version'; test
+-++
| version | 4.0.14-log |
+-++
shell mysql -e CREATE TABLE foo (sometext VARCHAR(255)); test
shell mysql -e INSERT INTO foo VALUES('Pitt\\'s
Hi,
I have the following problem, I'm converting from version 3.23.53 to
4.1.9
The following query was used
SELECT * FROM news WHERE languages_id = 'english' AND expiry_ts =
CURDATE() AND FCode = '999' AND DCode = 'Z999' ORDER by id DESC LIMIT 0,
3
it work perfectly on the version 3.23.53 (the
Donny Simonton wrote:
In our case we were using words, and phrases, so we would have something
like:
IN ('a', 'apple', 'apple car', 'car', 'c') etc...
We found that once it hits about 200 or so entries the query went from 0.00
seconds to about 2-3 seconds. Sometimes much more.
I would guess that
How to select datetime using UNIX_TIMESTAMP excluding Saturday and Sunday?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SELECT unix_timestamp(mydatetime), ... from mytable where
DAYNAME(mydatetime) is not in('Saturday','Sunday');
On Thu, 2005-02-17 at 16:34, Jerry Swanson wrote:
How to select datetime using UNIX_TIMESTAMP excluding Saturday and Sunday?
--
- michael dykman
- [EMAIL PROTECTED]
--
MySQL
I tried to find this function on the dev.mysql.com site, but good luck
finding in... ;-)
Can someone tell me what the maximum length is for this function?
SELECT * FROM foo WHERE bar IN(1,2,3,4,. N);
How many entries can there be in between 1 and N ? Hundreds? Thousands?
Millions
-Original Message-
From: Daevid Vincent
Sent: Wednesday, February 16, 2005 20:59
To: mysql@lists.mysql.com
Subject: What is the max length of IN() function?
I tried to find this function on the dev.mysql.com site, but good luck
finding in... ;-)
Can someone tell me what
To: Daevid Vincent
Cc: mysql@lists.mysql.com
Subject: RE: What is the max length of IN() function?
-Original Message-
From: Daevid Vincent
Sent: Wednesday, February 16, 2005 20:59
To: mysql@lists.mysql.com
Subject: What is the max length of IN() function?
I tried to find
PM
Subject: Undo function?
Hi,
I get very nervous when I log onto my database via SSH and type in queries
manually. Take the following query for example:
Delete FROM Users WHERE User_ID = 5;
If I hit return before I start typing WHERE then things would be
disastorous! Is there any type of undo
Hi,
I get very nervous when I log onto my database via SSH and type in queries
manually. Take the following query for example:
Delete FROM Users WHERE User_ID = 5;
If I hit return before I start typing WHERE then things would be
disastorous! Is there any type of undo function with MySQL
Hello,
I get very nervous when I log onto my database via SSH and type in queries
manually. Take the following query for example:
Delete FROM Users WHERE User_ID = 5;
If I hit return before I start typing WHERE then things would be
disastorous! Is there any type of undo function with MySQL
[snip]
I get very nervous when I log onto my database via SSH and type in
queries
manually. Take the following query for example:
Delete FROM Users WHERE User_ID = 5;
If I hit return before I start typing WHERE then things would be
disastorous! Is there any type of undo function with MySQL
would be
disastorous! Is there any type of undo function with MySQL?
[/snip]
You'll want to read this
http://dev.mysql.com/doc/mysql/en/COMMIT.html
And try:
$ mysql --i-am-a-dummy
that makes it refuse deletes without 'where'
Good luck,
Harmen
Subject: Undo function?
Hi,
I get very nervous when I log onto my database via SSH and
type in queries
manually. Take the following query for example:
Delete FROM Users WHERE User_ID = 5;
If I hit return before I start typing WHERE then things would be
disastorous! Is there any
Backups are good too :-)
Andy
-Original Message-
From: Artem Koltsov [mailto:[EMAIL PROTECTED]
Sent: 20 January 2005 15:06
To: mysql@lists.mysql.com
Subject: RE: Undo function?
Hello,
If you define table type as InnoDB, you can use transactions (see the link
below). You
[mailto:[EMAIL PROTECTED]
Sent: 20 January 2005 15:06
To: mysql@lists.mysql.com
Subject: RE: Undo function?
Hello,
If you define table type as InnoDB, you can use transactions (see the
link
below). You will need set AUTOCOMMIT=0, and after you can issue
COMMIT or
ROLLBACK at the end
That particular formula cannot handle ANY non-positive number because
the LOG() function is undefined for values less than or equal to zero.
I just reviewed the archives and realized that this point has never
been discussed before (I thought it had). Good catch.
well, the slow and dirty
Alex, you are correct.
That particular formula cannot handle ANY non-positive number because the
LOG() function is undefined for values less than or equal to zero. I just
reviewed the archives and realized that this point has never been
discussed before (I thought it had). Good catch
= the product.
What if the field contains the value of 0, than it doesn't works. 3*0 =
0, but it returns 1.
Alex, you are correct.
That particular formula cannot handle ANY non-positive number because the
LOG() function is undefined for values less than or equal to zero. I just
reviewed the archives
Michael Stassen wrote:
No, but Harold Fuchs gave the following solution to Shawn Green in an
earlier thread on this topic http://lists.mysql.com/mysql/166184.
EXP(SUM(LOG(COALESCE(*the field you want to multiply*,1)))
which works because LOG(xy) = LOG(x) + LOG(y), and EXP(LOG(x)) = x.
Hence,
John Visicaro wrote:
Hi,
This is my first post so I hope I've done it right. I am having trouble
querying an email address from MySQL and then placing that field into the
PHP mail function. It doesn't work. Here's my code:
$query_string = SELECT Email FROM instructors WHERE HSA_NO = '$insthsaid
Does anyone know what Column Type the result of the Year() function is?
In other words, if I execute:
select Year(Hiredate) as mycolname
from mytable;
is the result a smallint? a char()? a varchar()?
Unfortunately, the manual doesn't say and I can't think of a quick way to
figure it out
At 03:24 PM 12/17/2004, you wrote:
Does anyone know what Column Type the result of the Year() function is?
In other words, if I execute:
select Year(Hiredate) as mycolname
from mytable;
is the result a smallint? a char()? a varchar()?
Unfortunately, the manual doesn't say and I can't think
Rhino wrote:
Does anyone know what Column Type the result of the Year() function is?
In other words, if I execute:
select Year(Hiredate) as mycolname
from mytable;
is the result a smallint? a char()? a varchar()?
Unfortunately, the manual doesn't say and I can't think of a quick way to
figure
Hi,
This is my first post so I hope I've done it right. I am having trouble
querying an email address from MySQL and then placing that field into the
PHP mail function. It doesn't work. Here's my code:
$query_string = SELECT Email FROM instructors WHERE HSA_NO = '$insthsaid';
$result
Hello,
Is there a way to create my own function on MySQL (4.0.18)?
We have a site where a product can have it´s price in differents
currencies, so, I need to make a query that returns the correct
product´s price.
Thanks,
Ronan
--
MySQL General Mailing List
For list archives: http
- Original Message -
From: Ronan Lucio [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 16, 2004 7:36 AM
Subject: Function
Hello,
Is there a way to create my own function on MySQL (4.0.18)?
We have a site where a product can have it´s price in differents
Is there any way to make sum() return 0 instead of NULL when one or
more of the rows being sum()'d is null?
Phrased another way, is there a way to make mySQL treat NULL as 0
when dealing with mathematical functions?
Tim Gustafson
MEI Technology Consulting, Inc
[EMAIL PROTECTED]
(516) 379-0001
Hi Tim,
I guess you can add something like this
to your statement:
SELECT COALESCE( SUM(column) , 0 ) FROM ...
/Johan
Gustafson, Tim wrote:
Is there any way to make sum() return 0 instead of NULL when one or
more of the rows being sum()'d is null?
Phrased another way, is there a way to make mySQL
Is there any way to make sum() return 0 instead of NULL when one or
more of the rows being sum()'d is null?
Phrased another way, is there a way to make mySQL treat NULL as 0
when dealing with mathematical functions?
You can use ifnull
select sum(ifnull(points,0)) from abc;
Brad Eacker
Jay Blanchard [EMAIL PROTECTED] wrote on 12/16/2004
01:00:00 PM:
[snip]
Is there any way to make sum() return 0 instead of NULL when one or
more of the rows being sum()'d is null?
Phrased another way, is there a way to make mySQL treat NULL as 0
when dealing with mathematical functions?
[snip]
Is there any way to make sum() return 0 instead of NULL when one or
more of the rows being sum()'d is null?
Phrased another way, is there a way to make mySQL treat NULL as 0
when dealing with mathematical functions?
[/snip]
Use an IF...
SELECT SUM(IF(myColumn IS NULL, 0, myColumn)) AS
Thanks for all your responses. I went with the coalesce way - it works like a
charm.
Thanks again!
Tim Gustafson
MEI Technology Consulting, Inc
[EMAIL PROTECTED]
(516) 379-0001 Office
(516) 480-1870 Mobile/Emergencies
(516) 908-4185 Fax
http://www.meitech.com/
--
MySQL General Mailing List
Is there in the MySQL query language a function just like the SUM() but
instead of adding multiplying?
AC
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
of the product, so exp of the sum of the logs = exp of
the log of the product = the product.
Michael
Alex croes wrote:
Is there in the MySQL query language a function just like the SUM() but
instead of adding multiplying?
AC
--
MySQL General Mailing List
For list archives: http://lists.mysql.com
I just upgrade my MySQL from 4.0.20 to 4.1.7, however
i found new things here, password() function
in 4.0.20 - password(xxx) result in 5336eb751494bdb1
in 4.1.7 - password(xxx) result in *3E5287812B7D1F947439AC45E739353
how to get backward compatibility for this function ? since i use
password
PROTECTED] [EMAIL PROTECTED]
CC:
Subject: Different password() function ?
Sent: Fri, 03 Dec 2004 10:01:06 GMT
Received: Fri, 03 Dec 2004 09:51:54 GMT
Read: Fri, 03 Dec 2004 09:57:47 GMT
I just upgrade my MySQL from 4.0.20 to 4.1.7, however
i found new things here, password() function
in 4.0.20
/mycon
http://www.scibit.com/products/mysqlcomponents
http://www.scibit.com/products/mysqlx
http://www.scibit.com/products/mascon
-Original Message-
From: Ady Wicaksono [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
CC:
Subject: Different password() function ?
Sent: Fri
/mysql/data\
-DSHAREDIR=\/usr/local/mysql-4.1.7/share/mysql\ -DUNDEF_THREADS_HACK
-DDONT_USE_RAID -I. -I. -I.. -I../include -O3 -DDBUG_OFF -MT manager.lo -MD -MP
-MF .deps/manager.Tpo -c manager.c -fPIC -DPIC -o .libs/manager.o
manager.c: In function `mysql_manager_connect':
manager.c:136: warning
I need to make query that adds numbers. The fields are varchar format
so I have some value 12121 and some values 121212,121212.
I think I need string replace function that replace comma. What
function can do this?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
At 14:12 -0500 11/23/04, Jerry Swanson wrote:
I need to make query that adds numbers. The fields are varchar format
so I have some value 12121 and some values 121212,121212.
I think I need string replace function that replace comma. What
function can do this?
It's called REPLACE().
http
Dear list:
I have a short database with id,username
and password for authenticate my users with freeradius. The passwords are
encrypted through ENCRYPT() function. I´d like to know why ENCRYPT() function
doesn´t give the same encrypted string for a clear text string?.
e.g. In the first time
At 15:41 -0400 10/21/04, [EMAIL PROTECTED] wrote:
Dear list:
I have a short database with id,username and
password for authenticate my users with
freeradius. The passwords are encrypted through
ENCRYPT() function. I´d like to know why
ENCRYPT() function doesn´t give the same
encrypted string
Thank you very much Paul.
EDWIN LIMACHI N.
Phone. 591-2-2123978
Movil: 591-715-29967
Fax: 591-2-2123975
Paul DuBois [EMAIL PROTECTED]
21/10/2004 15:56
Para
[EMAIL PROTECTED],
[EMAIL PROTECTED]
cc
Asunto
Re: ENCRYPT() function
At 15:41 -0400 10/21/04, [EMAIL PROTECTED
|
+-+
| 565491d70401324 |
When I used char(15) the data was not complete.
What data type I should use for password function?
Actually, you should use a different function than PASSWORD(), which
should be used only in connection with account information in the
grant tables in the mysql database. SHA
Hi,
you might take a look at this thread:
http://lists.mysql.com/mysql/166184
/Johan
Hi,
I'm searching for a function that enables me to calculate the product of
a group of values, like SUM() does. MySQL server version is at least
4.0.14.
For example, a query like
SELECT id, PRODUCT(value
Hi,
you might take a look at this thread:
http://lists.mysql.com/mysql/166184
Thanks a lot - perfect. I was searching for a mathematical function too,
but I didn't cope it... this version works great!
Best regards,
Thomas
--
MySQL General Mailing List
For list archives: http
Hi Craig,
Sorry this is such a slow response but I have been swamped and I didn't
see where anyone else has responded yet.
First, we need to calculate the average ID per user but round the average
to the nearest whole number.
CREATE TEMPORARY TABLE tmpResults
SELECT cast((AVG(id)+ .5) as
Craig Hoffman wrote:
Mark,
Yes its close and thank you. The problem I am having is I am able to
generate the correct ranking.id for that particular user but I can't
seem to make it equal the ranking.rating.
ID ranking.rating
9 = 5.6 (example)
Here's my query:
SELECT routes.user_id,
Mark,
Yes its close and thank you. The problem I am having is I am able to
generate the correct ranking.id for that particular user but I can't
seem to make it equal the ranking.rating.
ID ranking.rating
9 = 5.6 (example)
Here's my query:
SELECT routes.user_id, ranking.rating,
Hi!
Anybody knows how to use CREATE PROCEDURE and CREATE FUNCTION in
4.1.1-alpha-Max.
I keep trying the CREATE PROCEDURE and CREATE FUNCTION examples found in
the MySQL web documentation, but there's no way to make it work. It
always prompts problems with syntax. Is delimiter a function
, 2004 8:23 AM
To: [EMAIL PROTECTED]
Subject: Using CREATE PROCEDURE/FUNCTION
Hi!
Anybody knows how to use CREATE PROCEDURE and CREATE FUNCTION in
4.1.1-alpha-Max.
I keep trying the CREATE PROCEDURE and CREATE FUNCTION examples found in
the MySQL web documentation, but there's no way to make
I think you'll find that 'create procedure' and 'create function' don't
appear until version 5.0 of MySQL.
Which is why you get a syntax (are you sure you have the right version?)
error.
Regards
Terry
- Original Message -
Hi!
Anybody knows how to use CREATE PROCEDURE and CREATE
Hey Everyone,
I can you some assistance on this query.
I have three tables one is called ranking and the other is called
routes and finally the users table. The users table is not really
important.
The ranking table looks like this:
id rating
1 5.0
2 5.1
3 5.2
4 5.3
Hi All,
Can someone point me a function that return the multiplication of query result..
Hack.. It's hard for me just to explain what I nedd..
Ok, it goes like the sum() function, but instead of the summary.. It
will return the multiplication Here is what I need it to do
x
---
1
2
3
4
- Original Message -
From: Leonardus Setiabudi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 22, 2004 11:45 PM
Subject: Function to multiply multiple row values
Hi All,
Can someone point me a function that return the multiplication of query
result..
Hack.. It's hard
x
---
1
2
3
4
Select sum(x) would return 10 right..
Now I need a function .. Say fx() so that when I issued
Select fx(x) ...
It would return 24 which is 1x2x3x4
I assume that the function that yielded 24 was fx(4), not fx(x). In high
school math, which was a *long
:58 AM
To: [EMAIL PROTECTED]
Subject: how to add time to NOW() function
i want to add time to NOW() function, that means something like this,
$addTime = 60;
NOW() + $addTime;
where 60 are seconds. I am not sure whether to add seconds or is there
any other format I can use to add time to NOW
i want to add time to NOW() function, that means something like this,
$addTime = 60;
NOW() + $addTime;
where 60 are seconds. I am not sure whether to add seconds or is there
any other format I can use to add time to NOW() function? please let me
know.
thanks in advance.
deepak
--
MySQL General
() function, that means something like this,
$addTime = 60;
NOW() + $addTime;
where 60 are seconds. I am not sure whether to add seconds or is there
any other format I can use to add time to NOW() function? please let me
know.
thanks in advance.
deepak
--
MySQL General Mailing
Use
DATE_ADD(NOW(),INTERVAL 1 HOUR)
Or
DATE_ADD(NOW(),INTERVAL 60 MINUTE)
Or
DATE_ADD(NOW(),INTERVAL 3600 SECOND)
-Original Message-
From: Deepak Dhake [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 07, 2004 1:58 AM
To: [EMAIL PROTECTED]
Subject: how to add time to NOW() function
Message-
From: Victor Pendleton [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 12:27 PM
To: Christopher L. Hood; '[EMAIL PROTECTED] '
Subject: RE: Date Conversion Function
I do not know of an MM() date function in MS SQL, only mm used for the
date
part. What are you attempting
M$ SQL server has a function MM that will do some date conversion, is
there an equivalent in MySQL ??
Chris Hood
Investigator Verizon Global Security Operations Center
Email: [EMAIL PROTECTED]
Desk: 972.399.5900
Verizon Proprietary
NOTICE - This message and any attached files may
Not being an MSSQL expert, I don't know what MM does, and since you did not specify
what type of conversions you wish to perform, I can't say exactly which function would
suit your needs, but here is a link to the manual page that lists all date and time
functions --
http://dev.mysql.com/doc
I do not know of an MM() date function in MS SQL, only mm used for the date
part. What are you attempting to accomplish?
-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 7/29/04 11:17 AM
Subject: Date Conversion Function
M$ SQL server has a function MM that will do
Green
Database Administrator
Unimin Corporation - Spruce Pine
Scott Fletcher [EMAIL PROTECTED] wrote on 07/27/2004 05:29:05 PM:
I'm having a little bit of a trouble with the use of the SQL function...
What I have here is a webpage that show the row of data, the web user
get to click
you wanted. Please, let's try
again. Please, show me the results of just a plain ORDER BY field_name
query (without the CHAR() function) and explain to me what is wrong...
Yours,
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Scott Fletcher [EMAIL PROTECTED] wrote on 07/28
sorted according to the rules built into the characterset being used
(see table above).
So, please try to explain again why an ORDER BY fieldname (without any
sort of conversion function on your field) does not work as you want it
to.
Thank you for your patience with me,
Shawn Green
Database
Googling for the documents, here is a link to the MySQL
manual that heads up the section on almost all of the functions in MySQL:
(http://dev.mysql.com/doc/mysql/en/Functions.html). May I suggest you look
at the Date_Format() function as an easier method to re-format your dates
for display
I'm having a little bit of a trouble with the use of the SQL function...
What I have here is a webpage that show the row of data, the web user
get to click on the field to sort the row by the field name. So, when I
use order by char(field_name), the data doesn't turned out right in
alpha-numeric
Hi,
What SQL function do I need to convert timestamp 200406011403 into
2004-06-01 14:03 ?
Thanks,
JS.
_
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger
--
MySQL General Mailing List
For list
In MySQL you can do that with: DATE_FORMAT
DATE_FORMAT (column_name,'%Y-%m-%d %H:%i')
-Mensaje original-
De: J S [mailto:[EMAIL PROTECTED]
Enviado el: Miércoles, 14 de Julio de 2004 08:26 a.m.
Para: [EMAIL PROTECTED]
Asunto: sql function for timestamp
Hi,
What SQL function do I need
While in PHP you can try something like this...
$date_added = $row['date_added'];
$date = date(M d, Y, strtotime($date_added));
echo $date;
H and i do work in PHP as well, I believe, if you want to add the hour and
seconds. Check out the 'date' function in PHP for info
' ), or, as far as I can tell, you will probably be better off just
using string functions.
Wes
On Jul 14, 2004, at 10:25 AM, J S wrote:
Hi,
What SQL function do I need to convert timestamp 200406011403 into
2004-06-01 14:03 ?
Thanks,
JS
as well, I believe, if you want to add the hour and
seconds. Check out the 'date' function in PHP for info.
- Eve
In MySQL you can do that with: DATE_FORMAT
DATE_FORMAT (column_name,'%Y-%m-%d %H:%i')
-Mensaje original-
De: J S [mailto:[EMAIL PROTECTED]
Enviado el: Miércoles, 14 de Julio de
301 - 400 of 906 matches
Mail list logo