473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

mysql 5 functions

I downloaded mysql, I did rpm -e to take out the 3.22 from my box (
mandrake 9.x)
I put MySQL 5, because someone told me it supports at last functions..
If anybody knows, can someone tell me, whether I can make functions like
in sql server of microsoft or not?
I want to implement some basic statistical functions like mean ,
deviation e.t.c.
But what I found on net is about UDF and staff for compiling mysql again
for native code...
I didn't find much for functions...
some examples also for procedures didn;t work...

Another thing, I noticed that some of those examples were on a file in
the disk in some mysql place...In windows environment that should be
under c:\mysql. In Linux?
Feb 10 '06 #1
7 3300
Be aware that mysql has those funcs built into sql. std and others as
well. I dont have it in front of me. Check the doc.

Feb 10 '06 #2
"Dimitris Mexis" <m6*@vivodinet.gr> wrote in message
news:ds**********@ulysses.noc.ntua.gr...
I want to implement some basic statistical functions like mean, deviation
...
Before implementing new functions, see if MySQL already provides the ones
you need. It provides AVERAGE(), STDDEV_POP(), STDDEV_SAMP(), VAR_POP() and
VAR_SAMP.
Docs can be found here:
http://dev.mysql.com/doc/refman/5.0/...functions.html

I assume AVERAGE is the arithmetic mean. AFAIK, MySQL does not provide a
function for the geometric mean.
Another thing, I noticed that some of those examples were on a file in the
disk in some mysql place...In windows environment that should be under
c:\mysql. In Linux?


The command "rpm -ql" should list the files installed by an RPM package.

Regards,
Bill K.
Feb 10 '06 #3
m6s
sm****@acm.org wrote:
Be aware that mysql has those funcs built into sql. std and others as
well. I dont have it in front of me. Check the doc.

I understand that and I am about to check it, but what if I want to add
new functions?
I guess normal and binomial distributions are not in a packet such as a
database!
Feb 10 '06 #4
m6s
Hmm
I found my error was that I didn't use the switch of delimiter...
BUT!
in functions now how can I accomplish the operator like?

select suma(price) from tblEmployee where tblEmployee like pName

this in the function produces error because it dislikes the 'like'
?!?!?
Feb 10 '06 #5
m6s
Ok I got it!
I had not used the switch of delimiter....
fool of me :-)

Thank you!
Feb 10 '06 #6
"m6s" <m6*@vivodinet.gr> wrote in message
news:ds***********@ulysses.noc.ntua.gr...
select suma(price) from tblEmployee where tblEmployee like pName

this in the function produces error because it dislikes the 'like'
?!?!?


Tables aren't like values -- fields are like values.

e.g.
select suma(price) from tblEmployee where tblEmployee.someFieldName like
pName

Regards,
Bill K.
Feb 10 '06 #7
m6s
I cancelled this message to be seen, but it seems that pop3 decided to
show it...pf!
:-)
Yes i saw my error, and was tricky as I was frustrated from the build up
proccess of the function...
for some 500 rows, the deviation gave me 0.09 seconds
I have mysql 5, on a pentium celeron 366
is this time good enough for this PC?
if I place it on a 64bit server let's say, would this be drastically
eliminated?
In the bottom line what i am interested in is thefact that I do some
statistical computations and I want to be "web"...so I am trying to see
the best solution for the speed...mysql functions...PHP functions...or
some user-client-windows environment....
if for only 500 rows takes 0.09 and make mysql seem as stack..not good...

any suggestion?
Feb 10 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pjotr Wedersteers | last post by:
I noticed both dlls in the package. I read MySQLi offers Improved MySQL support when using MySQL 4.1 or higher Can anyone tell me in layman's terms why and when I want to use this instead of...
0
by: Philip Stoev | last post by:
Hi all, Please tell me if any of this makes sense. Any pointers to relevant projects/articles will be much appreciated. Philip Stoev http://www.stoev.org/pivot/manifest.htm ...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
3
by: slash | last post by:
Hi , Im new to MySql and i have no idea how to convert a sql server user defined function to MySql. Can any one help me.. CREATE FUNCTION ChildCategories (@categoryId int, @taxId int,...
175
by: Sai Hertz And Control Systems | last post by:
Dear all, Their was a huge rore about MySQL recently for something in java functions now theirs one more http://www.mysql.com/doc/en/News-5.0.x.html Does this concern anyone. What I...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
18
by: Bruce A. Julseth | last post by:
I have the following code $Host = "localhost"; $User = "Fred"; $Database = "house"; $Password = "mypw" echo "before mysqli<br />Host: " . $Host . "<br />" . $User . "<br />" . $Database;
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
1
ssnaik84
by: ssnaik84 | last post by:
Hi Guys, Last year I got a chance to work with R&D team, which was working on DB scripts conversion.. Though there is migration tool available, it converts only tables and constraints.. Rest of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.