If you have a list that contains two or more columns with similar names, you can get this error:
Duplicate column name detected: List: "a list name", Internal column name: "a column name", SQL Column name: "a column name".List columns, in SharePoint, have an
internal name and a
display name. When you create a column, and give it a name, both the internal and display names are set to the name you enter. If you use special characters, like space/%/&/etc., these are escaped in the internal name (e.g., "
Product type
" is escaped as "
Product_x0020_Type
" in the internal column name.
Note: If you then change the name of a column, only its display name is changed, the internal name remains the same.
SQList uses the internal name for
columns; it also normalises ("cleans") the names of the
columns to be used in the SQL Table by removing any special character, spaces, etc. - for example:
"ProductType
", "Product Type
", and "Product & Type
" are all normalised as "ProductType
".
Because of that, duplicate names could occur.
This behaviour can be changed, by de-selecting the "Generate clean
column names for tables" so that SQList will keep the internal names as it is stored in SharePoint.
Warning: as this setting affects all
columns, the current tables in the SQL database need to be dropped so that SQList recreates and populate them from scratch.
Since version 4.1 of SQList, it is possible to let SQList handle duplicate columns automatically by using the "A
utomatically handle duplicate columns" settings. for more details read
What is new in SQList ver. 4.1.
Another option, where possible, is to transfer one of the columns to a newly create one with a name that does not generate a duplicate (e.g. "
ProductType2
"), and remove the original duplicate column.