stored-functions Questions

1

Solved

According to the MongoDB documentation, it isn't recommended to use server-side stored functions. What is the reason behind this warning?
Soule asked 27/3, 2013 at 13:33

3

Solved

I have a function that I currently use in PHP which compiles a mailing address from separate fields but takes into account different formats used in different regions. I'm trying to replicate this ...
Raynaraynah asked 28/1, 2012 at 21:47

1

I have an old Oracle DB which I'm trying to use within EntityFramework 4.1 application. I've read about the big limitation that oracle has with EF- you can't call Oracle stored Function with EF unl...
Mcdougall asked 9/10, 2012 at 11:32

1

Solved

I have an SQL query with the following structure: SELECT *, storedfunc(param, table.field) as f FROM table WHERE storedfunc(param, table.field) < value ORDER BY storedfunc(param, table.field...
Derringer asked 11/6, 2012 at 9:37

1

I need to write a stored function that does an aggregate operation on a column. Let's say a median (but actually, there are many different summary functions I want to implement). Ideally, I would l...
Herringbone asked 20/1, 2012 at 20:7

5

I want to write a stored proc in SQL (MySQL) to compute the average of second and third quartiles. In other words I have records for measurements for how long it takes for an URL to load. Records ...
Schinica asked 9/8, 2011 at 7:58

2

Solved

I need to generate a random number of non duplicated random number in plpgsql. The non duplicated number shall fall in the range of [1,1001]. However, the code generates number exceeding 1001. dir...
Althaalthea asked 29/11, 2011 at 12:21

1

Solved

I'm writing a function that I need to use either a TABLE variable for (I hear they don't exist in MySQL) or a temporary table. However, it seems that temporary tables only seem to work in stored p...
Turoff asked 5/11, 2011 at 22:57

1

Solved

When I run below stored JavaScript function I get errors: > db.system.js.save({_id:"last_n_users", value: function(n){return db.users.find().sort({created_at:-1}).limit(n)}}) > db.eval("last...
Tucana asked 9/10, 2011 at 1:57

4

Solved

In a SQL SELECT statement, I'd like to execute a function that is deterministic for the scope of that SELECT statement (or transaction would be ok, too): select t.x, t.y, my_function(t.x) from t ...
Inviolable asked 1/9, 2011 at 12:44

2

Solved

I am having some difficulty getting a pretty simple stored procedure right. Consider the following article table snippet: id replaced_by baseID 1 2 0 2 3 0 3 0 0 A simple hierarchical table, ...
Tennietenniel asked 11/8, 2011 at 19:11

2

Solved

So here is what I want to do. The first option is to write each function in different php file each one and then include all of them in a php file that is called include functions.php and wheneve...
Mill asked 1/7, 2011 at 12:1

1

Solved

I am trying to create a mysql stored procedure . I have successfully created a procedure using the following code : delimiter $$ CREATE PROCEDURE `myprocedure` (IN var1 DATE) BEGIN <---code-...
Tiffie asked 1/6, 2011 at 10:14

2

Solved

I'm creating a stored function which should insert new row to table. In this table is also one unique column. How can I check if everything goes well and row really was inserted? How can I chec...
Olathe asked 9/5, 2011 at 15:22

1

Solved

OK so I have read a whole bunch of articles suggesting table-value functions and cross apply give better performance than a scalar udf. I wanted to write my function in both ways and then test to s...
Mizzenmast asked 15/12, 2010 at 6:35

4

Solved

I am looking for a stored procedure code that will open a text file, read in several thousand lines, and add the code to a table in the database. Is there a simple way to implement this in T-SQL?
Ethos asked 13/12, 2010 at 0:38

1

Solved

I'm getting a 1064 error when trying to call a stored function from within a stored procedure. It only happens on the line where I try to do this: SET account_id = get_account_id(user);. What is th...

3

Solved

I've written a stored FUNCTION that calls itself, recursively. However when I run it in a query I get this shameless error: Error: 1424 SQLSTATE: HY000 (ER_SP_NO_RECURSION) Message: Recursive stor...

1

Solved

I have just started to create a stored function this is my first time so I am having a few problems. Currently I call the function using SELECT test(); (test is the function name for now). I want t...
Paiz asked 19/10, 2010 at 15:31

4

Solved

guys. Say, I have a query: select t.value, my_stored_function(t.value) from my_table t where my_stored_function(t.value) = n_Some_Required_Value I have rewritten it in the following way: sele...
Toneless asked 7/9, 2010 at 8:29

2

Solved

I've got a vb.net codebase using ado to connect to an Oracle database. We have lots of stored procedures that we call, some with multiple out parameters. However, I now need to call a stored functi...

1

Solved

I'm quite new to subject of writting stored function for mySQL database, hence i'm not sure if what i'm trying to do here is possible at all. I need a function that will return a column from rand...
Cyan asked 19/11, 2008 at 0:48

© 2022 - 2024 — McMap. All rights reserved.