Tags for function
Median function - Fails on view when trying to cast as decimal
I have a database table which has four columns and two of the columns are INT. The two INT columns' rows are sometimes empty. When I try to cast them as DECIMAL(18,3) and then use the Median function I am getting the Error: An unknown character string translation was requested.  
cast median function decimal
OREPLACE issues between environments
Hello,   I have a query using OREPLACE that runs in one environment, but fails in another with:   Executed as Single statement. Failed [7509 : HY000] Result Exceeded maximum length for UDF/XSP/UDM pm_edw_etl_load.oreplace2. Elapsed time = 00:00:00.437 STATEMENT 1: SEL failed.  
oreplace udf function 7509
What's going on with the median function in Teradata?
If I type median in a Teradata query, the word becomes blue, but it does not become bold and blue. So, I suspect what's going on is that median is not, in fact, a function in Teradata, but the word is reserved and cannot, for example, be assigned to a user written function. Is this correct?
median blue bold function
SQL Function regarding CHAR vs VARCHAR
Hi,   The following SQL function works:  REPLACE FUNCTION dl_stg.mmtest ( a VARCHAR(1) , b INT , C INT )RETURNS INTLANGUAGE SQL CONTAINS SQLDETERMINISTIC
sql function char 9881 Invalid number or type of parameters
Java Function in Teradata is taking too long to execute
I've created a Java Function and imported it in TeraData But after few thousand executions, the function becomes too slow. You can find below output from TOP command. USER       PR   NI VIRT    RES  SHR  S %CPU %MEM    TIME+     COMMAND tdatuser  23   8  815m  33m 1976 S  200   1.4          1835:21  udfsectsk  
udfsectsk java function teradata database slow
using update with WITH clause
Hi,   I'm trying to do something like below, but its giving me syntax error, can anyone please tell me what is the issue and how to fix this.   with cte0(ID,int_col1) as(     select row_number() over (order by (select 1)) AS ID,int_col1 from shuffletest ) update cte0 set int_col1=ID;  
with database query update select function row number
write SQL UDF in Teradata
Hi, I want to write SQL UDF with Multiple Lines: 1. Declare variables. 2. Set those variables with select into statement. 3. some if conditions on Variables 4. return some value.   What is the syntax to write this. I'm using teradata Version 14.00.03.02.   Parth
function sql udf teradata syntax
SELECT statement in FUNCTIONS
Hi Guys,   I need to create a function that reads its result from a table, so I need to use a SELECT statement to read the output. Something like that:
stored procedure function udf select statement
Lagging variables
Hi, I have the following data; Account_id   Date           Flag_1 123             012006        ? 123             022006        1 234             012007        1 234             022007        1  
LAG lead function
C/C++ Coded User-Defined Function Scenario
User-Defined Functions This feature was introduced in Teradata Database V2R5.1.
scenario udf function user-defined function C language extension Teradata extension v_database

Pages