Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Downloads
Search: 

UDFs T-SQL CLR (VB. Net, C#.Net, C++. Net)
Igor Nikiforov, Belron Canada inc.
User-Defined string functions Transact-SQL MS SQL Server 2005, 2008 Common Language Runtime CLR (VB. Net, C#.Net, C++. Net) with source code. AT RAT OCCURS PADC PADR PADL CHRTRAN STRFILTER STRTRAN WORDTRAN GETWORDCOUNT GETWORDNUM GETNUMWORD GETALLWORDS GETOCCURSWORD GETATWORD GETRATWORD PROPER RCHARINDEX ARABTOROMAN ROMANTOARAB etc. In my humble opinion, it will be convenient to apply such functions for writing of stored procedures and User-Defined Functions on Transact-SQL. AT, PADL, PADR, CHRTRAN, PROPER similar to the Oracle functions INSTR, LPAD, RPAD, TRANSLATE, INITCAP. Plus, there are CHM files in English, French, Spanish, German and Russian.
Created on
18 years ago
Downloads
6475
File type
Freeware
General information
Description
Keywords: User-Defined string functions Transact-SQL Transact SQL UDFs UDF SQL 2005 2008 CLR VB.Net C#.Net C++.Net Managed Data Access Inside SQL Server ADO.NET SQLCLR Common Language Runtime table-valued functions TVFs Yukon function T-SQL similar function SQL Server 7.0 2000 2005 2008 Yukon function T-SQL similar function Oracle PL/SQL DB2 Sybase ASA INSTR LPAD RPAD RPAD TRANSLATE INITCAP VFP Visual FoxPro Fox St_Denis AT RAT OCCURS PADC PADR PADL CHRTRAN STRFILTER STRTRAN WORDTRAN GETWORDCOUNT GETWORDNUM GETNUMWORD GETALLWORDS GETOCCURSWORD GETATWORD GETRATWORD PROPER RCHARINDEX ARABTOROMAN ROMANTOARAB Enterprise Edition 64 bit dynamic SQL statements with output parameters text ntext Sybase ASA occurrence appearance location whereabouts ubiety split cleave rend sever break up divide split up cut hack fracture pad padding expand enlarge amplify augment increase stuff word parol saying byword string sequence translation transformation conversion change alteration alter recast remodel make over search exploration examination inquiry scrutiny research renovation renewal rejuvenation capitalize capitalize letters capitalized slice chop example create Visual Extend Framework VFX dFPUG To create those types of functions in the MS SQL Server 2005, 2008 database, open the file create_udfs_functions_VB.sql (for VB. Net) -- or -- create_udfs_functions_CS.sql (for C#.Net) -- or -- create_udfs_functions_CPP.sql (for C++. Net), set path to DLL file (udfs_transact-sql_vb.dll for VB. Net, udfs_transact-sql_cs.dll for C#.Net and udfs_transact-sql_cplusplus.dll for C++. Net) and execute it. To delete the given functions, open the file drop_udfs_functions_CLR.sql, and execute it. ----------------------------------------------------------------------------------- I am pleased to offer, free of charge, the following string functions Transact-SQL: AT(): Returns the beginning numeric position of the nth occurrence of a character expression within another character expression, counting from the leftmost character (including overlaps). The search performed by AT() is case-sensitive. AT similar to the Oracle function INSTR. RAT(): Returns the numeric position of the last (rightmost) occurrence of a character string within another character string (including overlaps). The search performed by RAT() is case-sensitive. ATC(): Returns the beginning numeric position of the first occurrence of a character expression within another character expression, counting from the leftmost character (including overlaps). The search performed by ATC() is case-insensitive. ATC similar to the Oracle function INSTR. RATC(): Returns the numeric position of the last (rightmost) occurrence of a character string within another character string (including overlaps). The search performed by RATC() is case-insensitive. AT2(): Returns the beginning numeric position of the first occurrence of a character expression within another character expression, counting from the leftmost character (excluding overlaps). The search performed by AT2() is case-sensitive. AT2 similar to the Oracle function INSTR. ATC2(): Returns the beginning numeric position of the first occurrence of a character expression within another character expression, counting from the leftmost character (excluding overlaps). The search performed by ATC2() is case-insensitive. ATC similar to the Oracle function INSTR. OCCURS(): Returns the number of times a character expression occurs within another character expression (including overlaps). OCCURS2(): Returns the number of times a character expression occurs within another character expression (excluding overlaps). OCCURS2 is faster than OCCURS. PADL(): Returns a string from an expression, padded with spaces or characters to a specified length on the left side. PADL similar to the Oracle function LPAD. PADR(): Returns a string from an expression, padded with spaces or characters to a specified length on the right side. PADR similar to the Oracle function RPAD. PADC(): Returns a string from an expression, padded with spaces or characters to a specified length on the both sides. CHRTRAN(): Replaces each character in a character expression that matches a character in a second character expression with the corresponding character in a third character expression. CHRTRAN similar to the Oracle function TRANSLATE. STRFILTER(): Removes all characters from a string except those specified. STRTRAN(): Searches a character expression for occurrences of a second character expression, and then replaces each occurrence with a third character expression. Unlike a built-in function Replace, STRTRAN has three additional parameters. WORDTRAN(): Searches a character string for occurrences of a first word, and then replaces each occurrence with a second word. GETALLWORDS(): Inserts the words from a string into the table. GETWORDCOUNT(): Counts the words in a string. GETWORDNUM(): Returns a specified word from a string. GETNUMWORD(): Returns the index position of a word in a string. GETOCCURSWORD(): Returns the number of times a word occurs within the character string. GETATWORD(): Returns the beginning numeric position of the nth occurrence of a word within the character string, counting from the leftmost character. GETRATWORD(): Returns the numeric position of the last (rightmost) occurrence of a word within the character string. PROPER(): Returns from a character expression a string capitalized as appropriate for proper names. PROPER similar to the Oracle function INITCAP. RCHARINDEX(): Similar to the Transact-SQL function Charindex, with a Right search. ARABTOROMAN(): Returns the character Roman numeral equivalent of a specified numeric expression (from 1 to 3999). ROMANTOARAB(): Returns the number equivalent of a specified character Roman numeral expression (from I to MMMCMXCIX). The accuracy criteria of user-defined functions GETWORDNUM() , GETWORDCOUNT(), GETALLWORDS(), GETALLWORDS2() working with strings: 1) Both character parameters are empty - the function returns nothing - either 0 strings, or 0. 2) The first parameter is not empty, the second is empty - the function returns the table from one string or 1. The first parameter is in this case the required word. 3) The function works correctly with strings starting and/or finishing with one or several delimiters. 4) The function works correctly on strings consisting only of delimiters - a result in this case is 0 strings, or 0 words. 5) The function works correctly irrespective of the character sets in the string or delimiters, including /, \,?, ^, %, -, ' etc., that is, any character that have special function. No exceptions, if the parameters of an incorrect type are transmitted, there is a standard error message. Above mentioned and other functions completely correspond to these criteria. ----------------------------------------------------------------------------------- Je voudrais bien vous proposer gratuitement les fonctions en Transact-SQL qui sont les suivantes AT(): Renvoie la position numérique du début de la énième occurrence d'une expression caractère à l'intérieur d'une autre expression caractère, en comptant à partir du caractère le plus à gauche. RAT(): Renvoie la position numérique de la dernière occurrence (extrême droite) d'une chaîne de caractères au sein d'une autre chaîne de caractères. OCCURS(): Renvoie le nombre d'occurrences d'une expression caractère à l'intérieur d'une autre expression caractère (y compris les chevauchements éventuels). OCCURS2():Renvoie le nombre d'occurrences d'une expression caractère à l'intérieur d'une autre expression caractère (en excluant les chevauchements éventuels). PADL(): Renvoie une chaîne de caractères à la longueur spécifiée à partir d'une expression complétée à gauche par des espaces ou des caractères. PADR(): Renvoie une chaîne de caractères à la longueur spécifiée à partir d'une expression complétée à droite par des espaces ou des caractères. PADC(): Renvoie une chaîne de caractères à la longueur spécifiée à partir d'une expression complétée des deux côtés par des espaces ou des caractères. CHRTRAN(): Remplace chaque caractère dans une expression caractère, qui correspond à un caractère d'une deuxième expression caractère, par le caractère correspondant d'une troisième expression caractère. STRFILTER(): Enlève tous les caractères d'une chaîne sauf ceux qui sont spécifiés. STRTRAN(): Recherche dans une expression caractère des occurrences d'une deuxième expression caractère, puis remplace chaque occurrence par une troisième expression caractère. À la différence d'une fonction intégrée Replace, STRTRAN a trois paramètres supplémentaires. WORDTRAN(): Recherche dans une expression caractère des occurrences d’un premier mot, puis remplace chaque occurrence par un deuxième mot. GETALLWORDS(): Insère tous les mots d'une chaîne dans la table. GETWORDCOUNT(): Renvoie le nombre de mots à l'intérieur d'une chaîne. GETWORDNUM(): Renvoie un mot spécifié d'une chaîne. GETNUMWORD(): Renvoie la position d’un mot dans une chaîne de caractères. GETOCCURSWORD(): Renvoie le nombre d'occurrences d'un mot à l'intérieur d'une chaîne de caractère. GETATWORD(): Renvoie la position numérique du début de la énième occurrence du mot dans une chaîne de caractères. GETRATWORD() : Renvoie la position numérique du début de la énième occurrence, allant de droite à gauche, du mot dans une chaîne de caractères. PROPER(): Renvoie, à partir d'une expression caractère, une chaîne orthographiée comme un nom propre, c'est-à-dire avec une majuscule initiale. RCHARINDEX(): Est similaire à une fonction intégrée Charindex, mais la fonction commence la recherche à partir de la droite. ARABTOROMAN(): Renvoie un nombre romain équivalent à une expression numérique spécifiée. ROMANTOARAB(): Renvoie une expression numérique équivalente à un nombre romain spécifié. Pour plus d'information en langue française, veuillez visiter: http://nikiforov.developpez.com/ ----------------------------------------------------------------------------------- Quisiera poner a su alcance en forma gratuita las siguientes funciones de Transact-SQL: AT(): Devuelve la posición numérica inicial de la enésima aparición de una expresión de carácteres en otra expresión de carácteres; se cuenta desde el carácter situado más a la izquierda. RAT(): Devuelve la posición numérica de la enésima aparición (más a la derecha) de una cadena de carácteres dentro de otra cadena de carácteres. OCCURS(): Devuelve el número de veces que ocurre una expresión dentro de otra expresión de carácteres (incluye solapamientos). OCCURS2(): Devuelve el número de veces que ocurre una expresión dentro de otra expresión de carácteres (excluye solapamientos). PADL(): Devuelve una cadena a partir de una expresión, rellenándola desde la izquierda hasta la longitud especificada. PADR(): Devuelve una cadena a partir de una expresión, rellenándola desde la derecha hasta la longitud especificada. PADC(): Devuelve una cadena a partir de una expresión, rellenándola por ambos lados hasta la longitud especificada. CHRTRAN(): Cada carácter de una expresión de carácteres que coincida con un carácter de una segunda expresión de carácteres se reemplaza con el carácter correspondiente de una tercera expresión de carácteres. STRFILTER(): Quita todos los carácteres de una cadena de carácteres excepto aquellos especificados. STRTRAN(): Busca en una expresión de caracteres las apariciones de una segunda expresión de caracteres, y luego reemplaza cada aparición con una tercera expresión de caracteres (a distinción de la función incorporada replace, STRTRAN tiene tres parámetros adicionales). WORDTRAN(): Busca en una cadena de caracteres las apariciones de una primera palabra, y luego reemplaza cada aparición con una segunda palabra. GETALLWORDS(): Inserta las palabras de una cadena en la tabla. GETWORDCOUNT():Cuenta el número de palabras de una cadena. GETWORDNUM(): Devuelve la palabra especificada de una cadena. GETNUMWORD(): Devuelve la posición de una palabra en una cadena de caracteres. GETOCCURSWORD(): Devuelve el número de veces que aparece una palabra dentro de una cadena de caracteres. GETATWORD(): Devuelve la posición numérica inicial de la enésima aparición de una palabra en una cadena de caracteres contando de izquierda a derecha. GETRATWORD(): Devuelve la posición numérica de la última aparición (más a la derecha) de una palabra dentro de una cadena de caracteres. PROPER(): Devuelve, a partir de una expresión de tipo Carácter, una cadena con el modelo apropiado de mayúsculas/minúsculas para nombres propios. RCHARINDEX(): Es similar a la función incorporada Transact-SQL charindex, pero la función comienza la búsqueda por la derecha. ARABTOROMAN(): Devuelve el número romano equivalente de una expresión numérica especificada. ROMANTOARAB(): Devuelve la expresión numérica equivalente de un número romano especificado. Para obtener más información, por favor visite: http://nikiforov.developpez.com/espagnol/ ----------------------------------------------------------------------------------- For information about string UDFs in Portuguese language please visit the http://nikiforov.developpez.com/portugais/ ----------------------------------------------------------------------------------- For information about string UDFs in German language please visit the http://nikiforov.developpez.com/allemand/ ----------------------------------------------------------------------------------- For information about string UDFs in Italian language please visit the http://nikiforov.developpez.com/italien/ ----------------------------------------------------------------------------------- For information about string UDFs in Romanian language please visit the http://nikiforov.developpez.com/roumain/ ----------------------------------------------------------------------------------- For information about string UDFs in Russian language please visit the http://nikiforov.developpez.com/russe/ ----------------------------------------------------------------------------------- For information about string UDFs in Bulgarian language please visit the http://nikiforov.developpez.com/bulgare/ ----------------------------------------------------------------------------------- ___________________________________________ I express my gratitude to the following donors for appreciating my work and for their monetary contribution: (I will place a link to a donor's website if requested.) 1. Mr. James Woodin, Iowa, USA
Created by
Igor Nikiforov, Belron Canada inc.

Comments
Add a comment
More downloads created from this member
Igor Nikiforov, Belron Canada inc.
The St_Denis library is available for VB.Net, C#.Net and C++.Net . In total the library has about 30 functions. In my humble opinion, it will be convenient to apply such functions for developing applications.
Created on
14 years ago
Downloads
1127
File type
Freeware
Igor Nikiforov, Belron Canada inc.
AGETFILESUMMARY is the same thing as AGETFILEVERSION but for Summary resources. the code from http://support.microsoft.com/kb/186898/en-us has been adapted for VFP fll library by Igor Nikiforov 2008-11-12 Creates an array containing information about files with summary resources or about Compo...
Created on
15 years ago
Downloads
913
File type
Freeware
Igor Nikiforov, Belron Canada inc.
User-Defined string functions Visual Basic STRTRANEX, WORDTRANEX, AT, RAT, OCCURS, PADC, PADR, PADL, CHRTRAN, STRFILTER, STRTRAN, WORDTRAN, GETWORDCOUNT, GETWORDNUM, GETNUMWORD, GETALLWORDS, ARABTOROMAN, ROMANTOARAB etc. In my humble opinion, it will be convenient to apply such functions for writin...
Created on
16 years ago
Downloads
1602
File type
Freeware
Igor Nikiforov, Belron Canada inc.
The ST_DENIS library is available for all versions Visual FoxPro through 9.0, FoxPro 2.6 for DOS and FoxPro 2.6 for Windows. In total the library has about 25 functions. In my humble opinion, it will be convenient to apply such functions for developing applications. Here is the list of functions ...
Created on
17 years ago
Downloads
3826
File type
Freeware
Igor Nikiforov, Belron Canada inc.
User-Defined string functions Oracle PL/SQL GETALLWORDS, GETWORDCOUNT, GETWORDNUM, OCCURS, PADC, STRTRAN, STRFILTER, ATC, RAT, ROMANTOARAB etc. In my humble opinion, it will be convenient to apply such functions for writing of stored procedures and User-Defined Functions on Oracle Procedural Lang...
Created on
18 years ago
Downloads
3436
File type
Freeware
Igor Nikiforov, Belron Canada inc.
User-Defined string functions SQL Procedural Language DB2 AT, RAT, OCCURS, PADC, PADR, PADL, CHRTRAN, STRTRAN, STRFILTER, GETWORDCOUNT, GETWORDNUM, GETALLWORDS, PROPER, RCHARINDEX, ARABTOROMAN, ROMANTOARAB etc. In my humble opinion, it will be convenient to apply such functions for writing of st...
Created on
18 years ago
Downloads
2556
File type
Freeware
Igor Nikiforov, Belron Canada inc.
User-Defined string functions Transact-SQL Sybase ASA AT, RAT, OCCURS, PADC, PADR, PADL, CHRTRAN, STRTRAN, STRFILTER, GETWORDCOUNT, GETWORDNUM, GETALLWORDS, PROPER, RCHARINDEX, ARABTOROMAN, ROMANTOARAB etc. In my humble opinion, it will be convenient to apply such functions for writing of stored p...
Created on
18 years ago
Downloads
2798
File type
Freeware
Igor Nikiforov, Belron Canada inc.
User-Defined string functions Transact-SQL AT, RAT, OCCURS, PADC, PADR, PADL, CHRTRAN, STRFILTER, STRTRAN, WORDTRAN, GETWORDCOUNT, GETWORDNUM, GETNUMWORD, GETALLWORDS, PROPER, RCHARINDEX, ARABTOROMAN, ROMANTOARAB etc. In my humble opinion, it will be convenient to apply such functions for writing ...
Created on
19 years ago
Downloads
17535
File type
Freeware
Rating
5.00/5.00