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
0
votes
1 answer

CodeIgniter Active Record collation

I am working with CodeIgniter and want to return some values using a distinct query, I am not able to change the collation in the database itself, and can not do so in the config either, as I am changing somebody else's code. Is there a way to…
Alfie Goodacre
  • 2,753
  • 1
  • 13
  • 26
0
votes
0 answers

T-SQL Select to Check Column For Non-English (Latin1) Characters

The default language on my database is set to SQL_Latin1_General_CP1_CI_AS. I'm looking to return results where the name field contains characters from another language, such as Arabic or Chinese): Albra اابومحمد I've tried the following pieces of…
user4637035
  • 23
  • 1
  • 2
  • 6
0
votes
0 answers

MySQL String comparison Examples

MySQL Example: SELECT 'ä' = 'ae' COLLATE latin1_german2_ci; Returns 0 and not 1 like in the example: My variables look like this (after some configuration): - 'character_set_client', 'latin1' 'character_set_connection',…
ubuseral
  • 427
  • 1
  • 3
  • 14
0
votes
2 answers

MySQL Concat Chinese Character Return NULL

I want to search with LIKE operator in two column of a table. Column names are : person_first_name, person_last_name . And i found a way for the search two columns like one column. The way is columns must be CONCAT and search in the concated string…
Mesuti
  • 878
  • 1
  • 13
  • 29
0
votes
0 answers

SQL Server '=' comparator Query case-sensitivity

Which of these 2 queries is preferred and why? DECLARE @Value1 varchar(16) = 'hello' ,@Value2 varchar(16) = 'Hello' ,@a int = 0 IF CONVERT(VARBINARY(MAX), @Value1) = CONVERT(VARBINARY(MAX), @Value2) SET @a = 1; IF @Value1 = @Value2…
Gregbert
  • 121
  • 1
  • 11
0
votes
1 answer

postscript file is not collating when cups copies is set

Our C++ application is using cups to print out a postscript file generated by XRT XrtTblVaDrawPS command. But when I print 2 copies and set the cups collate option the file is not printed out as collated.
user3416126
  • 148
  • 11
0
votes
0 answers

Most efficient collation and character set for varchar with only latin characters (English)

Following are two columns of my database, I want to know what is the best collation/character set to be used if no special characters are expected. I expect special characters for FIRST_NAME but for DEPARTMENT I expect normal English characters.…
user4826347
  • 783
  • 2
  • 11
  • 29
0
votes
3 answers

Merge two uneven sets of items

I'm trying to get a fairly even distribution of one set of items into another and am looking for an algorithm that can help. For example, Group A has 42 items and Group B has 16 items. I want to mix both groups together so that B is fairly evenly…
gpraceman
  • 71
  • 8
0
votes
1 answer

SQL Is it possible to collate twice?

Hello I have created the following script, the problem I am running into is that the two tables I am querying are collated differently, I tried to insert the data into a third table, but because of the collation of the tables I cannot do this, I…
Denslat
  • 169
  • 2
  • 12
0
votes
1 answer

Make a T-SQL function case sensitive

I have the following T-SQL function FUNCTION dbo.UrlEncode(@url NVARCHAR(1024)) RETURNS NVARCHAR(3072) AS BEGIN DECLARE @urlReturn NVARCHAR(3072) SET @urlReturn = REPLACE(@url,'Á','%c3%81') COLLATE Latin1_General_CS_AS SET @urlReturn =…
roncansan
  • 2,310
  • 6
  • 27
  • 34
0
votes
1 answer

T-SQL cannot convert varcchar column to a numeric datatype

i have the following T-SQL statement: select top 10 value1 from table1 where condition1 = 12345 result: 5449.0 228231.0 0.0 3128.0 6560.0 4541.0 2119.0 …
Sep Pei
  • 21
  • 2
0
votes
0 answers

Translating SQL Server join with COLLATE to Oracle

I have a SQL Server bit of code like this: SELECT [something] FROM [Table1] JOIN [Table2] ON [Table1].Field = [Table2].Field COLLATE Latin1_General_CI_AS How can I rewrite this to work in Oracle? I've consulted a…
Andrew Martin
  • 5,619
  • 10
  • 54
  • 92
0
votes
1 answer

MySQL Case Sensitive Search Binary or Collate

I need to do a case sensitive search on a field in my database. I see some people suggesting the Binary approach. SELECT * FROM car WHERE BINARY brand = 'Toyota' Others are using the Collate approach SELECT * FROM car WHERE brand COLLATE…
John87
  • 603
  • 1
  • 5
  • 9
0
votes
2 answers

Create TABLE in PHP using

tables in my database where are some unusual letters from czech alphabet like ěščřžýáíé ignore my query. I think it could be solve via CHARACTER SET utf8 COLLATE utf8_czech_ci, but it looks like i dont know how to use it. Iam trying this code, but…
Olda Stiller
  • 65
  • 1
  • 9
0
votes
0 answers

Problems change collation ALL ( PART II ) The object '' is dependent on column ''. ( SQL 2008 )

friends. In a ( Previous Post, we were trying to alter the colation of ALL databases and tables and etc. This is what i did: begin DECLARE @collate SYSNAME SELECT @collate = 'Latin1_General_CI_AS' declare @cmd as nvarchar(4000)…
Racer SQL
  • 207
  • 1
  • 3
  • 14
1 2 3
10
11