Avatar of Jim Horn
Jim Horn
Flag for United States of America

asked on 

CREATE TYPE + COLLATE

Hi Guys

I'm trying to execute the below in 2008R2, and receive an errmsg 'Incorrect syntax near the keyword 'COLLATE'.'
The msdn CREATE TYPE page references COLLATE, but doesn't give an example.  Does anyone know the fix?

CREATE TYPE SFID FROM nvarchar(18) 
COLLATE SQL_Latin1_General_CP1_CS_AS

Open in new window


I'm building an SSIS package where the source is salesforce.com data, and they have a table PK of nvarchar(18).   Plus, the target database I've inherited has these nvarchar(18) columns but with collations SQL_Latin1_General_CP1_CI_AS, SQL_Latin1_General_CP1_CS_AS, and Latin1_General_CS_AS, and I'm trying to standardize it.

Thanks in advance.
Jim
Microsoft SQL ServerMicrosoft SQL Server 2008SSIS

Avatar of undefined
Last Comment
Jim Horn

8/22/2022 - Mon