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)

164 questions
1
vote
1 answer

How to use COLLATE Latin1_General_bin in Entity framework?

I have to use COLLATE in entity framework query. How to write SQL query equivalent in Entity Framework as show below code? SQL query: select * from AspNetUsers order by Email COLLATE Latin1_General_bin Entity Framework: using (var db = new…
Simant
  • 3,142
  • 4
  • 32
  • 61
1
vote
2 answers

How to properly frame a collate command in T-SQL?

I'm trying to write a query across two linked servers. Having set up the link with an appropriate logon, I'm getting this collate error: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in…
Bob Tway
  • 9,301
  • 17
  • 80
  • 162
1
vote
0 answers

How can I change the collate of database in AgensGraph (under Windows OS)

I want to deal UTF-8 format data using AgensGraph under Windows operation system. AgensGraph is based on Postgres. Therefore I think that if I declare the LC_COLLATE of database as 'en_US.utf8', then I'll be able to deal UTF-8 format…
G.-G.
  • 62
  • 6
1
vote
1 answer

How do I use COLLATE based on a function in T-SQL?

I have the following function for setting COLLATE for the column @p based on the @c parameter. I was inspired by this answer. CREATE FUNCTION [dbo].[fnsConvert] ( @p NVARCHAR(2000), @c NVARCHAR(2000) ) RETURNS NVARCHAR(2000) AS BEGIN …
Gabriel Smoljar
  • 1,226
  • 2
  • 14
  • 32
1
vote
1 answer

Talend and character encoding

I am using talend to transfer data from old database to new database. Old database is PostgreSQL and new one is MySQL. But I have problem, because in old database there are these rows: id lft rgt rank_id …
clzola
  • 1,925
  • 3
  • 30
  • 49
1
vote
1 answer

Elasticsearch I/O exception during suggest phase with an inline collate query

I have a collate query within a phrase_suggestion query in ES 5.2. In order to do that, my collate query is an inline mustache template. However, I'm getting an I/O exception error telling me that there's an unexpected '}' character when I'm passing…
Hugo
  • 856
  • 1
  • 10
  • 30
1
vote
1 answer

Case and COLLATE SQL_Latin1_General_CP1_CI_AS in where statement

I am working on a Stored Procedure that has two input parameters that I need to use COLLATE SQL_Latin1_General_CP1_CI_AS so that I can query non-case sensitive results; however, I would also like to allow for a Show All Option with the inputs. I…
1
vote
1 answer

sort command not working as expected for uppercase letters followed by underscore

I'm sorting a list of usernames. When the letters are lowercase, the sort command works as expected. Expected and actual output for lowercase: n n_123 na na_123 When the characters are uppercase and followed by an underscore, things get…
A-K
  • 147
  • 1
  • 1
  • 9
1
vote
0 answers

'ß' and 'ss' being merged in group by

I have 2 names Georg Reisse Bauunternehmung and Georg Reiße Bauunternehmung and need to insert both into a table. I am using a group by to eliminate duplicate rows in the new table. Since the ß is being tranlated to ss I am only seeing one name and…
1
vote
1 answer

Best MySQL collate for search

I've implement a search with PHP and MySQL. At the moment the collate of my table is "utf8_unicode_ci". The problem is, that with this collation "ä" = "a" is. If I change the collate to "utf_bin" everything works, but that collation isn't…
user3388366
  • 51
  • 1
  • 7
1
vote
0 answers

mySQL using python: Select case sensitive fields using BINARY produces syntax error

Goal: selecting all fields body from a database DB that contain the word 'Target' exactly (i.e., case sensitive). In in python3 (after importing pandas and sqlite3) I am using: conn = sqlite3.connect("/Users/Desktop/DB.sqlite") c =…
joeDiHare
  • 619
  • 8
  • 19
1
vote
2 answers

sqlite3 on rails: create_table using collate nocase

Using rails 4.2.0 with ruby v2.3.0p0 I want to create indexes that are case insensitive since most of my searches are case insensitive and I don't want to have to do a full table search every time. So in my create_table migrations, I try adding…
1
vote
1 answer

Simple if statement not working (string comparison)

This block of code is not working: DECLARE @CollationName varchar(50) set @CollationName = ( select collation_name from information_schema.columns where table_name = 'MeteringPointPrice' and column_name = 'MeteringPointId' ) if…
Kasper Hansen
  • 6,307
  • 21
  • 70
  • 106
1
vote
2 answers

Android SQLite ORDER BY COLLATE "NOCASE" and "LOCALIZED" together

Is there any way to order dataset with locale alphabetical order without case sensitivity? I have found "COLLATE LOCALIZED", "COLLATE NOCASE", but "COLLATE LOCALIZED NOCASE" shows error (also in the reverse order). Thanks for any response!
1
vote
1 answer

MYSQL and REGEX compare

I have some problem with REGEXP and MYSQL. How I cant ignore the accent on my string to compare with the regexp value? SELECT ('estágio') REGEXP '(estagio)') AS dados I cant remove the accent from the database. I tried to convert to _bin or…
mmarqueti
  • 257
  • 1
  • 5
  • 8