Sorting accented characters in MonetDB - monetdb

When I run the command "select product_name from products order by product_name" the result is this:
enter image description here
But, I would like to get this result:
enter image description here
Note: The register "Água Oxigenada" does not need to be exactly in the first position, but together with the group of the letter "A", ignoring the accent.
Is it possible to configure MonetDB to order accented characters the way I expect (Brazilian Portuguese)?
Thank you!
Alexandre da Silva.

You want a Brazilian Portuguese collation, which MonetDB doesn't support at the moment. It is on our TODO list.

Related

Laravel BackPack translate rows

It is necessary to translate the displayed fields from the base.
For example, I have fields in the base name and surname for me now, when I go to the tab with them, they are written like this Name and Surname with a capital letter and I would like to translate them into another language.
Tell me how can I do this?
Hei there,
You can simply just add into your name field this syntax:
CRUD::column('name')
->type('text')
->label(trans('lang_file.your_field_name')); // This line
You can check for more info in here https://laravel.com/docs/8.x/helpers#method-trans
Best, Vreedom18

Get the full word by few letters, API?

I have a problem: for example, we have a few letters: b,o,s. It's a letters from some word and they go in the same order as in word (in this case word is books). But, of course, it may be another word.
So I need to get the list of the possible words, for example, lenght = 10. How can I do these? I feel, that the problem is close to crossword solving, so may be there is some services with API?
Get yourself a word list https://www.google.com/?gws_rd=ssl#q=english+word+list
Put the words in a database table CREATE TABLE Words(Word VARCHAR(64) PRIMARY KEY) ... INSERT INTO Words(Word) VALUE(UPPER(#word)) ...
Query the table with a LIKE query SELECT Word FROM Words WHERE Word LIKE 'B%O%S'

Google spreadsheets in-cell string length validation

I have a column where I want to write down numbers, but the numbers are long, 25 characters, and I could miss type it so at least knowing that I have typed the correct amount of characters would be helpful.
When typing in Google spreadsheets, I can validate the answer of a column within another column by using: '=IF(LEN(B1)=25,B1,"wrong number of digits")'
which means it would return the cell value if has 25 characters, but if its any other amount it will say wrong number, yet I need to use another column...
Is there any way that while I am typing in a cell it would let me proceed if right number of characters or give an error if I have wrong number of characters, in the same column?
UNTESTED
Please try a Data, Validation..., rule of:
=and(B1>999999999999999,len(B1)=25)

jquery quicksearch - special characters

I'm using the Jquery quicksearch plugin.
It's a great plugin, but I have an issue on one of my website.
In a table, I have strings that contains characters with accents, like ò, ü, ä, etc.
The problem is that users will not necessary search with the accents.
What I would like to achieve is that when someone types in "ola" for example, the search results would also display results containing "ölä"
Any idea on how to do it?
You need to store your values in table in 2 columns: 1) raw 2) clean.
1) Raw - words as thay are like ò, ü, ä, etc.
2) Clean - without accents like o,u,a.
To make "clean" you need a transition function, while updating or inserting into table, it won't be so hard to do it.
So while the users are typing in terms for search, you can look through both columns, "clean" and "raw".

UTF-8 coding question (what is the last unicode character)

we are opening up our application to allow support for multiple languages. one of the problems we have encountered along the way is a feature we provide our customers. Imagine for a moment the user is presented with 3 fields.
All customers is a toggle
From Customer Name is a field they can type in
To Customer Name is a field they can type in.
what happens from the user experience standpoint is if you select all customers "from" and "to" are disabled
what happens in the code is if the customer selects "all customers" we look for all customer records that have customer names greater than or equal to "" (blank) and less than or equal to "}}}}}}}}}}}}" (which works fine in ANSI).
when we put a chinese character in the first letter of the name this does not work since the code for the Chinese glyph is greater than "}". Is there a character in UTF-8 that is "the last character" so I could replace it?
We are intending on supporting multiple languages so if the solution only works for Chinese it won't help us.
Thanks
Kevin
When "all customers" is selected run a query without any conditions on customer name.
Yes, this means a new, alternate path of execution. Yes, it's not "smart".
At the same time it will be a lot more readable and easier to troubleshoot later. KISS
Wouldn't it be simpler to create a base select statement with all other conditions and then add the from/to conditions based on whether the from/to fields were filled in or not? Something like this:
sql = "select a,b,c from users where c = 123";
if(!from.empty())
sql += " and name >= '" + from + "'";
if(!to.empty())
sql += " and name < '" + to + "'";
Why not use CUSTOMERNAME IS NOT NULL instead? That would allow any range of characters without worrying about what's the first and last character in any particular text encoding.
I would rework the logic of the application so that you don't have to search for the names of the customers in order to get references to them.
Simply add all customers to the list of customers if the "all customers" switch is toggled on.

Resources