collate

oracle sql collation

点点圈 提交于 2020-01-06 19:45:47
问题 I have a question about sql. I use jDeveloper and oracle sql developer. I wanna make search case insesitive and I wrote like this: String word = jTextField5.getText(); ResultSet rs = statement.executeQuery("SELECT NAMES, AUTHOR, ID FROM BOOKS WHERE NAMES LIKE '%"+word+"%' OR AUTHOR LIKE '%"+word+"%' COLLATE Latin1_General_CS_AS "); but I got error: java.sql.SQLException: ORA-00933: SQL command not properly ended what should I do to solve this problem. By the way I'm new in SQL. 回答1: COLLATE

Sqlite: multiple update (find and replace) case insensitive

南楼画角 提交于 2019-12-31 02:48:06
问题 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 case combinations of sometext (e.g. sometext , SOMEtext , SOmeText ...) I tried to do this : UPDATE itemNotes SET note = REPLACE(LOWER(note), 'sometext', 'abc'); But this transform the whole content of the field note in lower case which isn't what I want

Collate declared SQL variable

≡放荡痞女 提交于 2019-12-22 04:11:13
问题 I've been looking at this code, reproduced below, that looks for non-ASCII characters... select line, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line) as [Position], substring(Line, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line), 1) as [InvalidCharacter], ascii(substring(line, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line), 1)) as [ASCIICode] from staging.APARMRE1 where patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line) > 0 and it just strikes me that I'd want to

Collate declared SQL variable

◇◆丶佛笑我妖孽 提交于 2019-12-22 04:11:10
问题 I've been looking at this code, reproduced below, that looks for non-ASCII characters... select line, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line) as [Position], substring(Line, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line), 1) as [InvalidCharacter], ascii(substring(line, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line), 1)) as [ASCIICode] from staging.APARMRE1 where patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line) > 0 and it just strikes me that I'd want to

PostgreSQL 9.1 using collate in select statements

时光怂恿深爱的人放手 提交于 2019-12-20 15:30:31
问题 I have a postgresql 9.1 database table, "en_US.UTF-8": CREATE TABLE branch_language ( id serial NOT NULL, name_language character varying(128) NOT NULL, branch_id integer NOT NULL, language_id integer NOT NULL, .... ) The attribute name_language contains names in various languages. The language is specified by the foreign key language_id. I have created a few indexes: /* us english */ CREATE INDEX idx_branch_language_2 ON branch_language USING btree (name_language COLLATE pg_catalog."en_US" )

SQLite Query in non case sensitive alphabetical order [duplicate]

浪尽此生 提交于 2019-12-17 22:07:41
问题 This question already has answers here : How to use SQL Order By statement to sort results case insensitive? (3 answers) Closed 3 years ago . All I want to do is grab the stuff in alphabetical order and ignore the capital letters. db.rawQuery("SELECT " + catName + " FROM "+tableName+" ORDER BY "+catName+" ASC COLLATE NOCASE;", null); This is the code I'm using above, but it always gives me an SQLite exception saying that COLLATE is a syntax error. android.database.sqlite.SQLiteException: near

Unicode-ready wordsearch - Question

社会主义新天地 提交于 2019-12-05 16:46:47
Is this code OK? I don't really have a clue which normalization-form I should us (the only thing I noticed is with NFD I get a wrong output). #!/usr/local/bin/perl use warnings; use 5.014; use utf8; binmode STDOUT, ':encoding(utf-8)'; use Unicode::Normalize; use Unicode::Collate::Locale; use Unicode::GCString; my $text = "my taxt täxt"; my %hash; while ( $text =~ m/(\p{Alphabetic}+(?:'\p{Alphabetic}+)?)/g ) { #' my $word = $1; my $NFC_word = NFC( $word ); $hash{$NFC_word}++; } my $collator = Unicode::Collate::Locale->new( locale => 'DE' ); for my $word ( $collator->sort( keys %hash ) ) { my

Collate declared SQL variable

瘦欲@ 提交于 2019-12-05 04:09:02
I've been looking at this code, reproduced below, that looks for non-ASCII characters... select line, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line) as [Position], substring(Line, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line), 1) as [InvalidCharacter], ascii(substring(line, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line), 1)) as [ASCIICode] from staging.APARMRE1 where patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, Line) > 0 and it just strikes me that I'd want to declare a variable for '%[^ !-~]%' COLLATE Latin1_General_BIN instead of writing it out every time, but

How to use the COLLATE in a JOIN in SQL Server?

 ̄綄美尐妖づ 提交于 2019-12-03 16:55:44
问题 I´m trying to join two tables but I get this error: Msg 468, Level 16, State 9, Line 8 Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation. This is the code I´m using: SELECT * FROM [FAEB].[dbo].[ExportaComisiones] AS f JOIN [zCredifiel].[dbo].[optPerson] AS p ON (p.vTreasuryId = f.RFC) COLLATE Latin1_General_CI_AS I know it is wrong, it underlines COLLATE . I do not know how to apply it. 回答1: Correct syntax looks

How to use the COLLATE in a JOIN in SQL Server?

烂漫一生 提交于 2019-12-03 06:00:59
I´m trying to join two tables but I get this error: Msg 468, Level 16, State 9, Line 8 Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation. This is the code I´m using: SELECT * FROM [FAEB].[dbo].[ExportaComisiones] AS f JOIN [zCredifiel].[dbo].[optPerson] AS p ON (p.vTreasuryId = f.RFC) COLLATE Latin1_General_CI_AS I know it is wrong, it underlines COLLATE . I do not know how to apply it. Correct syntax looks like this. See MSDN . SELECT * FROM [FAEB].[dbo].[ExportaComisiones] AS f JOIN [zCredifiel].[dbo].[optPerson]