Questions tagged [collate]

Is a clause that can be applied to a database definition or a column definition to define the collation, or to a character string expression to apply a collation cast.

Is a clause that can be applied to a database definition or a column definition to define the collation, or to a character string expression to apply a collation cast.

COLLATE (Transact-SQL)

142 questions
4
votes
1 answer

SQL Collation Issue on JOIN clause -- EXTREMELY slow runtime

I am trying to join two tables, from separate databases, in a query. They have different collation types. The main DB has the collation: SQL_Latin1_General_CP1_CS_AS The DB that I want to join to has the collation: SQL_Latin1_General_CP1_CI_AS I get…
Dom Vito
  • 467
  • 6
  • 32
4
votes
3 answers

Cant insert utf8 characters on mysql (with utf8 collation, charset and nameset)

im facing a really stressing problem here.. i have everything in UTF-8 , all my DB and tables are utf8_general_ci but when trying to insert or update from a single PHP script all i see are symbols.. but if i edit in phpmyadmin the words are shown…
Pepe
  • 41
  • 1
  • 2
4
votes
1 answer

T-SQL: select words with specific hebrew dots using dot code

The code of one of the hebrew characters which is a dot(=vowel) is 1463 or 0x05b7 I try to select only words that contain this character, but I get the whole list of words. I try: DECLARE @d NCHAR set @d = NCHAR(1463) select * from words where word…
Eli Cohen
  • 121
  • 9
4
votes
1 answer

mysql 5.6: remove explicit column collate

I am running mysql 5.6. Some of the columns in a schema that I inherited from previous developers have an explicitly specified collate clause. All explicitly specified collate clauses are the same as the database's default collate. Is there any way…
XDR
  • 3,457
  • 3
  • 23
  • 42
4
votes
1 answer

Inconsistent MySQL COLLATE errors across databases

I have two physically-separate MySQL databases on which I have to run a single query. The query has a section of SQL that looks like this: and foo_table.bar_column like concat('%', rules.pattern, '%') COLLATE utf8_general_ci It runs fine on…
Teflon Ted
  • 8,250
  • 17
  • 59
  • 76
4
votes
1 answer

MySQL Union illegal mix of collations

I have the following in my PHP query: SELECT tags.tag, theValues.* FROM ch09.tbl_tags tags RIGHT JOIN ((SELECT 'dog' as 'Vals') UNION (SELECT 'cat' as 'Vals')) theValues on tags.tag = theValues.Vals After the "RIGHT JOIN" everything within the…
Craig Stewart
  • 1,382
  • 2
  • 11
  • 16
3
votes
2 answers

Sqlite: multiple update (find and replace) case insensitive

I use DB Browser for SQLite to visualize and update an sqlite file. I am able to do run a case sensitive query to update some text like this: UPDATE itemNotes SET note = REPLACE(note , 'sometext', 'abc'); But I would like to match replace all…
MagTun
  • 4,443
  • 3
  • 43
  • 77
3
votes
1 answer

Exposed Kotlin. Problem with cyrillic encoding

I tryed to fix a problem with encodings. So, I sent from 'Postman', from web browser request to server, where I search data in database by keys in request. Request can be like…
Sergey Grishin
  • 182
  • 1
  • 10
3
votes
1 answer

SQL Collate statement where clause

I am trying following query in SQL Server 2008 R2. While working with accent sensitivity I found this: select case when 'Наина' = '毛泽东先生' then 'Match' else 'No Match' end col I see result is: 'Match' What could be possibly be the reason for this…
3
votes
1 answer

Problem with mysql character set & GWT

I've a SmartGWT application which interacts with a mysql database using rpc services. Suppose it as a simple form with a textbox & two save & load buttons. My database & tables & all fields collation is utf8_persian_ci. All java source files &…
Ehsan Khodarahmi
  • 4,390
  • 9
  • 57
  • 81
3
votes
2 answers

MySQL collate utf8 style string comparison in Python

I have the following MySQL table mysql> show create table names; +-------+-----------------------------------------------------+ | Table | Create Table | +-------+-----------------------------…
Arun Kumar Nagarajan
  • 2,044
  • 2
  • 13
  • 23
2
votes
1 answer

Postgresql ORDER_BY ... COLLATE with different values returns same output

I have a problem with ordering with provided COLLATE value on local machine (on server everything works fine). Seems like it have no any effect. Example SQL code with en_US COLLATE: SELECT username FROM "user" WHERE ( "user"."username" IN ( …
Jonhy Beebop
  • 1,082
  • 1
  • 13
  • 26
2
votes
3 answers

How to order by a varchar choosing the collate order with a case-when switch, in PostgreSQL

This simple function returns an ordered list of title strings. create or replace function testfunction1 () returns table ( id bigint, lang_code tlang_code, title varchar ) stable language sql as $$ select id, lang_code,…
2
votes
2 answers

How to hierarchical query in PostgreSQL with language-dependent data

I am trying to retrieve a hierarchical ordered result from a query on an auto referenced table like this: create table category ( id serial, -- parent category, parent_id integer default null, -- null for root category --…
2
votes
0 answers

How to localize string ordering in SQLite with EF Core

I’m using SQLite v3 database with EF Core. My database contains entries with diacritics, like this: Bratislava Leopoldov Lučenec Ľuboriečka Veľký Krtíš I need to sort these entries alphabetically I.e. get them ordered as above. The problem…
Draex_
  • 2,205
  • 3
  • 21
  • 42
1
2
3
9 10