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

Joining on tables where one table includes collated columns

I'm trying to join two tables in Snowflake on a column called 'Name'. However, one table has names all in lowercase and the other tables has names with first character as uppercase followed by lowercase so the tables can't find a match. Usually,…
afk
  • 33
  • 1
  • 5
0
votes
1 answer

PL/SQL equivalent to MYSQL COLLATE

I am trying to convert some MYSQL code over to ORACLE PL/SQL. I am looking for a equivalent to the COLLATE command. Here is a code snippet: CREATE TABLE IF NOT EXISTS `service_types` ( `service_type_id` int(11) NOT NULL AUTO_INCREMENT, …
Matt
  • 2,803
  • 9
  • 33
  • 57
0
votes
1 answer

MySQL Collate Latin1_General_CI_AI Problem

I have the following select statement where I'm trying to search for a players first and last name that may contain accents in it. $sql = " SELECT * FROM player WHERE player.player_first LIKE '%$first%' AND player.player_last LIKE…
Jako
  • 4,731
  • 7
  • 39
  • 54
0
votes
1 answer

finding bad characters in sql table

I have a table in my database where some of the data for the column "customer name" has been updated as invalid or Spanish characters as below. Ana MartÃnez  Ann Harms  Don Bergh Maria Muñoz I want to find the list of customername which has…
unnikrishnan
  • 141
  • 2
  • 3
  • 15
0
votes
1 answer

createdb with collation "C"

I'm trying to create a PostgreSQL database through PowerShell with collate option as C to address sorting order of fields with special characters using below command: createdb -U postgres -h localhost -p 5432 -O apm apm -l 'C' -T template0 But…
Vikram
  • 347
  • 1
  • 3
  • 8
0
votes
1 answer

MySQL is there a way to replace utf8 chars in select query?

I have a table with text that certainly will have accents áéíóú etc in the text. However another system that is connected to this has problems managing accents. I am creating a View so that this system connects to that view, but I want to remove the…
htafoya
  • 18,261
  • 11
  • 80
  • 104
0
votes
2 answers

Collating SQL query results

I am having to write a query for an AS400 report. We are looking to group data by date. In other words we want to sum all data for each individual year and month. This is the query I have currently: Select SCDATA.SCCLNT.CCLNT, (Select…
Geoff
  • 353
  • 3
  • 19
0
votes
1 answer

1366, Incorrect string value django or collate or tables in mysql.

When in django admin panel i try to add something in database using russian symbols - it gives me error: (1366, "Incorrect string value: '\\xD0\\xB2\\xD1\\x84\\xD1\\x8B' for column 'name' at row 1") Request Method: POST Request URL: …
0
votes
1 answer

Mysqli prepared statement select query with COLLATE utf8_bin

I want to make a difference between big and small letters when checking if the key is correct. I have this query: $stmt = $db->prepare("SELECT DISTINCT * FROM table WHERE id=? AND key=? COLLATE utf8_general_ci"); $stmt->bind_param("is", $id,…
0
votes
0 answers

COLLATE MSSQL/PHP/FORM

I wanna to insert data to MSSQL by this: $conn = sqlsrv_connect($serverName, $connectionInfo); $tsql = "INSERT INTO table (name, name2) VALUES('$name_demo','$name2_demo')"; My form looks like this:
Jarek Jarek
  • 33
  • 1
  • 2
  • 7
0
votes
1 answer

Collation on Bulk Insert

I´ve been traying to fix a process for my company and I've found the source of my problem. I have a CSV file from where I have to import some data, but some fields contains words with de Ñ word and SQL Server keeps replacing it with characters like…
little m
  • 115
  • 1
  • 2
  • 14
0
votes
1 answer

SQL Server collate syntax error

I have searched using collate and am using it in the same way the answers say to use it; however, I am getting an error Incorrect syntax near 'COLLATE' Here is my query: SELECT P.FIRST_NAME_SRCH, P.LAST_NAME_SRCH, ' ' as Title, …
dneimeier
  • 89
  • 2
  • 12
0
votes
1 answer

Specify sort collation for a SELECT query extending the basic collate statement for a multilingual app

I have a requirement for a multilingual application, where the columns displayed on a search are picked up from configuration, and the data can be sorted based on configuration. Question 1 - I am using a Select query like this: SELECT * FROM TABLE…
0
votes
1 answer

MS SQL 2005 - order by collate with subquery fails

This is a simplified version of a real query to show the problem. It can be executed on the sample Adventureworks database: SELECT Person.Address.*, (SELECT TOP 1 [Name] FROM Person.StateProvince WHERE Person.StateProvince.StateProvinceId =…
0
votes
2 answers

SAS Collating/summarizing observations over a time interval

I have a set of trading data that has observations in milliseconds but infrequent. To make it a reasonable timeseries I created a macro to build a grid (one observation per second). Now I want my dataset to fit into the grid (summing up the volumes…
MaBo88
  • 97
  • 1
  • 1
  • 9