I've been wondering how SharePoint list field types map to SQL data types. I did some web searches but didn't find what I was looking for, so here's a link to the documentation explaining this (WSS v3): http://msdn.microsoft.com/en-us/library/ms437580(v=office.12).aspx. And here's a table of mappings as documented for the Type attribute.
SharePoint Field Type | SQL Data Type |
AllDayEvent | bit |
Attachments | bit |
Boolean | bit |
Calculated | sql_variant |
Choice | nvarchar |
Computed | |
ContentTypeId | varbinary |
Counter | int |
CrossProjectLink | bit |
Currency | float |
DateTime | datetime |
File | uniqueidentifier |
GridChoice | ntext |
Guid | uniqueidentifier |
Integer | int |
Lookup | int |
LookupMulti | |
ModStat | int |
MultiChioce | ntext |
MultiColumn | |
Note | ntext |
Number | float |
PageSeparator | |
Recurrence | bit |
Text | nvarchar |
ThreadIndex | varbinary |
Threading | varchar |
URL | nvarchar |
User | int |
UserMulti | |
WorkflowEventType | |
WorkflowStatus | nvarchar |
On the empty ones, I'm not sure what the type should be or if there is even supposed to be a type.
The Type in the left column is the value of the Type attribute in a list Field definition. These <Field> elements are returned when you retrieve a list schema from the Lists web service.


Comments