Invalid syntax with STD() function when more than one field is used in select query

2006-07-20 Thread William Bronsema
Hello, I am encountering a strange issue when using the STD function. On my local development machine (MYSQL version 4.18-nt) I can run the following basic SELECT query with no problems: SELECT STD(`LAPSETIME`),UKEY FROM 4b3f91f64a19529a84dff4982c8a6bc5 GROUP BY UKEY When I test this query

Partition Linear Hast with function how expre

2006-07-14 Thread Eduardo Garcia
Hi People I want make a partition using a Lineas Hash, but i need use mu personal function how hash key, show my function and my create table and error --- Function --- CREATE FUNCTION Get_Client_Creative (creative INT) RETURNS INT BEGIN DECLARE client INT; SELECT P.client_id into client FROM

Re: help with locate() function and index

2006-06-24 Thread kevin vicky
to use locate() function to get position of a substring in a text field which on average has 2000 characters and the search substring is 30 -50 characters long. The table has around 2 million records and looking for a efficient way to do the search. I tried fulltext index but dint see any difference

help with locate() function and index

2006-06-23 Thread kevin vicky
Hi, I am trying to use locate() function to get position of a substring in a text field which on average has 2000 characters and the search substring is 30 -50 characters long. The table has around 2 million records and looking for a efficient way to do the search. I tried fulltext index

Re: help with locate() function and index

2006-06-23 Thread John Hicks
kevin vicky wrote: Hi, I am trying to use locate() function to get position of a substring in a text field which on average has 2000 characters and the search substring is 30 -50 characters long. The table has around 2 million records and looking for a efficient way to do the search. I tried

problem with coalesce function

2006-04-24 Thread pedroverissimo
When I use coalesce function I receive this error: FUNCTION sirius.coalesce does not exist. sirius is the name of db. Can someone help me with this error Thanks, Pedro ___ O SAPO já está livre de vírus com a Panda Software, fique

Re: problem with coalesce function

2006-04-24 Thread Martijn Tonies
When I use coalesce function I receive this error: FUNCTION sirius.coalesce does not exist. sirius is the name of db. Can someone help me with this error Sure: use functions that exist. Now, if you want a better answer, try asking a better question. Showing us the code, for example, would

RE: problem with coalesce function

2006-04-24 Thread Logan, David (SST - Adelaide)
PM To: mysql@lists.mysql.com Subject: problem with coalesce function When I use coalesce function I receive this error: FUNCTION sirius.coalesce does not exist. sirius is the name of db. Can someone help me with this error Thanks, Pedro

RE: problem with coalesce function

2006-04-24 Thread Pedro Verissimo
Australia invent --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, 24 April 2006 7:47 PM To: mysql@lists.mysql.com Subject: problem with coalesce function

Re: problem with coalesce function

2006-04-24 Thread Martijn Tonies
Hello Pedro, MySQL version is 5.0.19. Runs in Win. XP pack 2. I put sql in command line and i try using jdbc. The code: SELECT mfn,COALESCE (user_id,0) FROM hits WHERE mfn =1; Although it sounds silly, remove the space between COALESCE and the ( That should do the trick. Martijn Tonies

Re: next, prev, records in MySql. Handler Function

2006-02-22 Thread sheeri kritzer
). But when I use your example in the shell mode it works perfect. Have you ever tried to use this kind of statements using PHP?. It is because I would like to use it in a PHP script (I was exploring this function to make a navigator which sends me to the next record each time I click

JOINs with result of aggregate function fails with error #1054

2006-02-21 Thread Guillaume Boissiere
a join with the result of an aggregate function (in this case MAX(id)) in one query, or do I have to use multiple queries for this? Thanks in advance! Guillaume

Re: JOINs with result of aggregate function fails with error #1054

2006-02-21 Thread gerald_clark
DESC Is there a way to do a join with the result of an aggregate function (in this case MAX(id)) in one query, or do I have to use multiple queries for this? Thanks in advance! Guillaume You cannot join on an aggregate function. The value of maxid cannot be determined until after the join

Re: JOINs with result of aggregate function fails with error #1054

2006-02-21 Thread SGreen
ON l2.id=maxid WHERE l.is_visible='1' GROUP BY l.host_address ORDER BY maxid DESC Is there a way to do a join with the result of an aggregate function (in this case MAX(id)) in one query, or do I have to use multiple queries for this? Thanks in advance! Guillaume You you will have

Re: next, prev, records in MySql. Handler Function

2006-02-21 Thread Alvaro Cobo
perfect. Have you ever tried to use this kind of statements using PHP?. It is because I would like to use it in a PHP script (I was exploring this function to make a navigator which sends me to the next record each time I click on a link generated from a MySQL query). Thanks a lot and very grateful

Re: next, prev, records in MySql. Handler Function

2006-02-15 Thread sheeri kritzer
: For example: from a set of values in one field: 1,2,5,8,9,11,13 I'd like to retrieve a record (8) and also the previous one (5) and the next one (9) (so the record set would be: 5,8,9) I have found the Handler function in the Manual, but it and keeps giving me errors (I have also checked

next, prev, records in MySql. Handler Function

2006-02-08 Thread Alvaro Cobo
to retrieve a record (8) and also the previous one (5) and the next one (9) (so the record set would be: 5,8,9) I have found the Handler function in the Manual, but it and keeps giving me errors (I have also checked in the manual and it seems to work with MySql 4.1.x) /* --Start example

Re: replacement for Oracle initcap function

2006-02-07 Thread Gleb Paharenko
wrote: I am finishing up on performing an Oraclectomy on a bunch of legacy java code (don't ask why the DBA got stuck w/this - sore subject) and have one outstanding problem to solve: Oracle has a function, initcap(), which capitalizes the 1st character of each word and lowercases the rest

replacement for Oracle initcap function

2006-02-06 Thread Sid Lane
I am finishing up on performing an Oraclectomy on a bunch of legacy java code (don't ask why the DBA got stuck w/this - sore subject) and have one outstanding problem to solve: Oracle has a function, initcap(), which capitalizes the 1st character of each word and lowercases the rest. for example

Re: default characterset of function string parameter

2006-01-30 Thread Gleb Paharenko
| | character_set_server | latin1 | | character_set_system | utf8| +--+-+ 6 rows in set (0.00 sec) mysql DELIMITER // mysql CREATE FUNCTION parametercharset( s CHAR(20) ) - RETURNS CHAR(50) CHARACTER SET binary - DETERMINISTIC RETURN CONCAT

default characterset of function string parameter

2006-01-29 Thread Hirofumi Fujiwara
(0.00 sec) mysql DELIMITER // mysql CREATE FUNCTION parametercharset( s CHAR(20) ) - RETURNS CHAR(50) CHARACTER SET binary - DETERMINISTIC RETURN CONCAT( s, ':', CHARSET(s) ); - // Query OK, 0 rows affected (0.00 sec) mysql DELIMITER ; mysql SELECT parametercharset('hello

Re: How to define utf8 function

2006-01-10 Thread Gleb Paharenko
Hello. This is still a bug. See: http://bugs.mysql.com/bug.php?id=16330 Hirofumi Fujiwara wrote: Hi, Hello. This should be fixed in 5.0.18. See: http://bugs.mysql.com/bug.php?id=13909 17.2.1. CREATE PROCEDURE and CREATE FUNCTION http://dev.mysql.com/doc/refman/5.0

Re: How to define utf8 function

2006-01-04 Thread Hirofumi Fujiwara
Hi, Hello. This should be fixed in 5.0.18. See: http://bugs.mysql.com/bug.php?id=13909 17.2.1. CREATE PROCEDURE and CREATE FUNCTION http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html says ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - As of MySQL 5.0.18

Re: Fw: Re: create function with space

2005-12-30 Thread Gleb Paharenko
Hello. Sorry. It seems that I've understood your question now. In my opinion, IGNORE_SPACE not related to CREATE FUNCTION statement, because at: http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html for some cases we have to use a space between the name and the following

Re: create function with space

2005-12-29 Thread Gleb Paharenko
,ERROR_FOR_DIVISION_BY_ZERO'. Note,IGNORE_SPACE not include sql mode. But i still execute statement as follow : CREATE FUNCTION wangxu.user () RETURNS int(11) BEGIN return 1; END

Fw: Re: create function with space

2005-12-29 Thread wangxu
Yes,I already read this section. But, maybe there are haven't relation to my question. Are the effect of setting IGNORE_SPACE in sql mode allowing add space between function name and (? If my attitude is right,then if i haven't setting IGNORE_SPACE in sql mode,I shouldn't add space between

create function with space

2005-12-28 Thread wangxu
I set my sql_mode = 'STRICT_TRANS_TABLES,ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO'. Note,IGNORE_SPACE not include sql mode. But i still execute statement as follow : CREATE FUNCTION wangxu.user () RETURNS int(11) BEGIN return 1

Re: this listserv function...?

2005-12-20 Thread Stephen Moretti
Jim Winstead wrote: This is addressed in the FAQ for the mailing lists. http://lists.mysql.com/faq.php#replyto Jim Winstead MySQL Inc. Times and technology change. Take a look at the changes to MySQL server and the internet in general since 2000. That's all I'm going to say as there

Re: Re-REQUEST: proper way to export with the --tab function???

2005-12-20 Thread Hassan Schroeder
Bruce Carey wrote: - my problem is that when a text field, with html in it, it makes it into several hundred recs Well, that's strange -- I use mysqldump to dump/xfer/load records with fields containing HTML regularly, using the mysqldump defaults, and have no problems. Have you tried the

this listserv function...?

2005-12-19 Thread Bruce Carey
I am experiencig an odd thing when usig this listserv. When replying to posts, my replies are being addressed to the sender, not going back to the list. Does this list not have the reply-to enabled? Going to be annoying to have to watch that all the time. Let me know, thanks, Bruce. --

Re: this listserv function...?

2005-12-19 Thread SGreen
Bruce Carey [EMAIL PROTECTED] wrote on 12/19/2005 11:29:56 AM: I am experiencig an odd thing when usig this listserv. When replying to posts, my replies are being addressed to the sender, not going back to the list. Does this list not have the reply-to enabled? Going to be annoying to

Re: this listserv function...?

2005-12-19 Thread Rhino
- Original Message - From: [EMAIL PROTECTED] To: Bruce Carey [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Monday, December 19, 2005 11:56 AM Subject: Re: this listserv function...? Bruce Carey [EMAIL PROTECTED] wrote on 12/19/2005 11:29:56 AM: I am experiencig an odd thing

Re: this listserv function...?

2005-12-19 Thread Jim Winstead
This is addressed in the FAQ for the mailing lists. http://lists.mysql.com/faq.php#replyto Jim Winstead MySQL Inc. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re-REQUEST: proper way to export with the --tab function???

2005-12-19 Thread Bruce Carey
I posted this earlier, could someone take a look at it? TIA, Bruce. On Mon, 19 Dec 2005 02:15:54 -0500 Bruce Carey [EMAIL PROTECTED] wrote: Hi List, I have recently had a crash coursh in the fineer points of db recovery due to a mis-managed server. Could someone help me out with advice

Re: Re-REQUEST: proper way to export with the --tab function???

2005-12-19 Thread Hassan Schroeder
Bruce Carey wrote: I posted this earlier, could someone take a look at it? In the time since you first posted, you could have at least glanced at the Fine Manual :-) which shows that: mysqldump --opt --fields-terminated-by='\t' --fields-optionally-enclosed-by='#*#*#' q Any of the field- or

Re: Re-REQUEST: proper way to export with the --tab function???

2005-12-19 Thread Bruce Carey
Great, that's further than I was before... SO, about the problem of enclosing the fields: - if I am going to have and \r and \n in fields, what should I enclose them with? - my problem is that when a text field, with html in it, it makes it into several hundred recs - maybe a different

Re: Re-REQUEST: proper way to export with the --tab function???

2005-12-19 Thread Bruce Carey
Great, that's further than I was before... SO, about the problem of enclosing the fields: - if I am going to have and \r and \n in fields, what should I enclose them with? - my problem is that when a text field, with html in it, it makes it into several hundred recs - maybe a different

Re: this listserv function...?

2005-12-19 Thread Joshua J. Kugler
On Monday 19 December 2005 08:21, Rhino said something like: While Reply to all has the desired effect, I've always found it a pain-in-the-ass. I subscribe to a handful of other mailing lists and I always forget when my replies should be sent with Reply and when they should be sent with Reply

How to define utf8 function

2005-12-18 Thread Hirofumi Fujiwara
Dear MySQL fans, I want to make a function which returns utf8 string. mysql CREATE FUNCTION hello() RETURNS CHAR(20) CHARACTER SET utf8 - RETURN 'japanese-string'; Query OK, 0 rows affected (0.02 sec) mysql SELECT hello(); +-+ | hello

Re: How to define utf8 function

2005-12-18 Thread Gleb Paharenko
Hello. This should be fixed in 5.0.18. See: http://bugs.mysql.com/bug.php?id=13909 Hirofumi Fujiwara wrote: Dear MySQL fans, I want to make a function which returns utf8 string. mysql CREATE FUNCTION hello() RETURNS CHAR(20) CHARACTER SET utf8 - RETURN 'japanese

proper way to export with the --tab function

2005-12-18 Thread Bruce Carey
Hi List, I have recently had a crash coursh in the fineer points of db recovery due to a mis-managed server. Could someone help me out with advice on the proper syntax for doing mysqldump? I have a rather large db (4.2GB), and regular dump files get easily corrupted, so I found out, plus

Re: proper way to export with the --tab function

2005-12-18 Thread Jørn Dahl-Stamnes
On Monday 19 December 2005 08:15, Bruce Carey wrote: Hi List, I have recently had a crash coursh in the fineer points of db recovery due to a mis-managed server. Could someone help me out with advice on the proper syntax for doing mysqldump? I have a rather large db (4.2GB), and regular

using a function to define default col value?

2005-12-12 Thread Vince LaMonica
this: alter table example_table alter column aba_order_number set default IF(LEFT(order_number,4) = 'ABA-',REPLACE(order_number, 'ABA-', ''),''); doesn't seem to make a difference, as it assigns the string IF(LEFT... as the default text, instead of seeing it as a function. The reason I am using

Re: using a function to define default col value?

2005-12-12 Thread SGreen
of seeing it as a function. The reason I am using an IF() is because some order_number values will not contain a leading ABA- string. I'm using 4.1.13, FWIW. Thanks for any tips y'all might have. /vjl/ First - THANK YOU for remembering to post your version! Quoting from http

What is MYSQL equivalent to Oracle's NVL function?

2005-11-29 Thread sol beach
The subject says it all!

Re: What is MYSQL equivalent to Oracle's NVL function?

2005-11-29 Thread Cal Evans
http://dev.mysql.com/doc/refman/4.1/en/control-flow-functions.html ifNULL() =C= www.calevans.com sol beach wrote: The subject says it all! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Error with PHP: undefined function: mysql_connect()

2005-11-28 Thread sheeri kritzer
(binary RPM install) as per versions given below. Getting error in vegadns package (DJB TinyDNS GUI) : Fatal error: Call to undefined function: mysql_connect() in /home.www/html/vegadns/src/connect.php Some diagnostics I ran for info on version etc.: [EMAIL PROTECTED] src]# mysqladmin -u

Re: Error with PHP: undefined function: mysql_connect()

2005-11-28 Thread Ciprian Constantinescu
error: Call to undefined function: mysql_connect() in /home.www/html/vegadns/src/connect.php Some diagnostics I ran for info on version etc.: [EMAIL PROTECTED] src]# mysqladmin -u root ping mysqld is alive [EMAIL PROTECTED] src]# mysqladmin -u root debug [EMAIL PROTECTED] src]# mysqladmin -u

Re: Error with PHP: undefined function: mysql_connect()

2005-11-28 Thread Octavian Rasnita
From: Ciprian Constantinescu [EMAIL PROTECTED] In PHP 4.1 you have to include the mysql.so extension. To do so, you have to modify php.ini, extensions section Or better, add that extension runtime because otherwise it will just consume computer resources, and maybe not every PHP program will

Re: Error with PHP: undefined function: mysql_connect()

2005-11-28 Thread Ciprian Constantinescu
This solution is valid, but not advisable. If you run your server in a production environment, you shouldn't allow the dl function, as your users could activate any extension Or better, add that extension runtime because otherwise it will just consume computer resources, and maybe not every PHP

Error with PHP: undefined function: mysql_connect()

2005-11-24 Thread Sanjay Arora
Please help. Newbie running Centos 4.2 with mySQL PHP (binary RPM install) as per versions given below. Getting error in vegadns package (DJB TinyDNS GUI) : Fatal error: Call to undefined function: mysql_connect() in /home.www/html/vegadns/src/connect.php Some diagnostics I ran for info

Re: Error with PHP: undefined function: mysql_connect()

2005-11-24 Thread Gleb Paharenko
in vegadns package (DJB TinyDNS GUI) : Fatal error: Call to undefined function: mysql_connect() in /home.www/html/vegadns/src/connect.php Some diagnostics I ran for info on version etc.: [EMAIL PROTECTED] src]# mysqladmin -u root ping mysqld is alive [EMAIL PROTECTED] src]# mysqladmin

Re: Function Does Not Exist

2005-11-20 Thread Pyt
fccamp.sp_InsertNewCamper does not exist. However, it DOES exist. I can see it. It's named exactly the same, there are no misspellings or anything. One other difference is that this is calling it a function where it is actually a procedure. I could make this a function, I guess, however, I don't

Re: what function could detect a row locked by other client ?

2005-11-19 Thread Gleb Paharenko
by key xxxtable+xxxrow , but others may not update other database on the same server . What function could detect a row locked (by select ... update) by other client ? Best regard! Shuming Wang wang shuming wrote: -- For technical support contracts, goto https://order.mysql.com/?ref=ensita

Function Does Not Exist

2005-11-18 Thread Jesse Castleberry
execute this code, I get the error, #42000FUNCTION fccamp.sp_InsertNewCamper does not exist. However, it DOES exist. I can see it. It's named exactly the same, there are no misspellings or anything. One other difference is that this is calling it a function where it is actually a procedure. I could

Re: Function Does Not Exist

2005-11-18 Thread Peter Brawley
Jesse, I'm using the following code in my ASP.NET application to add a new record to the database, and return the added ID: You may have persuaded dotNet that your sproc returns something, ie that it is a function, but you apparently created it as a procedure. An sproc returns nothing. PB

what function could detect a row locked by other client ?

2005-11-18 Thread wang shuming
Hi, I know select .. update could lock selected rows, if the connection not release the lock, others always wait. If I use get_lock() to get a logical lock by key xxxtable+xxxrow , but others may not update other database on the same server . What function could detect a row locked (by select

Re: what function could detect a row locked by other client ?

2005-11-18 Thread Rhino
I know a lot more about DB2, my main database, than MySQL. However, MySQL frequently does the same things in the same ways as DB2. _If_ MySQL behaves the same way as DB2 in this regard - and I do not know if it does - there is no function to determine if a given resource is locked. Instead

GROUP BY Destroys 2nd Function

2005-10-28 Thread David Blomstrom
I have a PHP script that displays data like this: Eurasia Eurasiasupisland/sup Africa Where Eurasia and Africa are mainland parents of ecological regions and Eurasiasupisland/sup is a parent of an ecological system that is associated with a continent. For example, Borneo would be

Re: GROUP BY Destroys 2nd Function

2005-10-28 Thread Jigal van Hemert
David Blomstrom wrote: I have a PHP script that displays data like this: Eurasia Eurasiasupisland/sup Africa Where Eurasia and Africa are mainland parents of ecological regions and Eurasiasupisland/sup is a parent of an ecological system that is associated with a continent. For example, Borneo

Re: GROUP BY Destroys 2nd Function

2005-10-28 Thread David Blomstrom
--- Jigal van Hemert [EMAIL PROTECTED] wrote: ANIMALS TABLE Canis_lupus | wolf Panthera_tigris | tiger JOIN TABLE SPECIES | ECOREGION Canis_lupus | NA1008 Canis_lupus | NA1010 ECOREGIONS TABLE ID | NAME | Geog | Geog2 NA1008 | Alaska tundra | na | na IM1003 |

Re: GROUP BY Destroys 2nd Function

2005-10-28 Thread SGreen
Everything snipped David, is it at all intuitive to organize your geography into a tree-type structure? Here is an example: Western Hemisphere (hemisphere) C. America (continent) Guatemala (country) N. America (continent) Canada (country)

Re: GROUP BY Destroys 2nd Function

2005-10-28 Thread David Blomstrom
--- [EMAIL PROTECTED] wrote: Everything snipped David, is it at all intuitive to organize your geography into a tree-type structure? Here is an example: Western Hemisphere (hemisphere) C. America (continent) Guatemala (country) N. America (continent)

Function to show when a field's value was last updated

2005-10-18 Thread Mark
Hi, I need it some info to help a client defend against a legal challenge. Is there a MySQL function that will allow me to ascertain the date and time that a particular field's value was last updated. I can't find anything in the MySQL documentation. Thanks very much. Mark -- Fast

Re: Function to show when a field's value was last updated

2005-10-18 Thread Rich
Unfortunately that would have to be designed into the system into a field. When updated, the instructions would be to instruct that field to update. Cheers Mark: I need it some info to help a client defend against a legal challenge. Is there a MySQL function that will allow me to ascertain

Re: Function to show when a field's value was last updated

2005-10-18 Thread Alec . Cawley
news [EMAIL PROTECTED] wrote on 17/10/2005 15:45:15: I need it some info to help a client defend against a legal challenge. Is there a MySQL function that will allow me to ascertain the date and time that a particular field's value was last updated. I can't find anything in the MySQL

Re: Function to show when a field's value was last updated

2005-10-18 Thread Peter Brawley
I need it some info to help a client defend against a legal challenge. Is there a MySQL function that will allow me to ascertain the date and time that a particular field's value was last updated. I can't find anything in the MySQL documentation. MySQL doesn't store change histories. That's

Re: concat() function

2005-10-12 Thread Luciano Centeno
I'm sorry, my mistake. The type definition is *nloc_num,ins_numero and ins_digi are decimal(5,0) 2005/10/11, Luciano Centeno [EMAIL PROTECTED]: hello, my friends, the query option 1 return the right value, the query option 2 not. Why concat function make the difference? *nloc_num,ins_numero

concat() function

2005-10-11 Thread Luciano Centeno
hello, my friends, the query option 1 return the right value, the query option 2 not. Why concat function make the difference? *nloc_num,ins_numero and ins_digi are decimal(3,0) / option 1 .- select max(bi_num) as num from b_inmuebles

Re: concat() function

2005-10-11 Thread Gleb Paharenko
, the query option 2 not. Why concat function make the difference? *nloc_num,ins_numero and ins_digi are decimal(3,0) / option 1 .- select max(bi_num) as num from b_inmuebles where concat(nloc_num) =3D 1

FROMAT function - German Notation

2005-09-28 Thread Benedikt Hartmann
How can I display the result of the FROMAT function in german notation like '#.###,##'? I found no better way then this: code REPLACE(REPLACE(REPLACE( FORMAT(money,2),'.','x'),',','.'),'x',',') as ge_money /code does anybody know a solution? thank's for help Benedikt -- MySQL General Mailing

Re: Stored function

2005-09-02 Thread Martijn Tonies
I'm running MySQL 4.0.23-standard, and trying to create a stored function. Am I doing something wrong, or can I not create a stored function in 4.0.23? What I want is a stored function to take an int from a column and alter it (mask off the low 16-bits). SQL-query : CREATE FUNCTION hello

Re: DIV-function?

2005-09-01 Thread Nuno Pereira
Martijn Tonies wrote: I wonder how I'll get a div-function in SQL? I dunno, maybe by looking in the manual? From [1]: Division: mysql SELECT 3/5; - 0.60 [1] http://dev.mysql.com/doc/mysql/en/arithmetic-functions.html Gustav is looking for the DIV-function. But it is there |DIV

Stored function

2005-09-01 Thread Dan Baker
I'm running MySQL 4.0.23-standard, and trying to create a stored function. Am I doing something wrong, or can I not create a stored function in 4.0.23? What I want is a stored function to take an int from a column and alter it (mask off the low 16-bits). SQL-query : CREATE FUNCTION hello( s

Re: DIV-function?

2005-08-31 Thread Joachim Klöfers
Jasper Bryant-Greene schrieb: Gustav Wiberg wrote: Hi there! I wonder how I'll get a div-function in SQL? I dunno, maybe by looking in the manual? From [1]: Division: mysql SELECT 3/5; - 0.60 [1] http://dev.mysql.com/doc/mysql/en/arithmetic-functions.html

Re: DIV-function?

2005-08-31 Thread Joachim Klöfers
Jasper Bryant-Greene schrieb: Gustav Wiberg wrote: Hi there! I wonder how I'll get a div-function in SQL? I dunno, maybe by looking in the manual? From [1]: Division: mysql SELECT 3/5; - 0.60 [1] http://dev.mysql.com/doc/mysql/en/arithmetic-functions.html Gustav is looking

Re: DIV-function?

2005-08-31 Thread Jasper Bryant-Greene
Joachim Klöfers wrote: Jasper Bryant-Greene schrieb: Gustav Wiberg wrote: Hi there! I wonder how I'll get a div-function in SQL? I dunno, maybe by looking in the manual? From [1]: Division: mysql SELECT 3/5; - 0.60 [1] http://dev.mysql.com/doc/mysql/en/arithmetic-functions.html

Re: DIV-function?

2005-08-31 Thread Martijn Tonies
I wonder how I'll get a div-function in SQL? I dunno, maybe by looking in the manual? From [1]: Division: mysql SELECT 3/5; - 0.60 [1] http://dev.mysql.com/doc/mysql/en/arithmetic-functions.html Gustav is looking for the DIV-function. But it is there |DIV

DIV-function?

2005-08-30 Thread Gustav Wiberg
Hi there! I wonder how I'll get a div-function in SQL? I want to divide to columns and make a new column based on the result. /G @varupiraten.se

DIV-function?

2005-08-30 Thread Gustav Wiberg
Hi there! I wonder how I'll get a div-function in SQL? I want to divide to columns and make a new column based on the result. /G @varupiraten.se

Re: DIV-function?

2005-08-30 Thread Jasper Bryant-Greene
Gustav Wiberg wrote: Hi there! I wonder how I'll get a div-function in SQL? I dunno, maybe by looking in the manual? From [1]: Division: mysql SELECT 3/5; - 0.60 [1] http://dev.mysql.com/doc/mysql/en/arithmetic-functions.html -- Jasper Bryant-Greene Freelance web developer http

Re: How to include a dynamic function result in a view?

2005-08-16 Thread sascha
, the date_sub function is replaced by its result, though, so that the view does not generate dynamic results: show create table dateTest; CREATE ALGORITHM=UNDEFINED VIEW `kurse`.`dateTest` AS select sql_no_cache `kurse`.`tDay`.`theDate` AS `theDate` from `kurse`.`tDay` where (`kurse`.`tDay

How to include a dynamic function result in a view?

2005-08-15 Thread sascha
view dateTest as select * from tDay where theDate date_sub( now(), interval 1 day); On creating the view, the date_sub function is replaced by its result, though, so that the view does not generate dynamic results: show create table dateTest; CREATE ALGORITHM=UNDEFINED VIEW `kurse

Re: How to include a dynamic function result in a view?

2005-08-15 Thread Gleb Paharenko
create a view from it: create view dateTest as select * from tDay where theDate date_sub( now(), interval 1 day); On creating the view, the date_sub function is replaced by its result, though, so that the view does not generate dynamic results: show create table dateTest

Re: concat function problems

2005-07-29 Thread averyanov
resuming all above i can say that to my greatest regret nobody even expects what the matter is :( so i'll just try to install a newer version of server hoping the bug will disappear -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: concat function problems

2005-07-29 Thread averyanov
PS after mysql reinstallation (upgrade from 4.1.12 to 4.1.13) from source code with EXACTLY THE SAME ./configure options as before and the SAME configuration file everything is OK -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: concat function problems

2005-07-27 Thread Nuno Pereira
Hello Averyanov, [EMAIL PROTECTED] wrote: Hello Nuno, Tuesday, July 26, 2005, 8:53:33 PM, you wrote: [EMAIL PROTECTED] wrote: (...) When i try to execute the following query (...) i get this error: ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect...

Re: concat function problems

2005-07-27 Thread averyanov
Hello Nuno, Tuesday, July 26, 2005, 8:53:33 PM, you wrote: [EMAIL PROTECTED] wrote: (...) When i try to execute the following query (...) i get this error: ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id:6 Current database: test

concat function problems

2005-07-26 Thread averyanov
i've got a strange problem with concat() function i have the following data structure: CREATE TABLE table1 ( field1 int(11) NOT NULL auto_increment, PRIMARY KEY (field1) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=3; CREATE TABLE table2 ( field2 varchar(255) NOT NULL default

Re: concat function problems

2005-07-26 Thread Michael Stassen
[EMAIL PROTECTED] wrote: i've got a strange problem with concat() function i have the following data structure: CREATE TABLE table1 ( field1 int(11) NOT NULL auto_increment, PRIMARY KEY (field1) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=3; CREATE TABLE table2 ( field2

Re: concat function problems

2005-07-26 Thread Nuno Pereira
[EMAIL PROTECTED] wrote: (...) When i try to execute the following query (...) i get this error: ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id:6 Current database: test ERROR 2013 (HY000): Lost connection to MySQL server during query

Re: concat function problems

2005-07-26 Thread averyanov
Hello mysql, i've got a strange problem with concat() function i have the following data structure: CREATE TABLE table1 ( field1 int(11) NOT NULL auto_increment, PRIMARY KEY (field1) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=3; CREATE TABLE table2 ( field2 varchar

[Fwd: Re: DROP FUNCTION doesn't work]

2005-07-18 Thread Nuno Pereira
[EMAIL PROTECTED] wrote: mysql create function betatouni returns string soname 'libbeta2.so'; ERROR 1026 (HY000): Error writing file 'mysql.func' (errno: 121) Using perror from Linux, I saw: $ perror 121 Error code 121: Remote I/O error You probably have communications problems. Maybe you

Re: DROP FUNCTION doesn't work

2005-07-15 Thread Gleb Paharenko
Hello. Please check, if weird behavior remains on the latest release (4.1.12). Try to run FLUSH PRIVILEGES after 'drop function' statement and cast a look if mysql.func table is clear. Do you use xxx_deinit in your udf? I mean, is it possible that your function has some problem during

DROP FUNCTION doesn't work

2005-07-14 Thread jeremy_march
I can successfully LOAD a UDF in mysql-4.1.10, but I can't DROP it. MySQL reports that the DROP FUNCTION was OK, but the function still shows up in the mysql.func table. The function no longer works, but I have to TRUNCATE the mysql.func table in order to be able to LOAD it again. I am doing

Stored function problems (Was: UDF failure)

2005-07-07 Thread Nic Stevens
are the versions from, respectively, the MySQL cli, the MySQL server and my Linux and following that is a transcript from the mysql cli trying to create the hello function. mysql Ver 14.11 Distrib 5.0.7-beta, for pc-linux-gnu (i686) using readline 4.3 mysqld Ver 5.0.7-beta-standard for pc-linux-gnu

Re: Stored function problems (Was: UDF failure)

2005-07-07 Thread Paul DuBois
doesnt work for me either. Below are the versions from, respectively, the MySQL cli, the MySQL server and my Linux and following that is a transcript from the mysql cli trying to create the hello function. mysql Ver 14.11 Distrib 5.0.7-beta, for pc-linux-gnu (i686) using readline 4.3 mysqld Ver

Re: Stored function problems (Was: UDF failure)

2005-07-07 Thread Peter Brawley
Nic, At the end of the func, your sproc delimiter // needs to come before restoration of the semi-colon as delimiter, thus: DELIMITER // CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR(50) RETURN CONCAT('Hello, ',s,'!'); // DELIMITER ; PB - Nic Stevens wrote: Hi, Still having

A more general REPLACE(STR,FROM_STR,TO_STR) function

2005-06-29 Thread Thomas Spahni
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/regexp/replacement/ command to work on the contents of CHAR

Re: A more general REPLACE(STR,FROM_STR,TO_STR) function

2005-06-29 Thread Pooly
That I'd love to have a regex_replace available in MySQL !! 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

<    1   2   3   4   5   6   7   8   9   10   >