WHERE the use of the results of other returnees

Hello

Example:
< cfquery name = "Query1" datasource = "MaBase" >
SELECT Table1ID, A, B, C
FROM Table1
WHERE A = #Form.A #.
< cfoutput query = "Query1" > #A # < br > < / cfoutput >
It returns:
3
4

< name cfquery = "QUERY 2" datasource = "MaBase" >
SELECT Table2ID, A, Z, Y
FROM Table2
WHERE A (3,4)
< cfoutput query = 'QUERY 2' > #Table2ID # < here > < / cfoutput >
It returns:
one
b
c
d
e
f

But if I do QUERY2 as:
< name cfquery = "QUERY 2" datasource = "MaBase" >
SELECT Table2ID, A, Z, Y
FROM Table2
IN THE CASE (#QUERY1.) A #)
It only returns:
one
b
c

The values a, b, c are where Table2ID A = 3
The values of d, e, f are the Table2ID' where A = 4

How can I get back all the values?

Hope you understand.
Thank you
Manel

I'm guessing that something like this:


SELECT Table1ID, A, B, C
FROM Table1
WHERE A = #Form.A #.


SELECT Table2ID, A, Z, Y
FROM Table2
In the CASE (#your_list #)

(You would use quotedvaluelist() and preservsinglequotes() If you wanted a list of non-numeric values.)

Phil

Tags: ColdFusion

Similar Questions

  • How to start a job using DBMS_SCHEDULER depending on the result of other JOBS

    How to start a job using DBMS_SCHEDULER depending on the result of other JOBS

    For example I have two jobs A and B of EMPLOYMENT, I would like to start JOB B only when a JOB is complete, is an option like that?

    Hello

    Yes, you can create a channel with the Scheduler, see the documentation:

    Creation and management of channels of employment

    http://docs.Oracle.com/CD/E11882_01/server.112/e25494/scheduse.htm#ADMIN10021

  • When I search something, firefox opens a new tab with the results. How can I change the settings to where it will stay all in the same tab?

    When I search something Firefox automatically opens a new tab with the results of this research. How can I change the settings to where the results will appear in the same tab where I made the research?

    If you want to open search results in a new window most often is a parameter of the search engine you use.

  • Click on the result of the search, window opens then immediately closed

    Firefox on my desktop with windows 8.1 recently don't right notwork. After that I did a google search and click on the found result, Firefox opens a new window (this is the option you selected), and then immediately closed. This only occurs for some of the results. Others are okay. Also, if I click with the right button on the search results and let Firefox opens a new window, it works very well. Firefox on my laptop works very well too. Not sure what had happened.
    I uninstalled Firefox and reinstalled. The result is the same. I hope someone can help.

    FredMcD said

    Disable AdBlock by using the arrow next to its icon. Load this web page.
    Click the arrow, and then select disable on... Then enable AdBlock.

    BTW, what is the web page? AB should only block ads.

    I tried your method. This works. The funny thing is that if I unlock the Google search page, it solved the problem. The page had problem was:
    https://search.Yahoo.com/YHS/search?p=Time+Warner+Cable & ei = UTF - 8 & hspart = Mozilla & hsimp = YHS-001

  • Populate drop-down list with the results of several drop-down lists

    Hi, I am creating a form where the results of two drop-down lists then would fill another drop-down list. I'm not new to javascript, but I'm new to using it in Acrobat, so while I found some answers to this: Drop-down list fill in multiple fields of text. I don't know where to implement this, if it is still the right thing, I'm looking for pipes for

    Oh and I use Acrobat Pro DC. Any help would be much appreciated!

    OK, you can create a function at the level of the document that is called in the Validate event of each of the two first drop down menus, something like:

    Function in JavaScript to the document level

    function updateDropdown() {}

    Get references to the drop-down menus of entry

    var F1 = getField ("DropdownList1");

    var F2 = getField ("DropdownList2");

    Refer to the output drop-down list

    F3 var = getField ("DropdownList3");

    Get the values of input field, as strings

    var s1 = event.target = f1? Event.value: f1.valueAsString;

    var s2 = event.target = f2? Event.value: f2.valueAsString;

    Fill the drop-down list of output with the elements, or deselect it if either input dropdown is 'empty' (single topic area)

    If (s1 = "" |) s2 === " ") {

    F3.clearItems ();

    } else {}

    F3.setItems (["", s1, s2]);

    }

    }

    In the two first downs Validate event, call this function like this:

    updateDropdown();

    You can of course name the function you want. More information about the properties and the methods used in the code are available in the Acrobat JavaScript documentation.

  • How to test a procedure returns the result set

    Hello

    I have a following code:

    {color: #0000ff} create or replace the TYPES of PACKAGING
    AS
    type cursorType is ref cursor;
    end;

    create or replace PROCEDURE GetAllCategories (p_cursor in the Types.cursorType)
    AS
    Start
    Open p_cursor for SELECT * CATEGORY;
    end; {color}

    I would like to test the procedure of * {color: #000000} visualization output resultset {color} *. How can I do with SQL Developer?
    In fact, when select RUN in SQL Developer, I got the following code:

    DECLARE
    P_CURSOR types.cursorType;
    BEGIN

    GetAllCategories (P_CURSOR = & gt; P_CURSOR);
    END;

    When I run it, it is successful but there is no result set displayed. However if I execute SELECT * FROM category only in the SQL Editor, I see the result set in the grid. Then where the result set did when he went through the procedure?

    Thanks in advance for any help.

    Published by: CarbonFiber Sep 22, 2008 20:52

    Is a simple way with sqlplus

    SQL> create or replace package types
      2  as
      3     type cursortype is ref cursor;
      4  end;
      5  /
    
    Package created.
    
    SQL> create or replace procedure getallemp(p_cursor in out types.cursortype )
      2  as
      3  begin
      4     open p_cursor for select * from emp;
      5  end;
      6  /
    
    Procedure created.
    
    SQL> var lcursor refcursor
    SQL>
    SQL> exec getallemp(:lcursor)
    
    PL/SQL procedure successfully completed.
    
    SQL> print lcursor
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO        DIV
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ----------
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20         10
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30         10
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20         10
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30         10
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30         10
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10         10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20         10
          7839 KING       PRESIDENT            17-NOV-81       5000                    10         10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30         10
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20         10
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO        DIV
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ----------
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30         10
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20         10
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10         10
    
    14 rows selected.
    

    Thank you
    Knani.

  • Where the log file is located (Win Vista) for the actions of OTHER USERS have taken to using the boxes in user account control?

    Where the log file is located (Win Vista) for the actions of OTHER USERS have taken to using the boxes in user account control?

    I use the version of Vista Home Premium.

    While I don't really like how the UAC area enters the information that tells it when to display the box tell me about your work of things on the UAC (I know an article exist on the web), is not how to answer this question.

    There is no log of UAC elevation file.

  • Using the result of the Action as input for one other Action - is not possible?

    Hello

    I have something I call the presentation. According to our phases of deployment, it will return the fields it is possible to select.

    Domain-> GetAction("com.companyxyz.presentation","getDomainsForDeploymentStage").call (#deploymentStage)

    Then I want to take a vlan backup according to the field

    VLAN-> GetAction("com.__companyxyz__.presentation","getBackupVlan").call (#deploymentStage, #Domain)

    However, the '#Domain' value is always zero in action script.

    If I use GetAction("com.__companyxyz__.presentation","getBackupVlan").call (#deploymentStage, "server.local"), it returns the expected value.

    Is there a limitation that I can't use the results as input for another action action?


    I use vRO 7.0

    Hello

    It's certainly doable.

    I guess deploymentStage, domain and vlan are the input parameters for the workflow, right? There are two things to check carefully:

    • First of all, make sure your actions getDomainsForDeploymentStage and getBackupVlan handle code values no entry script gracefully.
    • Then, it depends on what property of presentation you linked calls from these actions. It is by default? If so, please change it to data binding, default values are calculated only once, at the beginning of the presentation run, and it is possible that, currently, the deploymentStage value is always set to null. On the other hand, the data bindings are calculated on every time the fields that they depend on, so your actions can be called with null deploymentStage first, but then, when deploymentStage gets its real value, the data bindings will be calculated with the non null deploymentStage.
  • How do I avoid the accumulation of color / opacity where two brush strokes overlap?  In other words, I want to use more than one path with the Paintbrush tool, but see no additive effect where strokes overlap.  What Miss me?

    How do I avoid the accumulation of color / opacity where two brush strokes overlap?  In other words, I want to use more than one path with the Paintbrush tool, but see no additive effect where strokes overlap. 5 Lightroom

    I use it all the time. Turn your opacity, density and traffic all 100%.

    Benjamin

  • where can I use statement box put Null or not primary key or null in the result?

    create the table test_target

    (

    letter_grade varchar2 (2) null,

    grade_point number (3,2) not null,

    max_grade number (3).

    min_grade number 4

    );

    create the table test_source

    (

    letter_grade VARCHAR2 (3),

    grade_point number (3,2).

    max_grade number (3,2).

    min_grade number (3).

    created_by date,

    Modified_By date

    );

    with the CBC as

    (

    Select src.table_name src_table_name, src.column_name src_col_name, src.data_type src_data_type, src.data_length src_data_len, src.data_precision src_data_precision, src.data_scale src_data_scale, src.nullable src_nullable

    user_tab_columns CBC

    where table_name = 'TEST_SOURCE '.

    ),

    As TGT

    (

    Select tgt.table_name tgt_table_name, tgt.column_name tgt_col_name, tgt.data_type tgt_data_type, tgt.data_length tgt_data_len, tgt.data_precision tgt_data_precision, tgt.data_scale tgt_data_scale, tgt.nullable tgt_nullable

    of tgt user_tab_columns

    where table_name = 'TEST_TARGET '.

    ),

    col_details as

    (

    Select src.src_table_name, nvl (tgt.tgt_table_name, first_value (tgt_table_name) more (order of nulls last tgt_table_name)) tgt_table_name;

    SRC.src_col_name, src.src_data_type, src.src_data_len, src.src_data_precision, src.src_data_scale, src.src_nullable,

    TGT.tgt_col_name, tgt.tgt_data_type, tgt.tgt_data_len, tgt.tgt_data_precision, tgt.tgt_data_scale, tgt.tgt_nullable

    the CBC

    outer join left tgt

    on)

    SRC.src_col_name = tgt.tgt_col_name

    )

    )

    Select *.

    de)

    Select the case sensitive option

    When tgt_data_type! = src_data_type or tgt_data_len! = src_data_len or tgt_data_precision! = src_data_precision or tgt_data_scale! = src_data_scale or tgt_nullable! = src_nullable

    then 'alter table ' | tgt_table_name | 'Edit ' | tgt_col_name | ' ' || src_data_type | ' (' ||

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then nvl (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    When tgt_col_name is null

    then 'alter table ' | tgt_table_name | 'Add ' | src_col_name | ' ' || src_data_type |

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then nvl (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    end alter_statement

    of col_details

    )

    where alter_statement is not null;

    result:

    ALTER table TEST_TARGET change LETTER_GRADE VARCHAR2 (3) / / if it is null or not null primary key or want to see the result as alter table TEST_TARGET change LETTER_GRADE VARCHAR2 (3) null or not null or primary key

    ALTER table TEST_TARGET change the NUMBER of MAX_GRADE (3, 2)

    ALTER table TEST_TARGET change the MIN_GRADE NUMBER (3, 0)

    ALTER table TEST_TARGET add CREATED_BY

    ALTER table TEST_TARGET add MODIFIED_BY

    Please try:

    drop table test_target purge;

    drop table test_source purge;

    create the table test_target

    (

    letter_grade varchar2 (2) primary key,.

    grade_point number (3,2) not null,

    max_grade number (3) unique.

    min_grade number 4,

    MIN_AGE number 4

    );

    create the table test_source

    (

    letter_grade VARCHAR2 (3),

    grade_point number (3,2).

    max_grade number (3,2).

    min_grade number (3).

    created_by date,

    Modified_By date

    );

    with the CBC as

    (

    Select src.table_name src_table_name, src.column_name src_col_name, src.data_type src_data_type, src.data_length src_data_len, src.data_precision src_data_precision, src.data_scale src_data_scale,

    CBC. Nullable src_nullable, decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as src_cons

    user_tab_columns CBC

    left join (select Cc.Column_Name, Uc.Constraint_Type

    of user_cons_columns cc, uc user_constraints

    where Cc.Constraint_Name = Uc.Constraint_Name

    and Cc.Table_Name = Uc.Table_Name) t

    on T.Column_Name = Src.Column_Name

    where table_name = 'TEST_SOURCE '.

    ),

    As TGT

    (

    Select tgt.table_name tgt_table_name, tgt.column_name tgt_col_name, tgt.data_type tgt_data_type, tgt.data_length tgt_data_len,

    TGT.data_precision tgt_data_precision, tgt.data_scale tgt_data_scale, tgt.nullable tgt_nullable,

    Decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as tgt_cons

    of tgt user_tab_columns

    left join (select Cc.Column_Name, Uc.Constraint_Type

    of user_cons_columns cc, uc user_constraints

    where Cc.Constraint_Name = Uc.Constraint_Name

    and Cc.Table_Name = Uc.Table_Name) t

    on T.Column_Name = TGT. Column_Name

    where table_name = 'TEST_TARGET '.

    ),

    col_details as

    (

    Select src.src_table_name, nvl (tgt.tgt_table_name, first_value (tgt_table_name) more (order of nulls last tgt_table_name)) tgt_table_name;

    SRC.src_col_name, src.src_data_type, src.src_data_len, src.src_data_precision, src.src_data_scale, src.src_nullable, src_cons,

    TGT.tgt_col_name, tgt.tgt_data_type, tgt.tgt_data_len, tgt.tgt_data_precision, tgt.tgt_data_scale, tgt.tgt_nullable, tgt_cons

    the CBC

    outer join full tgt

    on)

    SRC.src_col_name = tgt.tgt_col_name

    )

    )

    Select *.

    de)

    Select the case sensitive option

    When tgt_data_type! = src_data_type or tgt_data_len! = src_data_len or tgt_data_precision! = src_data_precision or tgt_data_scale! = src_data_scale or tgt_nullable! = src_nullable

    then 'alter table ' | tgt_table_name | 'Edit ' | tgt_col_name | ' ' || src_data_type | ' (' ||

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then nvl (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    ||

    cases where tgt_nullable = 'Y' then 'null '.

    of another end 'not null '.

    || tgt_cons

    When tgt_col_name is null

    then 'alter table ' | tgt_table_name | 'Add ' | src_col_name | ' ' || src_data_type |

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then nvl (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    || tgt_cons

    When src_col_name is null

    then 'alter table' | tgt_table_name: ' drop '. tgt_col_name

    end alter_statement

    of col_details

    )

    where alter_statement is not null;

    priamry key and unique key you choose user_contraints

    Check and change for your condition

    Concerning

    Mr. Mahir Quluzade

  • Merge document and merge Word using Excel data does not display the result required in the merged document.

    I have created a merge document and mail merge in word using an excel sheet spread as a data source.  Initially, no sign of £ showed in the document among other formatting problems.  I have (finally) found help explaining that I should use MS Excel via a DDE data sheets - I tried this but it seems to corrupt the data so that the column that contains say '1 names' contains "price data", "address" line contains the data of 'comments', making the e-mail merge nonsense.

    If you use an alternative data source is CBO or something all NFL results (which wasn't shown on the worksheet) appear in the mail merge '0' both are unacceptable.

    Surely I'm not the only person to meet these challenges is the software never tested before being sold where is the help manual, I tried to use the online help but will not accept my product key.  All solutions provide the most basic assistance but my documents are fairly complex something computers should be good.  I lost most of today on this.  Sometimes I think it would be faster to type these longhand things than to use a Microsoft product.

    Hello

    Please check with the experts of the Office, Word and Excel here: (just repost your questions)

    Answers - Excel Forums
    http://answers.Microsoft.com/en-us/Office/ee861099.aspx

    Answers - Word Forums
    http://answers.Microsoft.com/en-us/Office/ee861096.aspx

    Answers - Office Forums
    http://answers.Microsoft.com/en-us/Office/default.aspx

    Or

    Discussions in Excel worksheet functions
    http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Excel.worksheet.functions&lang=en&CR=us

    Discussions in Word Application errors
    http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Word.application.errors&lang=en&CR=us

    Discussions in Excel General questions
    http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Excel.misc&lang=en&CR=us

    MS Office discussion groups
    http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspx
    And here:

    Discussions in microsoft.public.excel.worksheet.functions
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Excel.worksheet.functions&cat=en_us_b5bae73e-d79d-4720-8866-0da784ce979c&lang=en&CR=us

    Discussions at the Microsoft.public.Excel
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Excel&cat=en_us_a09d72a4-715e-4c37-bcd5-75e0fc616b1f&lang=en&CR=us

    Microsoft.public.word.application.errors discussions
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Word.application.errors&cat=en_us_f09268b3-8479-4cea-8037-d168d96833ac&lang=en&CR=us

    Office newsgroups
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Office.Setup&cat=en_us_642d5640-c1ba-43C3-A224-b3ec1473346c&lang=en&CR=us

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • Where to see the result of the action of the HTML Plugin

    Hello

    I was going through the tutorial in "vsphere-client-sdk/html-bridge/docs/html-tutorial.html" and I created a plugin html test with the default actions. I can see the error message pop-up by clicking on sample 1 action. But when we try to call action sample 2, nothing happens. I can see the default implementation in SampleActionService, which returns true for the action of sample 2. I also have an actions.jsp in test-ui/WEB-INF/views.

    Could you please tell me if I'm missing something here, or you need any other details. fixing of plugin.xml

    See the documentation on html-bridge/docs/html-bridge.html#actions Actions.

    This example project uses the actions without a head , for whom the only thing possible is to return an ActionResult to update your model (add, delete, or modify an object).  You can't handle the result of the action in your own code because your code issue that share and also it is not possible to configure a custom 'callback javascript', a reminder of Flex in the same way as you could have if you were writing to the Flex user interface.

    But... the most common use cases of actions user interface, as described in the RFSO. Add a parameter to the dialog box and the action opens a dialog (for example a confirmation alert, an entry form, Wizard, etc.) where you control the content and can do what you want.  See the example for chassisA for this kind of code.

  • Where is the result of the following query caching?

    I run the following query statement:
    select * from hr.employees
    Where is the result of the following query caching? Is cached in the PGA? What area of PGA?

    By definition is not "cache". The blocks of data that are read to retrieve the results of the query are retrieved in the cache (DB_CACHE_SIZE or DB_BLOCK_BUFFERS component BMG) buffers so that they are accessible on several occasions by the same users or other users. However, because the buffer cache is limited in size, buffers are released when new blocks to be read. Buffers for a full table scan (as it would be for such a request) are released very probably earlier.

    Please read the Oracle database documentation, starting with the Concepts manual for the version you are using. Starting at http://tahiti.oracle.com

    Hemant K Collette

  • Can Firefox users annoyed with changes apply in the recent updates, other reccomed browsers that are similar to the use of Firefox to be?

    And please get this done by reference... Google org.

    delete messy, juvenile content

    Please see the rules and lines guidelines .

    Hello

    The people who answer questions here are for the most part, other users Firefox dedicating volunteer their time (like me), not employees of Mozilla or Firefox developers.

    If you want to leave a comment for the developers of Firefox, you can go to the Firefox help menu and select submit comments... or use this link. Your comments gets collected at http://input.mozilla.org/, where a team of people read it and collect data on the most common questions.

  • Java has been blocked because of the threat, I did the update, and other options to reactivate it ie.manual update reinstalls still websites like YouTube always used to load up. Works great in Chrome &amp; IE!

    Java has been blocked because of the threat, I did the update, and other options to reactivate it ie.manual update reinstalls still websites like YouTube always used to load up. Works great in Chrome & IE!

    Your list of plugins in "Details of the system more" Watch 1.6.0_31 of next generation Java plug-in for browsers Mozilla for Java should not be blocked.

    Could you post a link to a Web page where Java does not work for you? YouTube uses the Flash, not Java. Here is a list of the test pages of Java that you can try to verify that Java works, of http://kb.mozillazine.org/Java#Testing_Java

    Moreover, I see in your list of plugins you also the VLC media player Plugin Web 2.0.0 so, it is possible that the VLC plugin is causing a conflict if YouTube or other videos do not work. See Fix common audio and graphics problems (you may have to disable the VLC Media Player plugin in the Add-ons-> list of Plugins for some media to play).

Maybe you are looking for