concat

concat, quotation mark and apostrophe combination problems

强颜欢笑 提交于 2019-12-01 18:48:46
I tried different ways and also looked around but can't get this running. I need to concat the following: "concat( 'this is; \"a sample', //XML_NODE, '\"; \"using an apostrophe', ''', 'in text\"' )" one line version: "concat( 'this is; \"a sample', //XML_NODE, '\"; \"using an apostrophe', ''', 'in text\"' )" The output should be: this is "a sample XML_NODE_VALUE"; "using an apostrophe ' in text" The problem is the ' in the text. concat use it to end a string and expect an following ; or the end of concat. Escaping or HTML entities all seems to not work. Any help is really appreciated. Thanks!

XSLT Concat fields together

▼魔方 西西 提交于 2019-12-01 18:26:08
问题 i am trying to filter on a specific field and concat on another field: Input: <?xml version="1.0" encoding="UTF-8"?> <payloads> <payload> <firstname>michael</firstname> <secondname>brown</secondname> <number>1</number> </payload> <payload> <firstname>michael</firstname> <secondname>brown</secondname> <number>2</number> </payload> <payload> <firstname>michael</firstname> <secondname>brown</secondname> <number>3</number> </payload> </payloads> Output: <?xml version="1.0" encoding="UTF-8"?>

XSLT Concat fields together

丶灬走出姿态 提交于 2019-12-01 17:52:40
i am trying to filter on a specific field and concat on another field: Input: <?xml version="1.0" encoding="UTF-8"?> <payloads> <payload> <firstname>michael</firstname> <secondname>brown</secondname> <number>1</number> </payload> <payload> <firstname>michael</firstname> <secondname>brown</secondname> <number>2</number> </payload> <payload> <firstname>michael</firstname> <secondname>brown</secondname> <number>3</number> </payload> </payloads> Output: <?xml version="1.0" encoding="UTF-8"?> <payloads> <payload> <firstname>michael</firstname> <secondname>brown</secondname> <number>1,2,3</number> <

uglify js error unexpected token eof “undefined”

喜欢而已 提交于 2019-12-01 17:46:14
So I installed npm using npm install uglify-js I run a command which is: cat file1.js file2.js .. fileN.js | uglifyjs -o files.min.js and I get this error: WARN: ERROR: Unexpected token eof «undefined», expected punc «,» [-:630,15] /usr/local/lib/node_modules/uglify-js/lib/parse.js:199 throw new JS_Parse_Error(message, line, col, pos); ^ Error at new JS_Parse_Error (/usr/local/lib/node_modules/uglify-js/lib/parse.js:185:18) at js_error (/usr/local/lib/node_modules/uglify-js/lib/parse.js:199:11) at croak (/usr/local/lib/node_modules/uglify-js/lib/parse.js:630:9) at token_error (/usr/local/lib

Oracle: Concat with delimiter, but only if both operands are NOT NULL

一世执手 提交于 2019-12-01 16:02:05
I want to select a concatenation of a couple of fields, but with a separator between them. The separator should only be there if both operands are not null. So for a record with a='foo', b=NULL, c='bar' , I want to get the result abc='foo;bar' (not 'foo;;bar' ). I would like to have a function like concat_sep(a, b, ';') that only adds the ';' inbetween if both a and b are not null. Of course, I can use nvl2 like this: select a, b, c, substr(abc, 1, length(abc) - 1) as abc from (select a, b, c, nvl2(a, a || ';', '') || nvl2(b, b || ';', '') || nvl2(c, c || ';', '') as abc from Table1) But as

Java BitSet which allows easy Concatenation of BitSets

时光毁灭记忆、已成空白 提交于 2019-12-01 15:57:32
I have a need for a BitSet which allows easy concatenation of multiple BitSets create a new BitSet. The default implementation doesn't have such a method. Is there any an implementation in some external library that any of you know which allows easy concatenation? For example lets say I have a bitarray 11111 and another bit array 010101. I want functionality like appending. So after concatenating it would result in 11111010101. Well there's no way to implement this terribly efficient (performance and memory that is) since there's no leftshift method. What you can do is either use the obvious

Java BitSet which allows easy Concatenation of BitSets

為{幸葍}努か 提交于 2019-12-01 15:40:22
问题 I have a need for a BitSet which allows easy concatenation of multiple BitSets create a new BitSet. The default implementation doesn't have such a method. Is there any an implementation in some external library that any of you know which allows easy concatenation? For example lets say I have a bitarray 11111 and another bit array 010101. I want functionality like appending. So after concatenating it would result in 11111010101. 回答1: Well there's no way to implement this terribly efficient

Use Collate in CONCAT

拥有回忆 提交于 2019-12-01 15:09:48
I was trying to concatonate 2 columns with a whitespace in between and got a collation error: SELECT DISTINCT p.PERSON_ID, p.ID_NUMBER, CONCAT(p.FULLNAMES, CONCAT(' ', p.SURNAME)) AS NAME, o.ORG_NAME, w.WARD_DESCRIPTION AS WARD, ess.DESCRIPTION AS SECTOR Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the concat operation The collation of both the offending columns in my database is: Latin1_General_CI_AS So then I was trying to collate the whitespace to this collation, but I have no idea how to do this. My attempt: CONCAT(p.FULLNAMES,

Oracle: Concat with delimiter, but only if both operands are NOT NULL

我怕爱的太早我们不能终老 提交于 2019-12-01 14:55:36
问题 I want to select a concatenation of a couple of fields, but with a separator between them. The separator should only be there if both operands are not null. So for a record with a='foo', b=NULL, c='bar' , I want to get the result abc='foo;bar' (not 'foo;;bar' ). I would like to have a function like concat_sep(a, b, ';') that only adds the ';' inbetween if both a and b are not null. Of course, I can use nvl2 like this: select a, b, c, substr(abc, 1, length(abc) - 1) as abc from (select a, b, c

Use Collate in CONCAT

孤人 提交于 2019-12-01 14:46:37
问题 I was trying to concatonate 2 columns with a whitespace in between and got a collation error: SELECT DISTINCT p.PERSON_ID, p.ID_NUMBER, CONCAT(p.FULLNAMES, CONCAT(' ', p.SURNAME)) AS NAME, o.ORG_NAME, w.WARD_DESCRIPTION AS WARD, ess.DESCRIPTION AS SECTOR Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the concat operation The collation of both the offending columns in my database is: Latin1_General_CI_AS So then I was trying to