Topic

SQL Server

4 posts

SQL UDF - String Splitter

a. This function is used to split a given string and return the positional value Example: 'ABC;DEF;GHI' is delimtied by ; and we need the positional values. CREATE FUNCTION [dbo].[func_string_splitt

Read more →

SQL UDF - Remove Duplicates

a. Remove duplicates from a delimited string. Example: after string_agg you get strings as 'ABC,DEF,GHI,ABC,PQR,GHI' Here abc and ghi are duplicates Below function can be used to remove the duplica

Read more →

SQL UDF - Inches to Fraction

a. Function convert inches to fraction denomination (11.01 -> 0 ft. 11-1/100 in.) step 1: function that converts decimals to fraction form (.01 -> 1/100, 0.25 -> 1/4) CREATE FUNCTION [dbo]

Read more →