–FOR SQL SERVER 2000: –FOR SQL SERVER 2005: Source: http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/
Category: SQL
Latin1_General_CI_AS Error
Error: Cannot resolve the collation conflict between “Latin1_General_CI_AS” and “SQL_Latin1_General_CP1_CI_AS” in the equal to operation. When you run into this error simply add “COLLATE Latin1_General_CI_AS” after the column name(s) that you are selecting or comparing and it will work.
Insert Into Table From Another Table
If the two tables structure match you can do this command
Find First/Last Day Of Month For Given Date
Source: http://blog.sqlauthority.com/2007/05/13/sql-server-query-to-find-first-and-last-day-of-current-month/ http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/
Subscribed Web Alert
Will return you all the web alerts. The ID column represent the ID for the web alert Will return you the folder(s) where the web alert is assigned The column Value_number represents the ID column from subscriptions_tbl The column Object_ID represents the folder ID where the web alert is assigned…
Format US Phone
Worst case scenario, for when you do not have the ability to do Regex replace. I have modified the code from the source link below to account for incorrect/invalid phone numbers. The original code will display NULL if the phone number is not valid where my edit will show the…
Regex Match
Source: https://www.simple-talk.com/sql/t-sql-programming/tsql-regular-expression-workbench/
Regex Replace
Source: https://www.simple-talk.com/sql/t-sql-programming/tsql-regular-expression-workbench/