sort persian words in vue tables - sorting

In utf-8 there are some characters that is not in Arabic like : گ چ پ ژ but in the Persian exists.
When I'm using jd-vue-table or any vue table, sorting is according to Arabic, and the specified characters are at last of the list. but پ that is not in Arabic is the 3rd characters in sort and sort of: احمد, پرهام,یزدان, in Asc in action is: احمد,یزدان,پرهام.
( For easy to read: ahmad, parham, yazdan . p is like *پ** in Persian. and is 3rd but in sort appeared like this ahmad,yazdan,parham. It seems sorting is according to Arabic! )
Is there any way to config utf-8 for correct persian characters sorting or create a custom one to sort according to that?

Related

How to extract emojis using HiveQL?

I'd like to compute the frequency of each single emoji in a Hive table. To do that, I'm trying to extract single emojis, or split a sentence into words / emojis properly using HiveQL.
For example, I have 'hotel 💵❤️ *' as UTF-8 format in my Hive table, and I want to get the following as results:
'hotel', '💵','❤️', '*'
My progress so far:
if I use the following code, I could separate data by blanks but not splitting the two emojis
result:
'hotel', '💵❤️', '*'
code:
select split(col_name,'[ ]')
FROM the_table;
I know I could use something like regexp_extract to extract desired emojis, but I don't have a comprehensive list of emojis, so still can't leverage that to get what I want.
SELECT regexp_extract('hotel 💵❤️ *', '[🏨💵⚾️]', 0);

SSRS - Sort by number part of string

I have an SSRS report that will be used in Dynamics 365 so I can't use SQL in the dataset to help here.
I have a product/version code column that is string mixing letters and numbers. For example:
FF8,
FF9,
FF10,
FFA
These are going in to a column header and form a column group which is also sorted by the code. The standard alphabetical sorting is giving this order:
FF10 - FF8 - FF9 - FFA
I'm happy to use a substring in my sort expression to remove a preceding product code but I would like the numbers in ascending numerical format followed by text versions alphabetically:
FF8 - FF9 - FF10 - FFA
I would add a calculated column to your dataset that strips the non-numeric characters and converts to a number. This would make it easier to sort
A formula like this might help
=System.Text.RegularExpressions.Regex.Replace(Fields!productcode.Value, "[^0-9]", "")
The ^ symbol means "not" so this Regex expression will remove all characters that are not in the range of 0 to 9 (i.e. all non-numeric characters)
According to this, Regex.Replace should be supported in CRM's sandboxed reports
You also could use expression like below in Sort
=switch(Fields!name.Value="FF10",3,Fields!name.Value="FF9",2,Fields!name.Value="FF8",1,Fields!name.Value="FFA",4)
Zoe

Oracle BI (OBIEE) - Wildcard search for numeric values only

I need to set up a query that returns only the values that would match a pattern {Any character & digit}
I've tried setting up a filter criteria to ' %_
[0-9] but it doesn't work...I want to exclude any results that have two letters as the first two characters of a value.
Thanks!
In the presentation column, you can use the OBIEE - Evaluate - Embedded DB Functions in a formula.
For example (not the exact regex you are looking for but you get the point):
This link contains the same image/example I uploaded, as well as a few others: http://gerardnico.com/wiki/dat/obiee/regexp_evaluate

Oracle: search for diacritics

In Oracle I try to find all the rows that contains some diacritics in one column. I used something like:
where regexp_like(name,'(Ă|Î|Ș|Ț|Â)','i');
The problem is that it also returns rows that contain the letters without diacritics (A,I,S,T). For example the clause above will return a row that contains "Adrian" as name.
How can I search only for diacritics?
Thank you
The way diacritics is handled in comparisons and when sorting is a property of the session that depends on the value of NLS_SORT. See Linguistic Sorting and String Searching
I think it may be caused by character conversion.
What do you get when you run the query?:
select 'ĂÎȘȚÂ' from dual

Sort strings numbers, like integer numbers in JQGrid

I had a jqgrid with float numbers. I tried to get rid of the right side 0 and group the numbers, so those are now like (for example: "123,242"), and you know that the type of them are now String.
I want to sort theme like integer numbers in jqgrid.
what should I do?
for example a part of a column
after sort(asc) these strings are like
this:
1,959
1,965
1,989
10,235
100
100
...
Thanks in advance.
I believe you implemented the indexing and sorting according to jqGrid document. For example: http://www.trirand.net/forum/default.aspx?g=posts&t=254
I assume you retrieved data from database. If you’ve followed those already, moreover, you may need to CAST or CONVERT that particular database field from STRING or VARCHAR into INT or NUMERIC when you bind your SQL query.
jqGrid is powerful to do rest of things automatically.
You can zero-pad them (e.g. 00100 and 01959), sort them, and then remove the padding. Computer Programming 0101.

Resources