Microsoft SQL Server udfs-go to leaf

Source: Internet
Author: User

SQL Server allows user-defined functions. Microsoft SQL server does not restrict users to built-in functions defined as part of the transact-SQL language, but allows users to create their own user-defined functions.

A function is a child that consists of one or more Transact-SQL statements.ProgramCan be used to encapsulateCodeTo reuse. Although user-defined functions are inefficient when the data volume is large, they can still be used in small and medium databases. Now I will share with you all the User-Defined Functions in my database, I also collected some custom functions in the csdn post for sorting and testing, such as fredrickhu (small F) and dawugui (aixinjuerow. xin Hua, happyflystone, dobear_0922, htl258, haiwer, libin_ftsafe cson_cson, and so on.

 

 

01. Remove the HTML Tag and content in the tag from the string.

02. Remove consecutive delimiters from strings

03. Calculate the number of the second string in the first string

04. Comprehensive Fuzzy search

05. Convert decimal to hexadecimal

06. Calculate the number of identical Chinese characters and letters in two strings

07. Generate N-bit random strings

08. Extract Chinese characters, letters, or numbers from a string.

09. character-based character segmentation string

10. Convert the number to the form of separation by sub-bits

11. Two functions that take the first letter of a Chinese character

12. Get the birthday function based on the ID card

13. calculate gender functions based on ID card

14. Upgrade the ID card's 15-digit number to 18-digit

15. Get the household registration through the ID card

16. Strings of multiple data items take the specified location characters

17. functions calculated after being converted from infix arithmetic to suffix arithmetic expressions

18. Convert the lowercase RMB amount to uppercase

19. Fill the specified string to the left

20. convert an integer to an uppercase Chinese Character

21. check whether a given string exists in the combination of intervals and points set.

22. Return the Constellation by date

23. Calculate the working day between two dates

24. Generate a Calendar function based on the year and month

25. Split the string from the first Chinese Character

26. filter out repeated characters in the string

27. Get the week function by date

28. determine whether it is a leap year based on the year

29. Improved the SQL lunar Conversion Function

30. Simple SQL conversion functions

31. bitwise operations of user-defined functions

32. Calculate the number of days in a week

33. Evaluate the value based on the given or rounding

34. convert a string to a hexadecimal Function

35. Remove multiple area numbers with area numbers in the field.

36. Split SQL2000/2005 strings into list common functions

37. Calculate the number of Chinese characters in a string

38. Obtain the bitrate function of the barcode.

39. Obtain the number of days in the current month based on the year and month.

40. A positive integer is decomposed into M to the nth power of 2 and

41. SQL Displacement Calculation Functions

42. Obtain the stroke function of Chinese Characters

43. SQL numeric to English Functions

44. full-width half-width Conversion Function

45. Return a random time in two time ranges

46. Function for getting the number of elements

47. Function for obtaining the value of a specified index

48. Get all Sunday dates by year

49. generate all dates between two time periods

50. unordered character comparison Function

51. implement RSA encryption and decryption functions in SQL Server (first edition)

52. implement RSA encryption and decryption functions in SQL Server (version 2)

53. Output Data columns in the specified format

54. Functions for converting Chinese characters to PinYin

55. Functions for converting numbers to IP addresses

56. encrypt and decrypt strings

57. Calculate Personal Income Tax Functions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.