Last post May 18, 2018 09:47 PM by Lannie
May 18, 2018 04:13 AM|aakash91|LINK
I have a simple problem into my database I use length function that determines length of string into sql and oracle both.
now I pass my data from sql to oracle so into sql I check the length of charecters same I will do into oracle also
but when my string has some Unicode charecters the length of that charecters are shown differently into the oracle and sql
SELECT LENGTH('⻩'') "Length in characters"
how can I remove inconsistency ?
how can I make same ans into sql because I have control over sql and does not have control over oracle database
May 18, 2018 11:12 AM|PatriceSc|LINK
https://docs.microsoft.com/en-us/sql/t-sql/functions/datalength-transact-sql?view=sql-server-2017 on the SQL Server side or LENGTHC in Oracle:
Ah what happens if you try SELECT LENGTH(N'⻩'') in Oracle (I assume you can have a Unicode prefix ?). If you need further help a specialized Oracle forum might be perhaps better.
May 18, 2018 09:47 PM|Lannie|LINK
Try LENGTHC oracle function.
And good idea to find out what character set the Oracle database is set too as well!!
Many possibilities for Oracle character sets.