EL string concatenation

[I want to dynamically calculate a role to move to the userInRole: #{! securityContext.userInRole ['Prefix]} #{sessionScope ['current']} # {'}]. If ABC is in session, I would like to generate #{! securityContext.userInRole ['PrefixABC']} and use it in a rendering attribute.

Hello

This code works for me:

RFH.

Tags: Java

Similar Questions

  • String concatenation without loop

    Hello

    I have an array of strings containing numbers in engineering as format below:

    5.34000E - 10

    3.23245E - 1

    -8.43560E - 9

    I'm trying to concatenate to this array of strings to a header, which is a unique, formed string using the string concatenation function.  So, I would that my output as follows:

    Header line 1

    Header line 2

    Row header 3

    5.34000E - 10

    3.23245E - 1

    -8.43560E - 9

    However, the result is currently reads:

    Header line 1

    Header line 2

    Row header 3

    5.34000E - 103.23245E - 1 - 8.43560E - 9

    I can get the desired result using a loop for, but I do not like concatenate them strings function seems to run very slowly in the loop.  Is there a way I can get the desired result without using a loop for?

    Thank you.

    It is a real possibility that concatenate strings runs slowly in a loop For. change the statement "I find that Array Build runs slowly in a for loop" and we would get a serious discussion of fly memory. Absolutely no difference here, maybe even worse because the strings are more difficult to predict than most data types. There is perhaps not a miracle solution to make it faster, but there might be ways to ensure there are no longer than necessary. I probably just build the header as its own array of channels and build table allows to reach the two (concatenate entries of course). Writing to text file will manage an array of strings directly when the time comes.

  • String concatenation and put into registry to offset slowing computer

    Hi all

    I tried to create a record of comms between LabVIEW and an Arduino by concatenating the current message with previous posts and put in a shift register.  After a few hours the LabVIEW began to crawl.

    I had a vague idea that you could write a string indicator without wiping the old content.  I thought that if I could do that is there not a huge overload copy all a larger string.

    Am I dreaming?

    Thank you

    If you need registration integer comm I would say the comms streaming the file.  Make sure you put a Boolean value in to turn off logging.

    Usually, it's one of those things you just do everything in debugging.  If so use OR spy rather than writing your own debugger.

  • Newbie need help with string concatenation function.

    I'm totally new to LabView and am trying to work on a project that someone worked in the past.  I came to a string function concatenated on one of the existing provisions and only seen on some entries of the string function has an order of 'rel' and 'g '.  I don't know if it's a common command or what it is.  This is VI is that it requires a user to enter a base dimension (x-axis starting point and end point) and executes the steps in the sample desired within the "point of departure" and "end point".  "a3" is the name of the x-axis.  but I'm not sure of the meaning 'rel' and 'g '.  I posted part of the diagram.  Any help would be appreciated.  Thank you!

    This isn't a question of LabVIEW, but very specific to the device connected to the other end of the serial port. Do you have any documentation for it?

    Basically, the program needs form a consiting of command of a delimiter character, value and end of key word, etc. for example.

    Who wrote this program. It seems too complex and convoluted. Under certain conditions, it seems to send two commands at the same time, and there is no way to determine the order in which they run. Maybe it doesn't matter, but maybe it does. Most likely, what you need is a single structure dealing with a case for each condition and a unique series in the end writing. You can reach the actual program? There are also a lot of duplicate code. What is the purpose of the operations 1 x? Is this a Subvi?

  • With the help of strings concatenated in the Structure of the case

    Hello world

    I'm all new to LabView. Right now, I just trying to build a graphic program of different waves (such as the sine or square) with or without different types of noise. I concatenated two strings and then participating in a housing structure. Nothing graphic when have two concatenated options, but it does not work when it's just the different types of wave are chosen. I think it might have to do with how I'm the each case titration structure option, but I'm not sure. For any help or suggestion is greatly appreciated.

    I would use a sequence of structures of the case. Take it step by step. Use enumerations for readability.

  • Why the operator: = is not working when it is in a string concatenated and assigned to a variable?

    I met with an error ORA-00904: "V_DEPTNO": online: 14 (My PL/SQL code is below), while playing with the cursor of reference (for the end of the apprenticeship).
    I debugged it and the problem was solved and it returns the desired output.  However, the solution of it is not sensible for me even if the output
    has been posted/successfully recovered.    Here's a clearer description of the code:


    On line 14, I have a variable called stmt and stmt value concatenated with the string "where deptno =: v_deptno' and then finally assigned to this stmt variable."

    In this line, he returned ORA-00904 but it was fixed by using =: operator instead of the = operator.

     stmt:=stmt || 'where deptno=:v_deptno'; 
    

    In sql pure when it is intended to add where clause for such purpose, the = comparison operator is used.
    Example:

    Select empno,ename,sal from emp where deptno=10;
    

    But in my pl/sql code, =: operator was used.

    Why is this? Can someone explain what it is? Even if I did my research, but I couldn't find the explanation yet.

    All what I've understood so far, is that this may mean the following (I may be wrong):
    1 - everything first, assign the value 10, of v_deptno, who was declared, to easily compare.
    2. compare the value assigned with deptno.
    On this basis, recover data.


    Thus, he worked as a = + tour operator defined in another high programming language such as c#... etc.
    Example:

    int a = 0;
    
    a =+ 1;    //  a was declared as an integer that has value 0
            // then  we tried to increment by 1 or add by one
             // so it would be  a=a+1;  
                    //which is  a=0+1;
    

    It works the same?

    Here's my complete code pl/sql, just in case...

    --ref cursor
    declare 
    
    type emp_refcur  is ref cursor;
    emp_cv emp_refcur;
    emprec emp%rowtype;
    stmt varchar2(299):= 'select * from emp';
    v_deptno number:=10;
    
    begin
    
    if v_deptno is null then
      open emp_cv for stmt;
    
    else
      stmt:= stmt || ' where deptno=:v_deptno';
      open emp_cv for stmt using v_deptno;
    end if;
    
    loop
    fetch emp_cv into emprec;
    exit when emp_cv%notfound;
    dbms_output.put_line(emprec.empno||chr(9)||emprec.ename||chr(9)||emprec.deptno);
    end loop;
    close emp_cv;
    end;
    /
    
    
    
    
    
    
    
    

    I would you to explain and share with me something to read or give me some clues.

    Thanks in advance!

    In this line, he returned ORA-00904 but it was fixed by using =: operator instead of the = operator.

    There is no "=:" operator.

    The colon character ': ' is used to define a binding (placeholder) variable in the query string.

    The value of this variable must be passed ("linked") after analysis and run step so that the query is executed correctly. That's what the USING clause in your code.

    Thus, he worked as a = + tour operator defined in another high programming language such as c#... etc.

    Example:

    1. int a = 0;
    2. a = + 1;    one has been declared as an integer that is set to 0
    3. then we tried to increment by 1 or add one
    4. so it would be a = a + 1;
    5. which is a = 0 + 1;

    It works the same?

    No, nothing to do with it.

  • log in - help sql: error ORA-01489: string concatena result

    Here's a sql query and I am cooking a decoding, but since there are several columns invloved when I try to run it I get the following error:
    ORA-01489: result of concatenating string is too long

    Any kind of help is appreciated, I need to get it going or I'm dead :(

    Concerning
    Rahul



    SQL:
    Select sys_connect_by_path(c.decode_prep,'-') decode_prep
    from (select "DECODE (BIAPPS_11.'|)") substr (b.all_cols, InStr(b.all_cols,',',1,a.RN) + 1, InStr(b.all_cols,',',1,a.RN+1)-InStr(b.all_cols,',',1,a.RN)-1). «, » ||' RAHULKALRA.' | substr (b.all_cols, InStr(b.all_cols,',',1,a.RN) + 1, InStr(b.all_cols,',',1,a.RN+1)-InStr(b.all_cols,',',1,a.RN)-1) |', "1", "0")' decode_prep, rownum curr, prev rownum-1
    from (select rownum rn
    Double connect rownum < =.
    (select (length('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM ,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT ,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM')
    - length(replace('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM ,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT ,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM',',')))+1 total_cols
    the double)), (select ',' |') ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE ,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT SRC_EFF_FROM_DT , SRC_EFF_TO_DT, EFFECTIVE_FROM_DT, EFFECTIVE_TO_DT, DELETE_FLG, CURRENT_FLG, W_INSERT_DT, W_UPDATE_DT, DATASOURCE_NUM_ID, ETL_PROC_WID, INTEGRATION_ID, SET_ID, TENANT_ID, X_CUSTOM' | (',' double all_cols) b) c
    Start by curr = 1
    Connect prior curr = prev
    length (sys_connect_by_path(c.decode_prep,'-')) desc order

    ---------------------------------------------------------------------------------------------

    same as above sql only the difference is here I'm pulling the first record in the result set that top query returns:

    Select ltrim (replace(decode_prep,'-','||'),'| ') decode_prep
    of (sys_connect_by_path(c.decode_prep,'-') select decode_prep)
    from (select "DECODE (BIAPPS_11.'|)") substr (b.all_cols, InStr(b.all_cols,',',1,a.RN) + 1, InStr(b.all_cols,',',1,a.RN+1)-InStr(b.all_cols,',',1,a.RN)-1). «, » ||' RAHULKALRA.' | substr (b.all_cols, InStr(b.all_cols,',',1,a.RN) + 1, InStr(b.all_cols,',',1,a.RN+1)-InStr(b.all_cols,',',1,a.RN)-1) |', "1", "0")' decode_prep, rownum curr, prev rownum-1
    from (select rownum rn
    Double connect rownum < =.
    (select (length('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM ,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT ,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM')
    - length(replace('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM ,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT ,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM',',')))+1 total_cols
    the double)), (select ',' |') ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE ,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT SRC_EFF_FROM_DT , SRC_EFF_TO_DT, EFFECTIVE_FROM_DT, EFFECTIVE_TO_DT, DELETE_FLG, CURRENT_FLG, W_INSERT_DT, W_UPDATE_DT, DATASOURCE_NUM_ID, ETL_PROC_WID, INTEGRATION_ID, SET_ID, TENANT_ID, X_CUSTOM' | (',' double all_cols) b) c
    Start by curr = 1
    Connect prior curr = prev
    length (sys_connect_by_path(c.decode_prep,'-')) desc order)
    where rownum = 1

    Published by: Mac_Freak_Rahul on November 28, 2012 01:31: in the first sql ')'
    removed after desc in the last line so now this query begin and will throw an error.

    Mac_Freak_Rahul wrote:
    @Blushadow:

    (1) first of all, I'm sorry for not posting my question according to the rules of the forum, next time I'll take care of that.
    (2) Secondly, thanks for the solution, I have no exp with clob, but I can take a deeper look later.
    (3) I just want to know if there are any other wayout, you mean the second concatenation of 4000 bytes sys_connect_by_path exhausts it might return this error?

    SYS_CONNECT_BY_PATH returns a VARCHAR2 data type. In SQL VARCHAR2 data type is limited to 4000 bytes, then Yes, you will get an error if the data that you generate is greater than 4000 bytes (and I say bytes rather than characters, because if your database uses a multibyte multi character set could be as little as 1000 characters)

    I'm right now stable for a table who got 62 columns... I have tables that have 200 close passes: (, great, if you can throw some light on this, if your the best way and the only one to achieve?)

    If you really need to concatenate strings together which exceeds 4000 bytes, then Yes you must use CLOB to store data. Oracle does not provide a native way to aggregate together in a CLOB datatype string, so why you need to write your own function.

    PS: just a quick overview of my value, it will be by comparing schema1.table (s) with shema2.table (s) where table_name must be the same...

    So why are you information concatenation together to achieve this goal?

  • String concatenation and vi speed

    I'm trying to convert data waveform .tdms in ASCII file in a particular format in order to be read by other software. The vi that I wrote (attached) is capable of doing the job but at a very slow pace. The vi in takes about 20 minutes to complete one a second data (22050 samples). This American too slow because I intend to work with waveform data at 1.5 million samples (it takes 16 hours). I think that the problem is due to the the string concatination. Does anyone has any suggestion how I can improve on this performance of vi with regard to its speed. Thank you.

    LabVIEW 2011 running on a laptop Windows 7 (i5 2.50 GHz with 8 G of RAM)

    Sorry for this question.  I had solved after removing the 'wait until the next multiple ms' vi from the iteration of the loop.

  • String concatenation with a new line

    Hey,.

    I'm doing something that I considered quite simple but hit a few problems.  I'm looping through an array of strings and concatenting them with a new line separator and put the result to the Clipboard string so that it can then be pasted into a field. The problem is what is the sign of a new line separator?  I tried:

    « \n »

    '\r' + '\n'

    « \n »

    System.getProperty ("line.separator");

                  String txtToPaste = "";
                    String eol = System.getProperty("line.separator");
                    for (int entryIndex = 0; entryIndex < entries.length; entryIndex++) {
                        txtToPaste += entries[entryIndex];
                        // if we are not the last entry then add a new line
                        if (entryIndex < entries.length) {
                            txtToPaste += eol;
    
                        }
                    }
    

    What is the right way to build a string with newlines inside?

    Thank you.

    something like txtToPaste = entries [entryIndex] + "\n"; might solve your problem.

  • PIVOT and string concatenation

    Hi everyone ,


    I would like to use a pivot query to build a report .is it possible concatenation in Pivot report.

    My requirement is

    Vinoth RAM Sam Rahul Vimal Arun
    Visitors
    Neo tools / connections of mercury / R.Industries / LAU /Forge
    Fittings of mercury /R.Industries / /Forge LAUForge/MercuryR.Industries / UAL


    Any guidance would be appreciated.


    Thank you

    Colette

    Colette wrote:

    I would like to use a pivot query to build a report .is it possible concatenation in Pivot report.

    My requirement is

    Vinoth RAM Sam Rahul Vimal Arun
    Visitors
    Neo tools / connections of mercury / R.Industries / LAU /Forge
    Mercury Fittings/R.Industries / LAU /Forge Forge/Mercury R.Industries / UAL

    Any guidance would be appreciated.

    Yes, it is possible to perform the aggregation of the chain in a pivot report.

    How depends completely on the information about your environment, data model and the data you have provided not: How to get the answers from the forum

    See also Re: 4. How can I convert rows to columns?

  • string concatenation

    Hi all

    I want to contactnate the string with a semicolon and the different lines in the select query and finally insert lines in the final table

    and at the final table column datatype is varchar2 20

    for ex: -.

    amarjot1 - length is 8

    amarjot1 - length is 8 + previos of total line length is 16 - now the second record databecome amarjot1; amarjot1 - first became computer recording

    amarjot1 - it may not be concat with this previous because if we concat it exceded the length of 20 that's why she falls into another line

    amarjot1 - it can be CONCATENATE with the previous

    in the final table rows will be inserted in the

    expected (select col1 from final table)-

    amarjot1; amarjot1

    amarjot1; amarjot1

    Is version of Oracle 11 g release 2

    Thank you very much, Chris... I also fixed the problem with the code - below

    create table testing_amar (number, varchar2 (100) b, varchar2 (100)) c

    insert into testing_amar values (10, 'ACCOUNTING', "ACC");

    insert into testing_amar values (10, 'ACCOUNTING', 'OUN');

    insert into testing_amar values (10, 'ACCOUNTING', 'TIN');

    insert into testing_amar values (10, 'ACCOUNTING', 'G');

    insert into testing_amar values (20, 'SEARCH', 'RES')

    insert into testing_amar values (20, 'SEARCH', 'EAR')

    insert into testing_amar values (20, 'SEARCH', 'CH')

    insert into testing_amar values (30, 'SALES', 'SAL')

    insert into testing_amar values (30, 'SALES', 'ARE')

    commit;

    with tmp as (select ((2 * rownum * 1000) - 2000) + 1 a1, (2 * rownum * 1000) b1)

    of the double

    connect by rownum<>

    Select

    LISTAGG (b, ';') THE Group (ORDER OF NULL) concat_attribute_values_inout

    de)

    Select a1 |  ' - '|| bucket of B1,--(select a1 ||)  ' - '|| B1 of tmp where sm_of_wrds > a1 and sm_of_wrds< b1="" )="">

    b

    (select b,

    sm_of_wrds

    Of

    (select

    Sum (length (NVL (b, 0))) on sm_of_wrds (rownum order),

    a.*

    Of

    testing_amar one

    )

    ), (select a1, b1 of the tmp)

    where sm_of_wrds > a1 and sm_of_wrds<>

    )

  • A geometry of a query string concatenation

    Hello, I was looking for a way to do it, but I've not found correctly.

    I have the following query:

    Select cli.nombre, pps.direccion, pps.idCiudad, ciu.nombre, cli.telefonoFijo, cli.telefonoMovil, cli.correoElectronico

    PPS pps

    inner join customers cli on cli.idCliente = pps.idCliente

    ciudades ciu on ciu.idCiudad = pps.idCiudad inner join

    where SDO_RELATE (pps.geometria, MDSYS. SDO_GEOMETRY (2003,8307, NULL, MDSYS. SDO_ELEM_INFO_ARRAY (1,1003,1), MDSYS. () SDO_ORDINATE_ARRAY

    -75.5863632987792,6.24360843690558,

    -75.5875920222757,6.24123127980311,

    -75.59035778045654,6.239239255996803,

    -75.59261083602905,6.244358568585037,

    -75.5894136428833,6.244486550758674,

    -75.5863632987792,6.24360843690558

    (en)), "mask = ANYINTERACTION") = "TRUE";

    As you can see, the query uses a geometry to filter a few results. The thing is that this query is a string, and geometry is supplied as a parameter in a stored procedure, so the procedure has:

    sqlQuery: = '

    Select * from)

    Select cli.nombre, pps.direccion, pps.idCiudad, ciu.nombre, cli.telefonoFijo, cli.telefonoMovil, cli.correoElectronico, numfila rownum

    PPS pps

    inner join customers cli on cli.idCliente = pps.idCliente

    ciudades ciu on ciu.idCiudad = pps.idCiudad inner join

    where SDO_RELATE (pps.geometria, ' |)  SDO_UTIL. TO_WKTGEOMETRY (Suspensiones_CliMasiv_Sel.Geometria) | (","mask = ANYINTERACTION") ="TRUE"

    ';

    If (not columnaOrdenar is nothing) then

    sqlQuery: = sqlQuery | "order by". Suspensiones_CliMasiv_Sel.columnaOrdenar | ' ' || Suspensiones_CliMasiv_Sel.direccionOrdenar;

    end if;

    sqlQuery: = sqlQuery | '

    )

    where numfila between ' | Minimo | «and» | Maximo;

    Open cursorResultado for sqlQuery;

    In what "Suspensiones_CliMasiv_Sel.geometria" is the parameter of the procedure that receives the geometry. In many forums I found the SDO_UTIL function. TO_WKTGEOMETRY, but this function returns something like:

    POLYGON)

    Then, of course, the request fails, I need to convert the value of the parameter 'Suspensiones_CliMasiv_Sel.geometria' in a string that looks exactly like to:

    MDSYS. SDO_GEOMETRY (2003,8307, NULL, MDSYS. SDO_ELEM_INFO_ARRAY (1,1003,1), MDSYS. () SDO_ORDINATE_ARRAY

    -75.5863632987792,6.24360843690558,

    -75.5875920222757,6.24123127980311,

    -75.59035778045654,6.239239255996803,

    -75.59261083602905,6.244358568585037,

    -75.5894136428833,6.244486550758674,

    -75.5863632987792,6.24360843690558

    ))

    To concatenate it correctly to the chain, is this possible?

    Thanks in advance

    Alejandro many.

    You must use a connection variable, instead of trying to convert it to a string and concatenate.  Please see the below simplified demonstration.

    Scott@orcl12c >-table, data, metadata, and index:

    Scott@orcl12c > CREATE TABLE pps

    2 (geometria MDSYS. SDO_GEOMETRY)

    3.

    Table created.

    Scott@orcl12c > INSERT INTO VALUES of pps (geometria)

    2 (MDSYS. SDO_GEOMETRY

    3 (2003, 8307, NULL,)

    4 MDSYS. SDO_ELEM_INFO_ARRAY (1, 1003, 1),

    5 MDSYS. SDO_ORDINATE_ARRAY

    6 (-75.5863632987792, 6.24360843690558,

    7 - 75.5875920222757, 6.24123127980311.

    8 - 75.59035778045654, 6.239239255996803.

    9 - 75.59261083602905, 6.244358568585037.

    10 - 75.5894136428833, 6.244486550758674.

    11 - 75.5863632987792, 6.24360843690558)))

    12.

    1 line of creation.

    Scott@orcl12c > INSERT INTO user_sdo_geom_metadata VALUES

    2 ('SPA', "GEOMETRIA",

    3 SDO_DIM_ARRAY

    4 (SDO_DIM_ELEMENT ('X',-76-75, 0.005),

    5 SDO_DIM_ELEMENT ('Y', 6, 7, 0.005)).

    6 8307)

    7.

    1 line of creation.

    Scott@orcl12c > CREATE INDEX pps_idx ON pps (geometria) INDEXTYPE IS MDSYS. SPATIAL_INDEX

    2.

    The index is created.

    Scott@orcl12c >-using the procedure binds the variable:

    Scott@orcl12c > test_proc CREATE OR REPLACE PROCEDURE

    2 (input_geometria IN MDSYS. SDO_GEOMETRY,

    3 cursorResultado IN OUT SYS_REFCURSOR)

    4 AS

    5 sqlQuery VARCHAR2 (4000);

    6 BEGIN

    sqlQuery 7: =.

    8 ' SELECT *.

    Pps 9

    10. WHERE SDO_RELATE

    11 (pps.geometria,

    12: bind_variable,

    13 "mask = ANYINTERACTION") = "TRUE" ';

    14 cursorResultado OPEN FOR sqlQuery USING input_geometria;

    15 END test_proc;

    16.

    Created procedure.

    Scott@orcl12c > SHOW ERRORS

    No errors.

    Scott@orcl12c >-performance and results:

    Scott@orcl12c > g_refcur VARIABLE REFCURSOR

    Scott@orcl12c > START

    2 test_proc

    3 (MDSYS. SDO_GEOMETRY

    4 (2003, 8307, NULL,)

    5 MDSYS. SDO_ELEM_INFO_ARRAY (1, 1003, 1),

    6 MDSYS. SDO_ORDINATE_ARRAY

    7 (-75.5863632987792, 6.24360843690558,

    8 - 75.5875920222757, 6.24123127980311.

    9 - 75.59035778045654, 6.239239255996803.

    10 - 75.59261083602905, 6.244358568585037.

    11 - 75.5894136428833, 6.244486550758674.

    12 - 75.5863632987792, 6.24360843690558)),

    13: g_refcur);

    14 END;

    15.

    PL/SQL procedure successfully completed.

    Scott@orcl12c > g_refcur PRINT

    GEOMETRIA (SDO_GTYPE, SDO_SRID, SDO_POINT_TYPE (X, Y, Z), ANSDO_ELEM_INFO, SDO_ORDINATES)

    --------------------------------------------------------------------------------

    SDO_GEOMETRY (2003, 8307, NULL, SDO_ELEM_INFO_ARRAY (1, 1003, 1), SDO_ORDINATE_ARR)

    AY (- 75.586363, 6.24360844, - 75.587592, 6.24123128, - 75.590358, 6.23923926-, 75.5)

    92611, 6.24435857, - 75.589414, 6.24448655, - 75.586363, 6.24360844))

    1 selected line.

  • Why ColdFusion adds the backslashes to my string concatenated?

    Well, serializeJSON isn't enough create JSON for me to use with jQuery.

    So I decided to build it myself.

    Here is my code:

    <cffunction name="getActions" output="false" access="remote" returnformat="JSON">
        <cfquery name="Actions">
          SELECT * FROM Actions
        </cfquery>
        <cfset ActionsList = '{"success" : "true"}, {"Actions" : ['>
        <cfloop query="Actions">
          <cfset ActionsList = ActionsList & '{ "ID" : "' & ID & '", "Name" : "' & Name & '"},'>
        </cfloop>
        <cfset ActionsList = ActionsList & ']}'>
        <cfreturn ActionsList>
      </cffunction>
    

    So basically I send an asynchronous call AJAX with jQuery to the cfc that contains this code.

    jQuery told me that the JSON was bad.

    So I pulled out what Coldfusion has been sending to the browser.

    "{\"success\":\"true\"},{\"Actions\":[{\"ID\":\"1\",\"Name\":\"View Public\"},{\"ID\":\"2\",\"Name\":\"View Full\"},{\"ID\":\"3\",\"Name\":\"Create Page\"},
    {\"ID\":\"4\",\"Name\":\"Create Part\"},{\"ID\":\"5\",\"Name\":\"Create Section\"},{\"ID\":\"6\",\"Name\":\"Create Question\"},{\"ID\":\"7\",\"Name\":\"Create Table\"},
    {\"ID\":\"8\",\"Name\":\"Assign Pages to Location\"},{\"ID\":\"9\",\"Name\":\"Input Data\"},{\"ID\":\"10\",\"Name\":\"Edit Page\"},{\"ID\":\"11\",\"Name\":\"Edit Part\"},
    {\"ID\":\"12\",\"Name\":\"Edit Section\"},{\"ID\":\"13\",\"Name\":\"Edit Question\"},{\"ID\":\"14\",\"Name\":\"Edit Table\"},
    {\"ID\":\"15\",\"Name\":\"Assign Pages to Location Type\"},{\"ID\":\"16\",\"Name\":\"Add Location\"},{\"ID\":\"17\",\"Name\":\"Add Location Type\"},
    {\"ID\":\"18\",\"Name\":\"Change Location\"},{\"ID\":\"19\",\"Name\":\"Assign Location Designee\"},{\"ID\":\"20\",\"Name\":\"Assign District Designee\"},
    {\"ID\":\"21\",\"Name\":\"Update User Information\"},{\"ID\":\"22\",\"Name\":\"Add User Type\"},{\"ID\":\"23\",\"Name\":\"Manage Permissions\"},]}\""
    

    Why coldfusion adds a bar backslash before each quotation mark?

    I built the exact way of sam JSON in another function, and it worked fine.

    The only difference between this function and this one is that it has a loop.

    I've been at this for hours... what Miss me?

    and replace(ActionsList,"\","","ALL")

    does not help...

    You're not perform a JSStringFormat() on that anywhere, are you?  (maybe in the code not released).  JSStringFormat() assumes that the text passed to it is a literal string, and then he escaped values in quotes (as we see here)

    In addition, on either said by the way, your JSON data is not valid, no?

    Your loop will update the list of actions with a table, but it always takes into account there is another index of values, so it did precede the comma.  {[{You can even see in the final version of your data table ends with a '...},]}' you may need to make a conditional test to see if the loop is at its max index and if not, then add the comma.

  • cache query string concatenation

    Hello

    I was wondering if I concatenate strings in the query I'm writing in a < cfquery > tag with dbtype = "query"?

    I want to do something similar to the following:

    < cfquery name = "a_query", dbtype = "query" >

    SELECT

    ("$" + TotalProfit) AS TotalProfit2

    OF SomeCachedQuery

    < / cfquery >

    I can do this if the query is executed on the SQL Server, but not with the cached query. If this is not possible, is there a code I can wirte that does the same thing?

    Thank you!

    Jason

    It actually works for you?  It is not for me,

    unless I TotalProfit case to be a varchar, first.

    As Adam says, you must first cast the value to a varchar. Either at the request of origin, or in the t/t:

    SELECT ' $ ' + CAST(TotalProfit AS VARCHAR) AS TotalProfit2

    OF SomeQuery

    However, you can simply use NumberFormat() in your output. Unless there is a reason you need to do this in a t/t...

    #NumberFormat(SomeQuery.TotalProfit, "$-9999999.00") #.

  • String concatenation with the new line format?

    I want to concatenate 2 strings organize the resulting output in a new online format...

    example:

    RTRIM (DECODE (UPPER (VPA.safety), 'TRUE', 'Security')
    || DECODE ('TRUE', SOLE (vpa.effectiveness), "Efficiency")
    || DECODE (UPPER (vpa.timeliness), 'TRUE', 'News'),
    || DECODE ('TRUE', SOLE (vpa.equity), "Equity")
    || DECODE (UPPER (vpa.efficiency), 'TRUE', 'Efficiency'),
    'TRUE', 'Patient Centeredness.
    ),
    ', '
    ) AS Concat_Text

    I want to display the above output in the new line

    Security
    Efficiency
    Speed of execution
    Equity
    Efficiency

    Published by: francislazaro on June 14, 2010 19:34

    TRY

    RTRIM (DECODE (SUPERIOR (VPA.safety), 'TRUE', 'Security') |) CHR (13) | CHR (10)
    || DECODE (UPPER (vpa.effectiveness), 'TRUE', 'Efficiency') | CHR (13) | CHR (10)
    || DECODE (UPPER (vpa.timeliness), 'TRUE', 'News') | CHR (13) | CHR (10)
    || DECODE ('TRUE', SOLE (vpa.equity), "Equity") | CHR (13) | CHR (10)
    || DECODE (UPPER (vpa.efficiency), 'TRUE', 'Efficiency'),
    'TRUE', 'Patient Centeredness.
    ),
    ', '
    ) AS Concat_Text

  • string concatenation &amp; date field?

    I am trying to concatenate the column of database + string + database column.

    I must add hook opened at the beginning of the string and a hook closing at the end of the database column.

    Example: Table.progtitle. "Deleted on | Table.Last_Modified_date

    the resulting output should therefore Table.progtitle (deleted 01/01/2010)

    How can we include media between a string and a database column?

    Hello

    the code is:

    select Table.progtitle || '(Deleted on '|| to_char(Table.Last_Modified_date ,'dd-mm-yyyy')||')'
    from Table;
    

    Herald tiomela
    Superconsult.nl

Maybe you are looking for

  • MacPro mid-2010 RAM upgrade

    Hello! I've got this MacPro (8-core 2,4 / mid-2010), and I can't seem to find new 1066 MHz DDR3 RAM buy to the Brazil. I can only find 1333 MHz or higher available. Do you know if one of these newer DDR3 would work with it? Thank you!

  • How to get tracks on my computer and it belongs to Mozilla then?

    When I opened my Firefox it went to caterpillars instead of my browser. I didn't ask for change, or did I download the program. I was told it's one of yours.

  • LaserJet M277n: Cannot scan from Mac

    I just bought a LaserJet M277n and connected to my home network. I can print from my MacBook. I can copy the printer. I can't scan. I downloaded the HP EasyScan software, but that does not work either. For the Capture of Image Mac software and the Ea

  • LabVIEW myRIO simple Audio input Audio output exercise

    Hello This can be a very simple question, but it's my first time on Labview and I'm having a lot of trouble. I'm trying to plug a speaker into the Audio Out of myRIO boad and connect the audio output to the microphone of my laptop. I tried to design

  • How to remove the windows vista backup

    I have 2 drives, C: (69.2 GB) all system files. D: (65.7 GB) a backup & my data. I want to install a new s/w of 12 GB in D:, but its low memory(10.5MB) showing. I tried to delete the backup, but his does not work. I tried diskcleanup, but still the s