When I set where clause of a EntityDataSource which contains a unicode column name, this exception occurs:
The simple identifier 'عنوان_قرارداد'
must contain basic Latin characters
only. To use UNICODE characters, use
an escaped identifier. Near line 6,
column 4.
and this is a part of my code:
GridDataSource.Where = "it.عنوان_قرارداد == \"something\"";
I tried using escaped identifier but this new exception occurred:
The query syntax is not valid., line
6, column 4
Is there any solution for this problem?
Finally I found the solution:
GridDataSource.Where = "it.[عنوان_قرارداد] == \"something\"";
Related
In SQLPlus, how do I add string that contains a special character to my database? The special character I am trying to use is 'é'.
I've tried Aim(atl+130) which is: Aimé but returns 'Aim?'
I copied your character and did this to find the value 233:
select dump('é') from dual;
So you should be able to do this and get it back (of course you can INSERT it too):
select 'Aim' || chr(233) from dual;
I insert this sql into JSqlParser:
select count(distinct case when split(vir_name,"\\/")[OFFSET(0)] in ("G-Ware","RiskWare","Tool","PornWare","Trojan") then apk_name else null end) as black_apk_n from table1
and get error:
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "("
at line 1, column 13.
It may has something to do with array access issue, how to manage the same thing in JSqlParser?
Unfortunately JSqlParser does not yet support these Array constructs. In fact it supports for historical reasons SQLServers and MSAccess bracket quotation like [COLUMN] instead of "COLUMN".
Here is a discussion about this: https://github.com/JSQLParser/JSqlParser/issues/677.
This seems to be legitimate Lua syntax:
example = { ["dummy"] = "foobar"}
Why would you use the above and not simply:
example = { dummy = "foobar"}
They appear to functionally the same...
Because field names do not have to be identifiers: they can be any string, including strings having spaces, for instance.
The second statement is valid Lua syntax and is very convenient for field names that are identifiers.
Table keys do not have to be strings: they can actually be any value (except nil) and the [expr]=expr syntax for table entries allows the values of arbitrary expressions to be used as keys.
I'm selecting an email address but I don't want to display the full email. Only the part before the '#'. How can I cut it. I know how to display only certain amount of characters or numbers. But how do I specify to display only till the '#' symbol.
Thank you.
Recent versions of Informix SQL have the CHARINDEX() function which can be used to isolate where the '#' symbol appears:
SELECT LEFT(email_addr, CHARINDEX('#', email_addr)-1)
CHARINDEX() will return 0 if not found, otherwise the ordinal position of the located string. My testing found that LEFT() doesn't complain about being passed 0 or -1, so it's safe to execute this as is, you don't have to verify that you get something back from CHARINDEX() first.
CREATE TEMP TABLE ex1
(
email_addr VARCHAR(60)
) WITH NO LOG;
INSERT INTO ex1 VALUES ('ret#example.com.au');
INSERT INTO ex1 VALUES ('emdee#gmail.com');
INSERT INTO ex1 VALUES ('unknown');
INSERT INTO ex1 VALUES (NULL);
INSERT INTO ex1 VALUES ('#bademail');
SELECT LEFT(email_addr, CHARINDEX('#', email_addr)-1) FROM ex1
... produces:
(expression)
ret
emdee
5 row(s) retrieved.
If you have an older version of Informix that doesn't support CHARINDEX(), you'll be forced to iterate through the string character by character, until you find the '#' symbol.
I read in the documentation that labels can be string or numbers. However, using only numbers gives an error:
start u=node(5) set u:1234 return labels(u);
The error is:
Invalid input '1': expected whitespace or an identifier (line 1, column 23)
Any non-empty unicode string can be used as a label name. In Cypher, you may need to use the backtick (`) syntax to avoid clashes with Cypher identifier rules.
Here is the source of that: source
I think you are running into a Cypher conflict. If you do this it should work:
start u=node(5)
set u:`1234`
return labels(u);
I was facing the same problem and finally i found the solution
use grave accent(`)
use insert your number inside it