Re: Function

2014-12-17 Thread shawn l.green
On 12/12/2014 2:38 PM, Alexander Syvak wrote: Hello! How is actually a function done internally in MySQL after CREATE FUNCTION statement? Why can't there be a dynamic SQL inside a function? Sorry for the delay. The answer is embedded in this description of what is or is not al

Function

2014-12-12 Thread Alexander Syvak
Hello! How is actually a function done internally in MySQL after CREATE FUNCTION statement? Why can't there be a dynamic SQL inside a function?

Re: Calling function, that operates on another database

2014-04-08 Thread Larry Martell
On Tue, Apr 8, 2014 at 4:15 PM, bars0.bars0.bars0 wrote: > Hi all. > > I have standard select statement and on one column I want to run function, > that will connect to another database (same server). > Is this possible? > > High level example: > > SELECT db1.clients

RE: Calling function, that operates on another database

2014-04-08 Thread David Lerer
-6522 | Fax: (646) 487-1569 | dle...@univision.net | www.univision.net -Original Message- From: bars0.bars0.bars0 [mailto:bars0.bars0.ba...@gmail.com] Sent: Tuesday, April 08, 2014 4:16 PM To: mysql@lists.mysql.com Subject: Calling function, that operates on another database Hi all. I

Calling function, that operates on another database

2014-04-08 Thread bars0.bars0.bars0
Hi all. I have standard select statement and on one column I want to run function, that will connect to another database (same server). Is this possible? High level example: SELECT db1.clients.client_id, getTurnover(db1.clients.client_id) FROM db1.clients; AND getTurnover($id) body would

Re: function INTERVAL in view

2012-09-18 Thread hsv
-critical) Version:6.0, 5.4, 5.1 OS:Any Seems it arouses little interest. I ask meself whether to add my complaint to it. Turns out that for my problem it is enough to add 24 and divide by 20 and round down--but that is much moare opaque than INTERVAL(Mean, 6, 18, 36, 72). Actually, I hav to i

RE: function INTERVAL in view

2012-09-17 Thread Steven Staples
> -Original Message- > From: Rick James [mailto:rja...@yahoo-inc.com] > Sent: September 17, 2012 3:04 PM > To: peter.braw...@earthlink.net; mysql@lists.mysql.com > Subject: RE: function INTERVAL in view > > INTERVAL is a keyword. This is probably the root of the h

RE: function INTERVAL in view

2012-09-17 Thread Rick James
INTERVAL is a keyword. This is probably the root of the hiccup. Is that your Stored Function? Or UDF? > -Original Message- > From: Peter Brawley [mailto:peter.braw...@earthlink.net] > Sent: Monday, September 17, 2012 11:12 AM > To: mysql@lists.mysql.com > Subject: Re: fu

Re: function INTERVAL in view

2012-09-17 Thread Peter Brawley
n 2012-09-17 12:58 PM, h...@tbbs.net wrote: My MySQL is of version 5.5.8-log. I find I cannot save a query with INTERVAL in a view: redundant round brackets are added. If the query is SELECT INTERVAL(1, 2, 3, 4) within the frm file there is the expression interval((1, 2, 3, 4)) which is wron

function INTERVAL in view

2012-09-17 Thread hsv
My MySQL is of version 5.5.8-log. I find I cannot save a query with INTERVAL in a view: redundant round brackets are added. If the query is SELECT INTERVAL(1, 2, 3, 4) within the frm file there is the expression interval((1, 2, 3, 4)) which is wrong. What is known about this? -- MySQL Gene

Re: cannot pass time to function

2012-01-27 Thread Peter Brawley
On 1/27/2012 12:09 PM, John Heim wrote: I'm trying to create a function that formats a time in a standard way ('%H:%i'). But all I can seem to get back is null. DROP TABLE IF EXISTS bogus_table; CREATE TABLE IF NOT EXISTS bogus_table ( btime TIME ); INSERT INTO bogus_table VA

cannot pass time to function

2012-01-27 Thread John Heim
I'm trying to create a function that formats a time in a standard way ('%H:%i'). But all I can seem to get back is null. DROP TABLE IF EXISTS bogus_table; CREATE TABLE IF NOT EXISTS bogus_table ( btime TIME ); INSERT INTO bogus_table VALUES ('12:34:56'); DROP

Re: This partition function is not allowed

2012-01-27 Thread Johan De Meersman
- Original Message - > From: "Adarsh Sharma" > > Is it possible I upgrade to higher version 5.5 with existing data Yes, look for the upgrade notes in the online documentation. -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een eze

This partition function is not allowed

2012-01-26 Thread Adarsh Sharma
HAN ( UNIX_TIMESTAMP('2012-11-01 00:00:00') ), -> PARTITION p10 VALUES LESS THAN ( UNIX_TIMESTAMP('2012-12-01 00:00:00') ), -> PARTITION p11 VALUES LESS THAN (MAXVALUE) -> ); ERROR 1564 (HY000): This partition function is not allowed After some Rn D

Re: optimizer in function

2011-10-08 Thread Michael Dykman
[NOT] DETERMINISTIC | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA } | SQL SECURITY { DEFINER | INVOKER } - michael dykman 2011/10/8 Halász Sándor > Does the optimizer look into function called from query? > > In my queries the expression (SELECT hwyl FROM Stock) / (SELEC

optimizer in function

2011-10-08 Thread Hal�sz S�ndor
Does the optimizer look into function called from query? In my queries the expression (SELECT hwyl FROM Stock) / (SELECT regularPayment FROM Stock), where Stock is a one-record table, often is repeated. The optimizer sees that, and makes the ratio a constant, and I can afford to be clear. If

Re: temp table and view/function/procedure dilemma

2011-04-07 Thread Bgs
Hi, On 04/07/2011 08:06 AM, petya wrote: Hi, You can always create any table from procedures. However, it seems to me that flexviews can solve all of your problems, take a look at it. It will provide you incrementally refreshable materialized views. How do you create a table from a proced

Re: temp table and view/function/procedure dilemma

2011-04-07 Thread Bgs
On 04/06/2011 09:13 PM, Sándor Halász wrote: I have a temporary table which is a smaller table generated from a rather big one. The full table is too big to make real gimmicks on it, so I do need the temp table. Later I do several queries on the temp table. So my initial setup and needs are:

Re: temp table and view/function/procedure dilemma

2011-04-06 Thread petya
Hi, You can always create any table from procedures. However, it seems to me that flexviews can solve all of your problems, take a look at it. It will provide you incrementally refreshable materialized views. Peter Boros On 04/05/2011 08:15 PM, Bgs wrote: Hi all, I have a problem here and

Re: temp table and view/function/procedure dilemma

2011-04-06 Thread S�ndor Hal�sz
2011/04/05 20:15 +0200, Bgs I have a temporary table which is a smaller table generated from a rather big one. The full table is too big to make real gimmicks on it, so I do need the temp table. Later I do several queries on the temp table. So my initial setup and needs are: - tempora

temp table and view/function/procedure dilemma

2011-04-05 Thread Bgs
Hi all, I have a problem here and looking for a solution. I have a temporary table which is a smaller table generated from a rather big one. The full table is too big to make real gimmicks on it, so I do need the temp table. Later I need to do several queries on the temp table. So my init

Re: Increase for 1 using REPLACE function

2011-03-18 Thread S�ndor Hal�sz
>>>> 2011/03/18 17:24 -0500, Afan Pasalic >>>> I have to increase 'no_of_visits' for 1. Using UPDATE function is easy: update visits set no_of_visits=no_of_visits+1 where visitor_id=123 but, how it should be (if possible at all) if I want to use REPLACE fu

Increase for 1 using REPLACE function

2011-03-18 Thread Afan Pasalic
I have to increase 'no_of_visits' for 1. Using UPDATE function is easy: update visits set no_of_visits=no_of_visits+1 where visitor_id=123 but, how it should be (if possible at all) if I want to use REPLACE function? I tried something similar replace into visitors values ($

Re: function to limit value of integer

2011-02-11 Thread Riebold, Philip
t; logarithmic function offers, though. > > On Fri, Feb 11, 2011 at 2:08 PM, Richard Reina wrote: > >> Hi Travis, >> >> This is very helpful thank you. However, is there a way to make it not be >> less than a 1. As it's written below someone with one job

Re: function to limit value of integer

2011-02-11 Thread Johan De Meersman
How about the square root of the number of jobs, or some other root if you want another coefficient? That doesn't have the limiting behaviour a logarithmic function offers, though. On Fri, Feb 11, 2011 at 2:08 PM, Richard Reina wrote: > Hi Travis, > > This is very hel

Re: function to limit value of integer

2011-02-11 Thread Richard Reina
gt; -Travis > > -Original Message- > From: Richard Reina [mailto:gatorre...@gmail.com] > Sent: Thursday, February 10, 2011 3:07 PM > To: mysql@lists.mysql.com > Subject: function to limit value of integer > > Is there a function that can limit the value of an integer i

RE: function to limit value of integer

2011-02-10 Thread Travis Ard
l.com] Sent: Thursday, February 10, 2011 3:07 PM To: mysql@lists.mysql.com Subject: function to limit value of integer Is there a function that can limit the value of an integer in a MySQL query? I am trying to write a query that scores someones experience. However, number of jobs can b

function to limit value of integer

2011-02-10 Thread Richard Reina
Is there a function that can limit the value of an integer in a MySQL query? I am trying to write a query that scores someones experience. However, number of jobs can become overweighted in the the query below. If someone has done 10 jobs vs. 1 that's a big difference in experience. But so

Re: Function Question

2011-01-12 Thread mos
Have you tried: select UserName, Sum(ColB) from Table group by UserName; or select UserName, Sum(ColB) from Table group by UserName where UserName="Emily"; Mike At 11:43 AM 1/12/2011, Nicholas Moreno wrote: My issue is actually in Excel. I'm hoping someone could help me... I need to to

Function Question

2011-01-12 Thread Nicholas Moreno
My issue is actually in Excel. I'm hoping someone could help me... I need to total the values in column B for "Emily". Is there a way other than =SUM (B1+B2+B4+B7)? -- Emily | 1 - Emily | 5 - Greg | 2 - Bob | 7 - Emily | 4 ---

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-05 Thread Shawn Green (MySQL)
a stored function? Maybe some variation of this will help? http://stackoverflow.com/questions/805808/emulating-a-transaction-safe-sequence-in-mysql I don't understand the need for a SEQUENCE. In my history, if there is some kind of object identifier you want to use, then an auto_incr

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-05 Thread James Dekker
Because some sequence tables contain one to many cardinality and MySQL tables can only have one auto_increment column... Is there a way to do what I am trying to do (obtain max sequence id, set it to its corresponding table, and then increment by one) in a stored function? Happy programming

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-05 Thread Shawn Green (MySQL)
at line 1 Is there a better way to generate incremented sequence IDs? Can this be done in a stored function? Is there a particular reason why you cannot use an auto_increment column to atomically create your sequence number? -- Shawn Green MySQL Principal Technical Support Engineer Oracl

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-04 Thread James Dekker
o generate incremented sequence IDs? Can this be done in a stored function? Happy programming, James On Jan 4, 2011, at 7:45 PM, Peter Brawley wrote: >> generate_dynamic_id('my_sequence_id_s', 'my_table_t', 'table_id', >> @dynamicId); > >

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-04 Thread Peter Brawley
uenceNumberSQL = concat('insert into ', _sequence_table ,' set id = null;'); prepare newSequenceNumberStmt from @createNewSequenceNumberSQL; execute newSequenceNumberStmt; deallocate prepare newSequenceNumberStmt; -- Set the number as a dynamic variable. set @dynamic_id

Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-04 Thread James Dekker
the number as a dynamic variable. set @dynamic_id = last_insert_id(); END; # ----- (3) Here's the calling function (which fails): -- Get dynamically incremented id generate_dynamic_id('my_sequence_id_s', 'my_table_t', 'table_id', @dynamicId); Error: com

Re: using a count function

2010-05-29 Thread mos
Chris, You are using Count when you should be using Sum. Here is a solution you can try: SELECT SUM(IF(DATEDIFF(dateofinterview,dateofbirth)/365.25 BETWEEN 0 AND 18.999, 1,0)) AS "18 and Under", SUM(IF(DATEDIFF(dateofinterview,dateofbirth)/365.25 BETWEEN 19 AND 65.999, 1

using a count function

2010-05-29 Thread Chris Elhardt
This is probably pretty obvious to everyone except me. I have a couple of columns, DateOfInterview and DateOfBirth in a table named Demographics For a monthly report I have a script where the operator enters the start and end dates of the reporting period. I need a query result with sing

Re: C API Function for count(*)

2010-05-15 Thread Tim Johnson
* Bob Cole [100515 06:58]: > You might get closer to what you want if you put your command in a text file > and run it from the command line. > On a Mac OS X, I put a similar command: > select count(*) from testTable; > into a small text file: > testCount.txt > and ran this command fro

Re: C API Function for count(*)

2010-05-15 Thread Tim Johnson
* Dan Nelson [100514 21:38]: > > You can't do it with one function call, but you can do it, since the MySQL > cli was able to print "16" in your example above, and it was written in C. > Take a look at mysql_store_result(), mysql_num_fields(), > mysql_field_c

Re: C API Function for count(*)

2010-05-15 Thread Bob Cole
or interface: >> Example: >> mysql> select count(*) from clients; >> +--+ >> | count(*) | >> +--+ >> | 16 | >> +--+ >> >> If "select count(*) from clients" is issued from the newlisp API, is >> t

Re: C API Function for count(*)

2010-05-14 Thread Dan Nelson
lients" is issued from the newlisp API, is > there a a C API function that would return '16'? You can't do it with one function call, but you can do it, since the MySQL cli was able to print "16" in your example above, and it was written in C. Take a look

C API Function for count(*)

2010-05-14 Thread Tim Johnson
from my monitor interface: Example: mysql> select count(*) from clients; +--+ | count(*) | +--+ | 16 | +--+ If "select count(*) from clients" is issued from the newlisp API, is there a a C API function that would return '16'? I have reviewed h

Re: What returns from distance function?

2010-04-18 Thread Onur UZUN
I used below query from http://lists.mysql.com/mysql/219805 SET @center = GeomFromText( 'POINT(39.78824896727801 30.50930339115439)' ) ;# MySQL returned an empty result set (i.e. zero rows). SET @radius = 0.005;# MySQL returned an empty result set (i.e. zero rows). SET @bbox = GeomFromText( CONC

What returns from distance function?

2010-04-18 Thread Onur UZUN
Distance between two points. but in which type? and how can i convert this value to meter?

Stored Procedure/Function Question

2010-02-17 Thread Steve Staples
Hi there, I have a WEIRD question, that I can't find an answer too... Here is my stored function: DELIMITER $$ USE `mydatabase`$$ DROP FUNCTION IF EXISTS `SPLIT_STR`$$ CREATE definer=`thisus...@`%` FUNCTION `SPLIT_STR`( X VARCHAR(255), delim VARCHAR(12), pos INT ) RETURNS VARCHA

RE: Datediff function

2009-09-17 Thread Gavin Towey
Cc: mysql@lists.mysql.com Subject: Re: Datediff function Gavin Towey wrote: > Hi John, > > You can't use aggregate function in the WHERE clause, because they aren't > evaluated until after the WHERE clause is applied. > > Wouldn't it be much easier to simply keep a

RE: Datediff function

2009-09-17 Thread Jerry Schwartz
>-Original Message- >From: Gavin Towey [mailto:gto...@ffn.com] >Sent: Wednesday, September 16, 2009 7:34 PM >To: John Meyer; mysql@lists.mysql.com >Subject: RE: Datediff function > >Hi John, > >You can't use aggregate function in the WHERE clause, because th

Re: Datediff function

2009-09-17 Thread Shawn Green
John Meyer wrote: I'm trying to pull up a list of users who haven't tweeted in 7 or more days, and I'm trying to use this statement: SELECT USER_NAME, MAX(TWEET_CREATEDAT) FROM USERS NATURAL JOIN TWEETS WHERE DATEDIFF(NOW(),MAX(TWEET_CREATEDAT)) > 7 But it says "invali

Re: Datediff function

2009-09-16 Thread John Meyer
Gavin Towey wrote: Hi John, You can't use aggregate function in the WHERE clause, because they aren't evaluated until after the WHERE clause is applied. Wouldn't it be much easier to simply keep a last_tweet_date field updated somewhere then simply do SELECT USER_NAME F

RE: Datediff function

2009-09-16 Thread Gavin Towey
Hi John, You can't use aggregate function in the WHERE clause, because they aren't evaluated until after the WHERE clause is applied. Wouldn't it be much easier to simply keep a last_tweet_date field updated somewhere then simply do SELECT USER_NAME FROM USERS WHERE last_t

Datediff function

2009-09-16 Thread John Meyer
I'm trying to pull up a list of users who haven't tweeted in 7 or more days, and I'm trying to use this statement: SELECT USER_NAME, MAX(TWEET_CREATEDAT) FROM USERS NATURAL JOIN TWEETS WHERE DATEDIFF(NOW(),MAX(TWEET_CREATEDAT)) > 7 GROUP BY USERS.USER_ID But it says "

Re: Write IF condition in Query , and mysql Search function

2009-08-28 Thread Shawn Green
bharani kumar wrote: Hi All , Am working on the autosuggestion program SELECT $field2,$field1 FROM $tblname where locate('$q', $field2) > 0 OR locate('$q', $field1) > 0 order by locate('$q', $field2), $field2 limit " . ($pagesize * $page) . "," . $pagesize This is my query , Example

Write IF condition in Query , and mysql Search function

2009-08-20 Thread bharani kumar
Hi All , Am working on the autosuggestion program SELECT $field2,$field1 FROM $tblname where locate('$q', $field2) > 0 OR locate('$q', $field1) > 0 order by locate('$q', $field2), $field2 limit " . ($pagesize * $page) . "," . $pagesize This is my query , Example in my Database tab

Does MySQL have the same function as the ORACLE TDE technique?

2009-06-05 Thread Moon's Father
Hi. Here is the introduction. http://www.oracle.com/technology/oramag/oracle/05-sep/o55security.html I want to know whether MySQL has the same function as Oracle's? Any reply is appreciated. -- David Yeung, MySQL Senior Support Engineer, Sun Gold Partner. My Blog:http://yueliangda

Re: Create function ignore deps

2009-05-27 Thread Michael Dykman
On Wed, May 27, 2009 at 11:24 AM, Cantwell, Bryan wrote: > I want to check all my functions and procs into my svn as individual sql > files. When I use these to create my db, the person doing this may not > realize the correct order to run these files and not have dependency > challenges... How

Create function ignore deps

2009-05-27 Thread Cantwell, Bryan
I want to check all my functions and procs into my svn as individual sql files. When I use these to create my db, the person doing this may not realize the correct order to run these files and not have dependency challenges... How can I have procs that depend on functions, or vice versa, get suc

RE: Native Function

2009-05-18 Thread Martin Gainty
good morning alex the libmysqld is a embedded server library http://dev.mysql.com/doc/refman/5.0/en/libmysqld.html instead of mysql calling your C/C++ function your C/C++ function is calling the mysql functions mysql_library_init() Should be called before any other MySQL function is called

Re: Native Function

2009-05-18 Thread Alex Katebi
interdite. Ce message sert à l'information seulement et n'aura pas > n'importe quel effet légalement obligatoire. Étant donné que les email > peuvent facilement être sujets à la manipulation, nous ne pouvons accepter > aucune responsabilité pour le contenu fourni.

Native Function

2009-05-18 Thread Alex Katebi
Hi All, I am using the mysql embedded library (libmysqld) in my application. I am using triggers and calling a C/C++ function in my application. This is how I convey configuration changes to my application. I think my only choice is to make a Native Function in the mysql source code since UDF

Re: Retrieving results of a stored function using MySql C API

2009-04-16 Thread Moon's Father
Yeah, please show us the source code of yours. On Wed, Apr 15, 2009 at 4:10 PM, Venu Gopal wrote: > Hi guys, > I am using stored procedures and stored functions for the first time. > And currently stuck at a this point where. I am unable to retrieve > results returned by stored fu

Retrieving results of a stored function using MySql C API

2009-04-15 Thread Venu Gopal
Hi guys, I am using stored procedures and stored functions for the first time. And currently stuck at a this point where. I am unable to retrieve results returned by stored function using MySql C API. Kindly let me know how to do so. In case you need details I'll share the source code. C

Problem using deterministic stored function

2009-02-22 Thread Peter Thomassen
Hi, I am using MySQL 5.0.51a. I've got a problem with a stored function. It reads as follows: CREATE FUNCTION `_contractRoot`(temp INT) RETURNS int(11) READS SQL DATA BEGIN DECLARE _parent_id INT; REPEAT SET _parent_id =

Re: about mysql_ping() function

2008-12-29 Thread Warren Young
raid fifa wrote: Is this a bug of mysql_ping() ? or any other advice? Probably not. I think you'll find that it *does* time out, just after a longer period than you'd prefer. Timeouts of 30, 60 and 120 seconds are common in network code, because it's not possible to reliably determine tha

about mysql_ping() function

2008-12-29 Thread raid fifa
Hi guys, I used mysql_ping() function in my program. But when I unplug the network wire between client and MySQL server, my program has no response as mysql_ping() can not return value and hanged there. Is this a bug of mysql_ping() ? or any other advice? thanks

Re: Function call reult in a WHERE-IN clause

2008-12-17 Thread ceo
Perhaps pass in a "separator" string arg, default to '' and do: GROUP_CONCAT(DISTINCT h.hostid, separator) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Function call reult in a WHERE-IN clause

2008-12-17 Thread Cantwell, Bryan
I have a function that I built that returns a string that is really a comma separated list of values (below). I would like to use that returned value in an IN clause in sql. : select * from hosts where hostid in (getHosts(10014)); The function: CREATE FUNCTION getUserHosts(userID BIGINT

RE: Function returns null when running sql manually works

2008-11-13 Thread Cantwell, Bryan
I have the solution, had to add a begin/end inside the repeat to protect my original done var and declare another inside the loop. I'm glad we had this little talk =P l8r DELIMITER $$ DROP FUNCTION IF EXISTS `firescope`.`reportWhereClause`$$ CREATE [EMAIL PROTECTED] FUNCTION `reportWhereC

RE: Function returns null when running sql manually works

2008-11-13 Thread Cantwell, Bryan
ql doesn't return a record in this pass? thx -Original Message- From: Cantwell, Bryan [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2008 4:17 PM To: mysql@lists.mysql.com Subject: Function returns null when running sql manually works Below I have a function with a cursor

Function returns null when running sql manually works

2008-11-13 Thread Cantwell, Bryan
Below I have a function with a cursor. I have tested the cursor sql manually and it is fine, I have put the variables into the sql inside the cursor loop and it returns data too, BUT, executing this function returns null even though I know the correct info is available. Am I missing something

RE: Question about Averaging IF() function results

2008-11-04 Thread Eric Lommatsch
-8939 Fax 303-778-0378 [EMAIL PROTECTED] From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2008 1:14 PM To: Eric Lommatsch Cc: mysql@lists.mysql.com Subject: Re: Question about Averaging IF() function results Eric, I'd re

Re: Question about Averaging IF() function results

2008-11-04 Thread Peter Brawley
--- HUM300 | 6.000 | 6.000 | Null| 6.000 |6.000 | 6.000 HUM301 | 6.000 | 6.000 | 6.000 | 6.000 |6.000 | 6.000 I tried usi

Question about Averaging IF() function results

2008-11-04 Thread Eric Lommatsch
6.000 | 6.000 |6.000 | 6.000 I tried using the if function without a false answer and I am getting a syntax error when I do this. If it is possible for me to get this correct result in MySQL, can someone provide me with the correct query syntax to get these r

Re: MySQL 5.1 Function Creation

2008-10-24 Thread Moon's Father
gt; mysql.proc table appears to be there, and does not appear to be corrupt. I > did a grant select on mysql.proc to user, and that did not make any > difference, as it has in the past. So, I decided that I'd delete the > function from the database, and try to add it back in, and when

MySQL 5.1 Function Creation

2008-09-27 Thread Jesse
e any difference, as it has in the past. So, I decided that I'd delete the function from the database, and try to add it back in, and when I do, I get an error, Failed to CREATE FUNCTION. The code that I'm trying to execute is as follows: CREATE DEFINER = 'root'@'loca

Re: Is there a GROUP function that can help me with this?

2008-08-22 Thread Peter Brawley
. PB David Perron wrote: Hi MySQL Users- I have a query problem I have been working on for quite some time and I am really at a loss to find a native function(s) to handle my task. I have this table: CREATE TABLE BookCategoryMetrics ( BookName VARCHAR(255), CategoryId VARCHAR(128), RatingSum

Is there a GROUP function that can help me with this?

2008-08-22 Thread David Perron
Hi MySQL Users- I have a query problem I have been working on for quite some time and I am really at a loss to find a native function(s) to handle my task. I have this table: CREATE TABLE BookCategoryMetrics ( BookName VARCHAR(255), CategoryId VARCHAR(128), RatingSum DOUBLE, Cost DOUBLE

Re: how to Get file modified time and date of file by using builtin function or procedure in sql?

2008-07-24 Thread Kevin Spencer
On Thu, Jul 24, 2008 at 1:17 AM, Sivasakthi <[EMAIL PROTECTED]> wrote: > Hi All, > > how to Get file modified time and date of file by using builtin function or > procedure in sql? In a related thread from earlier today you were advised that any interaction with the filesystem

Re: how to Get file modified time and date of file by using builtin function or procedure in sql?

2008-07-24 Thread John Hicks
Sivasakthi wrote: Ananda Kumar wrote: which file are u talking about. regards anandkl Ordinary temp file.. say example in C:\output.txt Actually i have given that file as input to some procedure, based on that modification time we have calculate some details. It sounds like you are usi

Re: how to Get file modified time and date of file by using builtin function or procedure in sql?

2008-07-24 Thread Peter Brawley
>how to Get file modified time and date of file by using builtin function or procedure in sql? On Codd's rules, it oughtn't to be possible---it'd be a backdoor. If there is a need to know the datetime of the last mod to a table, that info ought to be in a column in a tab

Re: how to Get file modified time and date of file by using builtin function or procedure in sql?

2008-07-24 Thread Ananda Kumar
If windows u can use dir Volume in drive C has no label. Volume Serial Number is 9822-5D20 Directory of C:\ 07/26/2005 02:26 AM 1,442 archival_s.pls 1 File(s) 1,442 bytes 0 Dir(s) 5,230,874,624 bytes free in unix ls -ltr ls -ltr abc.

Re: how to Get file modified time and date of file by using builtin function or procedure in sql?

2008-07-24 Thread Sivasakthi
Ananda Kumar wrote: you can do that using OS command, any specific reason u want to use stored proc to get this information. OS Command? could you explain with examples? because, I have more # of input files.. thats why iam going to procedure.. -- MySQL General Mailing List For list archives

Re: how to Get file modified time and date of file by using builtin function or procedure in sql?

2008-07-24 Thread Ananda Kumar
you can do that using OS command, any specific reason u want to use stored proc to get this information. On 7/24/08, Sivasakthi <[EMAIL PROTECTED]> wrote: > > Ananda Kumar wrote: > >> which file are u talking about. >> regards >> anandkl >> >> > Ordinary temp file.. say example in C:\output.txt >

Re: how to Get file modified time and date of file by using builtin function or procedure in sql?

2008-07-24 Thread Sivasakthi
Ananda Kumar wrote: which file are u talking about. regards anandkl Ordinary temp file.. say example in C:\output.txt Actually i have given that file as input to some procedure, based on that modification time we have calculate some details. -- MySQL General Mailing List For list archiv

Re: how to Get file modified time and date of file by using builtin function or procedure in sql?

2008-07-24 Thread Ananda Kumar
which file are u talking about. regards anandkl On 7/24/08, Sivasakthi <[EMAIL PROTECTED]> wrote: > > Hi All, > > how to Get file modified time and date of file by using builtin function or > procedure in sql? > > > Thanks, > Siva > > > -- > MySQL G

how to Get file modified time and date of file by using builtin function or procedure in sql?

2008-07-24 Thread Sivasakthi
Hi All, how to Get file modified time and date of file by using builtin function or procedure in sql? Thanks, Siva -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

nested function does not work

2008-07-23 Thread Andrey Dmitriev
Is there are a reason why this wouldn't work? select upper( monarch.group_decode(lower(hg.alias)) ) from nagios.nagios_hostgroups hg; ++ | upper( monarch.group_decode(lower(hg.alias)) ) | ++ | database

Re: Function Still Not Working

2008-06-15 Thread Jesse
you not ADD Binary, you need to "remove" BINARY ... ;-) Sorry, I misunderstood. convert the string to latin1 or utf8 o.s.s. "LOWER() (and UPPER()) are ineffective when applied to binary strings (BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert the string to a non-binary s

RE: Function Still Not Working

2008-06-13 Thread Boyd, Todd M.
> -Original Message- > From: Jesse [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 12, 2008 1:40 PM > To: Martijn Tonies; MySQL List > Subject: Re: Function Still Not Working > > > Any difference in default collation? > > Not sure what that is. I'm

Re: Function Still Not Working

2008-06-12 Thread Jesse
does it work outside the function? Yes, If I run: select CONCAT(UPPER(SUBSTRING('JESSE',1,1)),LOWER(SUBSTRING('JESSE',2))); replacing cInput with 'JESSE', it returns "Jesse" as it should. did you tried SUBSTRING(cInput, 2)? Tried replacing SUBSTRING

Re: Function Still Not Working

2008-06-12 Thread Jesse
Any difference in default collation? Not sure what that is. I'm using a visual tool (EMS) to create my function, and it doesn't offer that option. I could update it using the command prompt, however. I may try that later. -- MySQL General Mailing List For list arch

Re: Function Still Not Working

2008-06-12 Thread Jesse
(with BINARY). Could this be a similar issue, perhaps? One table is specifically case-insensitive with regard to the function, and the other is not? In this particular case, we're not dealing with any tables. I have also tried adding BINARY to the mix as well, and it didn't make any

RE: Function Still Not Working

2008-06-12 Thread Boyd, Todd M.
> -Original Message- > From: Martijn Tonies [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 12, 2008 6:23 AM > To: MySQL List > Subject: Re: Function Still Not Working > > Hey, > > > Sorry for posting this again, but I got only one response last time, &g

Re: Function Still Not Working

2008-06-12 Thread Sebastian Mendel
hat didn't make a difference either. I have the following function on two servers: CREATE FUNCTION `ProperCase`(cInput TEXT) RETURNS text NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN Declare cReturn Text; Set cReturn = CONCAT(UPPER(SU

Re: Function Still Not Working

2008-06-12 Thread Martijn Tonies
RITY INVOKER", > and that didn't make a difference either. > > I have the following function on two servers: > > CREATE FUNCTION `ProperCase`(cInput TEXT) >RETURNS text >NOT DETERMINISTIC >CONTAINS SQL >SQL SECURITY DEFINER >COMMENT &

Function Still Not Working

2008-06-12 Thread Jesse
ke a difference either. I have the following function on two servers: CREATE FUNCTION `ProperCase`(cInput TEXT) RETURNS text NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN Declare cReturn Text; Set cReturn = CONCAT(UPPER(SUBSTRING(cInput,1,1)),

Function Not Working

2008-06-10 Thread Jesse
I have the following function on two servers: CREATE FUNCTION `ProperCase`(cInput TEXT) RETURNS text NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN Declare cReturn Text; Set cReturn = CONCAT(UPPER(SUBSTRING(cInput,1,1)),LOWER(SUBSTRING(cInp

Re: Group by function and avg on char

2008-03-28 Thread Peter Brawley
Phil, If in the 2nd query you want teams with the highest count per cpid found in the first query, I think you can map the 'Avoiding repeat aggregation' pattern (http://www.artfulsoftware.com/infotree/queries.php) to your problem PB - Phil wrote: Hi all, got a simple problem I'm tryi

Group by function and avg on char

2008-03-27 Thread Phil
Hi all, got a simple problem I'm trying to solve without success. Given the following table CREATE TABLE `scores` ( `proj` char(3) NOT NULL default '', `id` int(11) NOT NULL default '0', `score` double default NULL, `cpid` char(32) default NULL, `team` char(20) default NULL, PRIMARY

Re: function/procedure error!

2008-03-06 Thread Thufir
On Thu, 06 Mar 2008 08:05:06 -0800, puntapari wrote: > And returning a list of numbers? It can be and how? A bit tangential, but this calculation could be done recursively with ruby. Are you tied to SQL for this? -Thufir -- MySQL General Mailing List For list archives: http://lists.mysql

  1   2   3   4   5   6   7   8   9   10   >