where two columns correspond to a single column

Hi in my where clause I need to match 2 to 1 columns

That is to say
session. CODE = 33
SN.code45 = 5555

So what I need is the session. CODE and SN.code45 (in collaboration with no space) = of

335555 = from

right (myString, len (myString)-2)

Tags: ColdFusion

Similar Questions

  • Single line based on two columns and a single column

    Dear members,

    I have a table that contains duplicate rows, for which a request should be able to extract the unique row in the table. Here the unique is not based on a single column, but it should be in two columns and also check on the uniqueness on a column.

    create table addr (varchar2 (10) firstname, lastname varchar2 (10), area varchar2 (3));

    insert into values addr ('bob', 'james', 1');
    insert into values addr ('bob', 'james', 1');

    insert into values addr ('harry', 'bert', ' 1');
    insert into values addr ('jimmy', 'bert', ' 1');

    insert into values addr ('sam', 'mac', '1');
    insert into values addr ('sam', 'Knight', '1');

    insert into values addr ('tom', 'sand', '1');
    insert into values addr ("cat", "mud", "1");


    The query output must contain 3 lines.

    Bob - james
    Harry - bert or jimmy - bert [or the other of them], but not both
    -Mac or sam - Sam Knight [or the other of them], but not both
    Tom - sand
    Cat - mud

    SELECT firstname, lastname as total area WHERE addr = '1' GROUP by firstname, lastname; It takes no duplication of single column...

    Any suggestions...
    SQL> with t_data
    as
    (
    select 'bob' as firstname, 'james' as lastname, '1' as area from dual union all
    select 'bob', 'james', '1' from dual union all
    select 'harry', 'bert', '1' from dual union all
    select 'jimmy', 'bert', '1' from dual union all
    select 'sam', 'mac', '1' from dual union all
    select 'sam', 'knight', '1' from dual union all
    select 'tom', 'sand', '1' from dual union all
    select 'cat', 'mud', '1' from dual
    )
    SELECT
            firstname,
            lastname,
            area
    FROM
            (
                    SELECT
                            t.*,
                            row_number() over(partition BY firstname order by 1) rn,
                            row_number() over(partition BY lastname order by 1) rn1
                    FROM
                            t_data t
            )
    WHERE
            rn     = 1
    AND rn1 =1 ;  
    
    FIRSTNAME       LASTNAME        AREA
    --------------- --------------- ----------
    bob             james           1
    cat             mud             1
    jimmy           bert            1
    sam             knight          1
    tom             sand            1
    
    SQL>
    
  • two column values in a single column

    Hi guys,.

    I have a requirement that i want to be viewing the two column values in a single as column... values year & product will be exposed in a unique column values

    Kind regards

    Sree

    Karthickumar Pillaiyarsamy yours is a database, in OBIEE is similar with some limitations...

    Sree! you have 2 ways to do this: by using the CONCAT function or the | operator, examples here are 2 concatenating year, a space and production:

    "Time". "" T05 annually name | ' ' || ' 'Products ' '. Product P1.

    CONCAT ("Time". "T05 per year of name', CONCAT (" ","Products".)" P1 product"))

    CONCAT in OBIEE accept only 2 params, so you if want to add a space between the 2 items, you must nest your function call.

    In case your year column is a number, you can convert it to a string using CAST ("your column" as VARCHAR (10)).

  • Returns all duplicate rows, where the columns correspond

    Dear members,

    I have a table that contains duplicates, and the query should return only the rows where the columns correspond...

    create master table (varchar2 (10) firstname, lastname varchar2 (10), code VARCHAR2 (3), place varchar2 (10));

    insert into Master values ('bob', 'John', '1', 'atlanta');
    insert into Master values ('bob', 'John', '1', 'atlanta');
    insert into Master values ('bob', 'John', '1', 'atlanta');

    insert into Master values ('test', 'John', '1', 'atlanta');

    Insert into master values('bob','john','1','bank');


    The application should we 3 rows.

    Bob-john-1-atlanta
    Bob-john-1-atlanta
    Bob-john-1-atlanta


    I tried a few changes to query such as select * from master M, mater n where m.firstname = n.firstname and...

    Is there another way to do this...

    Thanks in advance...
    select  firstname,
            lastname,
            code,
            place
      from  (
             select  m.*,
                     count(*) over(partition by firstname,lastname,code,place) cnt
               from  master m
            )
      where cnt > 1
      order by firstname,
               lastname,
               code,
               place
    /
    
    FIRSTNAME  LASTNAME   COD PLACE
    ---------- ---------- --- ----------
    bob        john       1   atlanta
    bob        john       1   atlanta
    bob        john       1   atlanta
    
    SQL> 
    

    SY.

  • selection of lines corresponding to two columns with two entry tables

    I have a table with two columns int primary key tab1. id1 and id2.

    Now I have two created two tables of figures: array1 {1, 2, 3,...} and {0, 1, 0,...} array2 Arrays have the same length.

    I want to do a select:
    Select * from tab1 where tab1.id1 = array1.column_value and tab1.id2 = array2.column_value;

    If I want to receive 13 lines with this request, I had 169 because it tries to match all the different combinations in the tables.

    If I do it with a loop for:

    for i of array1
    loop
    Select * from tab1 where tab1.id1 = array1 (i) and tab1.id2 (i);
    end

    That should illustrate what I want to do, I just thought it would be faster if I could do it without a loop, do not use the pl/sql. Can it be done? If not, should I use a loop for with bulk collect somehow?
    SQL> with t as (
      select 1 id1, 0 id2 from dual union all
      select 2, 0 from dual union all
      select 3, 0 from dual union all
      select 4, 1 from dual
    )
    --
    --
    select id1, id2
    from t,
         (select rownum rn1, a1.* from table (sys.odcinumberlist (1, 2, 3, 4)) a1) a1, --- array1
         (select rownum rn2, a2.* from table (sys.odcinumberlist (0, 1, 0, 1)) a2) a2  --- array2
    where (id1, id2) in ( (a1.column_value, a2.column_value)) and rn1 = rn2
    /
           ID1        ID2
    ---------- ----------
             1          0
             3          0
             4          1
    
    3 rows selected.
    
  • How to make a panelformLayout with two columns, where I need a column wider than the other?

    The second column must be more or less double first thant.

    It's the definition of the form:

    < af:panelFormLayout id = "pfl1" lines = '6' labelWidth = "120".

    Binding = "#{backingBeanScope.detalleBB.pfl1}" >

    two columns of fields is displayed.

    The second column has several panelgrouplayout - horizontal with three different areas requiring a more horizontal space than the first column which are fields of inoputtext.

    Currently the panelform gives the same horizontal space resulting in the packing in the second two-column and this conditioning is what I want to avoid.

    Thank you in advance.

    You plan to create another PanelFormLayout with a different width and put the two forms of panel inside a horizontal panel group presentation so that they compare side by side?

  • Should be changed to two full pages in a single page with two columns

    I have a schedule that is formatted to 8 1/2 x 11 size.  I want to change this option to display two pages on one page into two columns?  How can I do this?  Thanks in advance.

    It's extremely well beyond what is possible or even imaginable for PDF editing. Redo in Word; You can use export as Word, copy paste and export the images as tools to do this. Then again the PDF file.

  • The combination of two columns in a single

    Hi guys,.

    Is it possible for a query to combine two columns into one? For example, lets say I have the following query:

    SELECT ID, FIRST_NAME, LAST_NAME
    EMPLOYEES

    I want the output to have two columns: one that contains the ID and the other containing name followed by a space followed by LAST_NAME. I know how to do this outside the query using coldfusion, but it save me a lot of work if there is some way that the query could do for me.

    Yes but the operand of concatenation varies somewhat from a database
    management system to the other.

    In Oracle, it would look this IIRC.

    SELECT ID, FIRST_NAME. ' ' || LAST_NAME AS FULL_NAME
    EMPLOYEES

  • Number of matches between two columns

    Column1 Column2
    5 5
    5 2
    5 5
    4 3
    4 4
    Football match
    3

    I basically you want to compare two columns and count matches in the corresponding lines. I tried using the following formula:

    SUMPRODUCT (--($column1=$column2))

    ... but it doesn't work! Any suggestion?

    Tiago,

    It seems you are trying to use array formulas (maybe since excel?) who do not work in number.

    Here's how I would solve this problem:

    Make sure that the table where data is named 'Data' (as shown, or change the table name references to match your table name)

    Add a new column (C)

    C2 = AND (A2 = B2, A2≠ "")

    It's shorthand dethrone select cell C2, then type (or copy and paste it here) the formula:

    = AND(A2=B2, A2≠"")

    Select cell C2, copy

    Select cells C2 at the end of the C column, paste

    the formula say to check to see if the cell in column A is NOT empty, and is equal to the cel in column B

    Now in the summary table (single cell table):

    A1 = COUNTIF (Data::C, TRUE)

  • How to compare two columns in Xl

    I want to compare two columns in the file of Xl. column A contains phrases and column B contains the words

    For example

    Column A                                                                       Column B                                                                           Column C

    I have an Apple and I'll eat every day Apple Apple

    I have a banana and eat weekly banana papaya

    Oranges are rich in nutritions cauliflowers Oranges

    Papaya is good for health                                               Grapes                                                                                 Papaya

    Oranges

    Lichi

    Banana

    I want to check each value of column B in each cell in column A, and if it matches then it should return the corresponding value in the result to me. Column C should Look Like as shown above.

    Can someone point me in the right direction here of what formula to use for this Xl.

    Thank you

    This is a forum for Mac OS X technologies, so here's an Applescript solution:

    1. Copy-paste the script in the Script Editor
    2. Select the cells in columns A and B
    3. Command + c to copy to the Clipboard
    4. Click on the button "run" in the Script Editor
    5. Click once in the top cell in column C where you want the data
    6. Command + v to paste

    Here are the results:

    There is no verification error here. You must select and copy to the Clipboard before the race.

    SG

    the value LstOfLsts to makeListOfLists (the Clipboard as a 'class utf8 ')

    the value theSentences to getCol1Vals (LstOfLsts)

    the value collected in getCol2Vals (LstOfLsts)

    game of theMatches to «»

    Repeat with I in collected items

    If theSentences contains I then ¬

    the value of theMatches to theMatches & i & return

    end Repeat

    Set the Clipboard for theMatches

    to getCol1Vals (LofL)

    game of col1Vals to «»

    Repeat with en LofL points

    the value col1Vals to the col1Vals & "" & i point 1

    end Repeat

    end getCol1Vals

    to getCol2Vals (LofL)

    the value col2Vals to {}

    Repeat with en LofL points

    If i's point 2 is not "" then ¬

    i copy point 2 to the end of col2Vals

    end Repeat

    return col2Vals

    end getCol2Vals

    at makeListOfLists (theTxt)

    value was to theTxt paragraphs

    the value text point of delimiters

    the value theListOfLists to {}

    Repeat with I from 1 to count was

    the value theListOfLists to the theListOfLists & {the was point i text elements}

    end Repeat

    the value point text delimiters to «»

    return theListOfLists

    end makeListOfLists

  • Insertion of a middle Page of separate text on a two column layout box

    Hello!

    I'm working on a book with a layout in two columns.  At various times, I need to insert what are effectively the chapter breaks.  Currently I have a giant text block flowing for all 65 pages.  This provision is (I think?) made necessary by the scripts that I am running for our line numbers and our notes.

    My original idea was to put the chapter title in a separate text block and wrap the text around it, so that I can keep the unique setting of the main text.  Unfortunately, in the two-column layout, this means that the text in the first column went * under * the title of the chapter to complete the first column, no matter where I moved it.

    I think I may need to end the block of text of the first chapter and start a second for the new chapter get the result I want.  However, I have a few worries about that: first of all, if I ended up simply text block, I should remove the other 55 pages (after the break) I already partially formatted and screw them from scratch in the text box of the new chapter?  Secondly, I also fear that making a separate text block could ruin my scripts endnote and line numbers.

    (NB: if I need to put an end to this block of text and starting a new one, I can't find a way to do it on a page at the beginning of a block of text in several pages, so I need help with this, too.)

    Y at - it a simple way to insert this text box so that text of the first chapter ends perfectly in two columns above it, and the next chapter starts cleanly into two columns underneath?

    Please see attached screen captures, showing the current state of things.  The text box has been inserted with a simple wrap around it.

    2016-08-02 (1).png

    THANK YOU IN ADVANCE!

    Hello

    Have you checked characteristic Columns Span integrated InDesign? http://InDesignSecrets.com/timesaver-span-and-split-columns-in-CS5.php

    Now that you have your text formatted in a single framework with two columns, you can select the chapter header text and tell him to cover all the columns in the text block.

    This warp the need to set up a separate text frame.

    The only downside I can think is that you use the the duration columns can slow down InDesign a bit.

    Ariel

  • retriving of unique records on two columns

    Hello world


    Using sql query, that he must retrieve unique records on two columns.

    Example of table source: raster columns [uwi, well_no]

    Examples of data below


    UWI well_no

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

    1 988311

    1 988311

    1 1032662

    1 1032662

    2 103

    2 103

    2 103

    3

    3 104

    3 104

    3 104

    4 106

    4 107

    4

    4 108

    For a given

    UWI: 1 there are 4 well_no which is having two distinct values where these documents I need to go get

    UWI: 2 there are 3 well_no, all 3 well_no contains the same value as (103) Consequently, these documents should not seek

    UWI: 3 there are 4 well_no (1 null and 3 values are the same (104)] where these records should not seek.)

    UWI: 4 there are 4 well_no which is to have three separate with a single value zero so these 4 files, I need to get.

    output:

    UWI well_no

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

    1 988311

    1 988311

    1 1032662

    1 1032662

    4 106

    4 107

    4

    4 108

    Thank you

    Jery

    Hi, Michel,.

    Whenever you have a question, please post CREATE TABLE and INSERT statements for your sample data, so people who want to help you can recreate the problem and test their ideas.

    Format your message so that it is easy to read and understand.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

    Maybe you want something like this, which shows information about the jobs that have deptnos 2 or more not NULL:

    WITH got_cnt AS

    (

    SOME jobs, deptno

    , ACCOUNT (SEPARATE deptno) RESUMED (work PARTITION) AS cnt

    FROM scott.emp

    )

    SOME jobs, deptno

    OF got_cnt

    WHERE cnt > 1

    ;

  • Two columns must be UNIQUE if the second is not NULL.

    Two columns must be UNIQUE if the second is not NULL. If the second is NULL, the first has no need to be UNIQUE.

    CREATE TABLE Moo
    (
    Prima        INT PRIMARY KEY,
    Secunda    INT NOT NULL,
    Tertia        VARCHAR2(1)
    );
    
    CREATE UNIQUE INDEX Cow ON Moo(Secunda, NVL(Tertia, TO_CHAR(Prima)));
    
    INSERT INTO Moo(Prima, Secunda, Tertia)
    SELECT 1, 1, NULL FROM Dual UNION ALL
    SELECT 2, 1, NULL FROM Dual;
    
    DROP TABLE Moo;
    
    

    Is there another way to do it?

    Added 'SINGLE '.

    I had a little trouble at matches your description to your example, but if you want to apply the uniqueness on (secunda, tertia) only for lines where tertia is not null, then the following should work:

    create an index unique xxx on moo)

    cases when is not null, then end of secunda, tertia

    Tertia

    );

    Concerning

    Jonathan Lewis

    P.S. When do a quick test of the best way to define this index, I found what seems to be a bug in 11.2.0.4 (and maybe other versions) with the expression:

    Tertia case if no then cast (null as an int) to another end secunda

    Update: now blog at: Easy & #8211; Oops. | Notebook of the Oracle

  • Canning tools Panel or by default in a two-column layout

    I have Illustrator CC (latest version) on a Mac (Yosemite), and I feel this weird glitch where each time I start up the illustrator of Toolbox on the left is a two-column page layout. I have to click it each time to get to the single column page layout I prefer. I saved a workspace personalized in order to maintain my favorite diagram and it is always in a two column orientation. I also tried to save several different page layouts, thinking it was the working space profile that has been altered. No luck. Any ideas?

    If the tools do not fit in a single column, the Panel will return to two columns.

    They fit them in your case?

  • Thick border line between two columns

    Hello all;

    I have a requirement where the user must be able to distinguish between two columns hnce asking a thick line, rather than the usual 'by default'.

    Everything is 'Default' until then.
    I clicked on properties of the 1st column and in the section "Border", I chose "Custom" and made the right wall of the cell in black color.
    I see a thick border now, but it has eliminated the 'default' border separating lines. His party make the entire column look like a single cell.

    I don't want any change with the exception only of the border of a column of a black line.

    Any help is greately appreciated.

    Thank you!

    The column properties-> Options of Style CSS custom (HTML only)-> use custom CSS Style->
    the following CSS code
    border-right-width: 1px; border-right-color: green;

    or go with someone with the necessary changes

    Appreciate if you score as correct if it works

    Published by: Srini VIEREN on December 11, 2012 16:43

Maybe you are looking for

  • You need not a laptop upscale for playing games

    I have a satellite L30-134 and I am really very impressed. I can play NFS Carbon at 1024 x 768, low details with sentence a glitch. I read somewhere that the X200m has features similar to the Radeon 9200le, and that's good enough for me for now. Alth

  • Bad port 5 swich?

    Hosts: I used this same switch 5 ports for awhile but removed that I is no longer necessary to share the connection. Now, I needed to reuse the switch. I connected the cable between the router and the swih e-NET and the port fire lighted up as expect

  • BlackBerry smartphone how to synchronize my calendar with gmail?

    Hello I understand that Google Sync now works (at least not for me!). Can you tell me how I can now synchronize the calendar on my BB with my gmail calendar, please? Thank you Andy

  • The phones call log smart blackBerry on each icon

    On my "BOLD", icons from time to another stop functioning and only will pull up the call log.  Send icons, browser icons, application icons, etc., does not work and will instead pull up the call log.  Menus will stop working as well; the menu key wor

  • Import photos already imported previously

    I use Windows 7 and had previously imported photos from my camera.  Something happened with my computer and now I want to import the photos again, but it won't let me because they had previously been imported.   How do I change the setting so I can r