Downloads

Featured downloads

Recently published downloads

Edit Distance and N-Gram string UDFs

Version: 1.0 - Created: 27 Jan 2005

This package contains two string-related UDFs. The Edit Distance function returns the minimum number of edit operations required to transform string1 into string2. The N-Gram matching function returns the number of n-gram matches between two strings.

Is_numeric() UDF

Version: 1.0 - Created: 27 Jan 2005

Is_numeric() UDF checks a field to see if it converts to a Teradata numeric value. one use would be for the ETL process to use the UDF to check incoming data that's destined for DECIMAL and INTEGER columns.

WebSphere MQ Client UDF

Version: 1.0 - Created: 17 Jan 2005

SQL Scalar UDF that writes varbyte or varchar arg to MQ. README Purpose: SQL Scalar UDF that writes varbyte or varchar arg to MQ Author: Robert Hahn Robert.Hahn@teradata.com Support: Author will answer questions and consider enhancment requests on a time available basis. email: Robert.Hahn@ncr.com with any questions, suggestions, or feedback. Contents: Parms: qmgr, qnm, channel, varchar message. Comments--To Do: Add varbyte overload. Accept identity args and open w/MQOO_ALTERNATE_USER_AUTHORITY for varchar, set md.Encoding and md.CodedCharSetId so that mq will convert e.g. to ebcdic Use snprintf, strncpy (had some problem with snprintf). Documentation: MQConnect/MQOpen then MQPUT the varchar argument. This can be used for single puts or parallel controlled by a where clause. This should be run in protected mode since it causes mallocs. Note: Update defaults for qmgr, qnm, envmq etc. Requirements: For MPRAS, this requires that the IBM MQ Client for MPRAS is installed on all nodes: Obtain from here: http: www-1.ibm.com/support/docview.wss?uid=swg24000067 Similar for windows--available as part of any Websphere MQ Server distribution Build: Scalar UDF: replace function emruwmq( qmgr varchar(256), qnm varchar(256), channel varchar(256), vcmsg varchar(32000)) returns integer language C NO SQL parameter style sql EXTERNAL NAME 'F:emruwmq:SI:cmqc:/usr/include/cmqc.h:SL:mqic:SL:mqmcs:SS:emruwmq:/home/rmh/projects/emruwmq/emruwmq.c'; select emruwmq('queue.manager.1','QUEUE1','CHANNEL1/TCP/153.64.119.177','themessage') [from allamp where ampid <= 8 ] /* parallel--assumes allamp table with 1 row/amp */ Invoking from an insert statement trigger on table cxpmult w/varchar col2: replace TRIGGER writeMq after Insert on cxpmult REFERENCING NEW table AS n FOR EACH statement (INSERT INTO dummy sel emruwmq('queue.manager.1','QUEUE1','CHANNEL1/TCP/153.64.119.177',n.col2) as c1 from n where c1 < 0;);

In-place compression UDF

Version: 1.0 - Created: 22 Jun 2004

In-place compression UDF. Compress column value for VARCHARs and BLOBS. Similar to zipping the column before inserting. Can also be used for encrypting data in the database. After compression data is unreadable until uncompressed.  

Teradata UDFs for popular IBM DB2 functions

Version: 1.0 - Created: 22 Jun 2004

Teradata UDFs for popular IBM DB2 functions.  

Byte Operation UDFs

Version: 1.0 - Created: 22 Jun 2004

UDFs for Byte operations, such as bitwise AND, OR, XOR, NOT, SHIFT, and conversion of a byte value to character.