cleanse_name()
Utility to make a string SQL safe so that it can be used as an alias for a new column.
Takes the following actions on a string:
remove double quotes
replace spaces and dashes with underscores
cast to upper case
delete anything that is not letters, numbers, or underscores
if first character is a number, add an underscore to the beginning
Parameters
Type
Description
string
text to make SQL safe; works on column names, table names, row values, etc...
Example
Last updated