Solved

Salesforce.com:  id nvarchar(18) columns have different collations.  Why?

Posted on 2014-11-19
3
192 Views
Last Modified: 2016-02-17
Hi All

I've inherited an SSIS 2008R2 + Task Factory package where the data source is Salesforce.com
This source has id columns that are nvarchar(18).  Most of them are collated SQL_Latin1_General_CP1_CI_AS, but there are a couple that are SQL_Latin1_General_CP1_CS_AS and Latin1_General_CS_AS.

Would anyone know what controls the collations of PK's / FK's in Salesforce.com?

Thanks in advance.
Jim
0
Comment
Question by:Jim Horn
3 Comments
 
LVL 15

Expert Comment

by:JimFive
ID: 40454940
The CI indicates Case Insensitive, while CS indicates Case Sensitive.
0
 
LVL 39

Expert Comment

by:lcohan
ID: 40455581
"Would anyone know what controls the collations of PK's / FK's in Salesforce.com? "

I believe the question above is not quite correct and/or easy to answer for simple reason that Collation is "controlled" at the Table.Column level and not at the PK/FK constraint level - right?

So I just realized that this can be some sort of answer to the question "what controls the collations of PK's / FK's" - that would be the underlying TableColumn Collation.

Also the different collation may come because the original database was created on one SQL Server having one default collation as per Model database then migrated to a new SQL box with different collation where new column(s) was added.
0
 
LVL 65

Accepted Solution

by:
Jim Horn earned 0 total points
ID: 40473840
Received the answer here:

The developer or tool that built the database decided, and if multiple developers were responsible, that would explain the differences. There are only two "correct" data types for ID values. Older databases would probably use a Latin 1 CS char(15) variant, or Latin 1 CI char(18) for newer databases. Anything else would not be the correct data type.
The extra three characters provide uniqueness without sensitivity, so it's no longer required so long as you're using the full 18 character value.
Thanks anyways guys.

>The CI indicates Case Insensitive, while CS indicates Case Sensitive.
That wasn't the question.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now