Originally posted by hmscott
Will that work on multi-character strings. Sorry, I guess I could have been a bit more explicit.
I'm extracting data from a source table in Oracle to a SQL Server table. Oracle is set as Case-Sensitive, while SQL was set up to be Case-Insensitive. In order to populate a table and retain the correct PK (from Oracle), I have to convert the column from string to binary (I keep a copy of the original string in a separate column).
Thus I need to have 50145J in binary and 50145j in binary as different values.
I think ASCII(char) will only work on a single character. Am I wrong?
ASCII only works with a single character at a time,
but there is nothing to prevent you from invoking ASCII
within a loop to append together results returned by it.
You need to separate what is typically display for human readability,
with actual internal data storage values.
You have now made things less clear (at least to me).
"Binary" does not compute in this case to my view of reality.
"Binary number" is a STRING ( data type character) of ONES & ZEROES
Somehow I don't think this is what you want/plan to construct.
Keep in mind that when the character string "50145J" is really & truly
converted to BINARY it becomes a STRING that is 48 characters long!
If both 50145J AND 50145j are primary keys within a single Oracle table of datatype VARCHAR2, what will be the datatype of the PK in SQL-Server and how will the two values be different?