Effect of an additional table in the FROM clause in the query results?

I recently helped a colleague debug one of their SQL statements

The output was showing some very unexpected totals, and I was able to shrink down to an additional table in the FROM clause, but not used anywhere else in the application.

Thus, for example

SELECT A.ID, B.CODE
Of
EMPLOYEE,
B OF THE STATUTE,
PAY THE SAL
WHERE A.ID = B.ID
AND
A.ID = 1;

I was wondering, how can an extra table in a FROM clause influence directly on the rest of the query?

The query above is just an example of what I've seen, the my co worker was working on is a bit larger and a lot more code to read. I noticed that when I added/removed the extra table in my query to co workers and then it worked as expected.

I always thought that an additional table is not attached to what anyone would be just to do the inefficient code, but does not affect output
just do the inefficient code

Yes, that too, you will get a Cartesian product by calling is not the entries in the where clause for this table 'disappeared' :(

Tags: Database

Similar Questions

  • Question about how to calculate an additional column in the query result.

    Hello PL/SQL gurus and experts.

    I use Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64-bit Production version


    Currently, I have the data in the following manner-
    drop table T2;
    create table T2(Year, MastTot, BechTot, Tot) as select
    '2008', '20000', '450000', '470000' from dual union all select
    '2008', '50000', '324000', '374000'  from DUAL union all select
    '2009', '25000', '450000', '475000'  from dual union all select
    '2009', '250000', '324000', '574000' from DUAL union all select
    '2010', '120000', '450000', '570000' from dual union all select
    '2010', '52000', '324000', '376000'  from DUAL union all select
    '2011', '220000', '450000', '670000' from dual union all select
    '2011', '52000', '324000', '376000'  from DUAL ;
    I want that data to present the following year (production).
    Year     MastTot     %Change     BechTot     %Change     Tot     %Change     %Total
    2009     275000     292.86     774000     0     1049000     24.29     27
    2010     172000     -37.45     774000     0     946000     -9.82     24.35
    2011     272000     58.14     774000     0     1046000     10.57     26.92
    Total     789000     313.54     3096000     0     3885000     25.04     78.28
    I use the following sql query-
    select decode(grouping(Year), 0, Year, 'Total') Year,
           To_Char(sum(MastTot), '999,999,999,999,999,999,999.99')  "MastTot",
           To_Char(sum(BechTot), '999,999,999,999,999,999,999.99')  "BechTot",
           To_Char(sum(Tot), '999,999,999,999,999,999,999.99')  "Tot",
           round((sum(Tot)/nullif(max(total_amount),0)) * 100, 2) "%Total"
      From
    (
    select Year,
           sum(MastTot) MastTot,
           sum(BechTot) BechTot,
           sum(Tot) Tot,
           SUM(Tot) over() total_amount
      From t2
    group by Year,Tot
    )
    where Year>'2008'
     group by grouping sets((Year),())
    order by Year
    But I am not able to read the % change column. Kindly help me with this.
    All the efforts and assistance in this regard is very appericated and I will be thankful to you...

    user555994 wrote:
    Thanks for the reply JAC,

    you are making reference to the line in the code

    round((sum(Tot)/nullif(max(total_amount),0)) * 100, 2) "%Total"
    

    Here, I'm looking for the Total % against the maximum value of the tot...

    SQL> with t
      2  as (
      3  select year,masttot,lag(masttot) over(order by year) prevm,
      4      BechTot,lag(BechTot) over(order by year) prevb,
      5      tot,lag(Tot) over(order by year) prevt,
      6      sum(tot) over(order by null) sm_t
      7  from(
      8  select Year,
      9         sum(MastTot) MastTot,
     10         sum(BechTot) BechTot,
     11         sum(Tot) Tot
     12  From t2
     13  group by Year
     14   ))
     15  select year,sum(masttot) masttot,
     16     sum(((masttot-prevm)/prevm)*100) Perc_m,
     17         sum(BechTot) bechtot,
     18         sum(((BechTot-prevb)/prevb)*100) Perc_b,
     19         sum(tot) tot,sum(((tot-prevt)/prevt)*100) Perc_t,
     20         sum((tot/sm_t)*100)  perc_total
     21  from t
     22  where year > 2008
     23  group by rollup(year);
    
          YEAR    MASTTOT     PERC_M    BECHTOT     PERC_B        TOT     PERC_T PERC_TOTAL
    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
          2009     275000 292.857143     774000          0    1049000 24.2890995  27.001287
          2010     172000 -37.454545     774000          0     946000 -9.8188751 24.3500644
          2011     272000 58.1395349     774000          0    1046000 10.5708245 26.9240669
                   719000 313.542132    2322000          0    3041000 25.0410489 78.2754183
    
  • APEX_APPLICATION. G_F0x tables in the query

    Hello

    Is it possible to use APEX_APPLICATION. G_F0x tables in the query and select it at the table?

    I like to select values from table bunch I have on the table.
    Of course I can loop table, but I like to select at once as
    SELECT e.*
    FROM emp e
    WHERE EXISTS(
      SELECT 1
      FROM TABLE(APEX_APPLICATION.G_F01 AS empno) a
      WHERE e.empno  = a.empno
    )
    I don't know is it still possible.

    Thanks in advance.

    Kind regards
    Jari

    Jari

    No, you cannot use the TABLE operator on a PL/SQL associative array as apex_application.g_f01: it requires a nested table or a table variable declared as an object database. You can access apex_application.g_f01 by using a function in the pipeline in this way.

  • Need help to understand the query result

    Hi gurus

    I was reading one of the question here in this forum and its link is below:

    Query required for scenario

    I had some confusion related to this code and don't understand the logic of the out put, see query below:

    Query

    with sub_services as

    (

    Select su_seq 12323, 'HLR1' so_id, 1 seq Union double all the

    Select su_seq 12323, "HLR2' so_id, seq 2 Union double all the

    Select su_seq 12323, "A09" so_id, seq 3 of all the double union

    Select su_seq 12333, "MO1" so_id, seq 4 Union double all the

    Select su_seq 12333, "MO2' so_id, seq 5 Union double all the

    Select su_seq 12333, "A09" so_id, 6 seq in union double all the

    Select su_seq 12333, 'M0CR' so_id, seq 7 Union double all the

    Select su_seq 12999, "LOL1' so_id, seq 8 Union double all the

    Select su_seq 12999, "LOL2' so_id, seq 9 double

    )

    Select *.

    of sub_services b

    where exists (select 1 from sub_services

    where su_seq = b.su_seq

    and so_id = 'A09.

    )

    order by 2;

    The query result

    12323 A09 3

    12333 6 A09

    12323 HLR1 1

    12323 HLR2 2

    12333 M0CR 7

    12333 4 MO1

    12333 5 MO2

    According to my understanding, the above query should return records in red only because of her is below command

    It exists (select 1 from sub_services

    where su_seq = b.su_seq

    and so_id = 'A09.

    but don't know why he's back 7 files, can someone help me understand the result...

    It is query is functionally identical to the PL/SQL block, but much more effective.

    declare

    number of l_res;

    Start

    for line (select *)

    sub_services) loop

    Start

    Select 1 from l_res

    of sub_services

    where su_seq = row.su_seq and

    so_id = "A09" and

    rownum = 1;

    exception when

    NO_DATA_FOUND then

    null;

    end;

    end loop;

    end;

    Essentially every row in the outer query are tested against him exists query.  Given the correlation between two requests is based only on su_seq each line with a su_seq value returned by him is returned in the output.

    Another way to think he uses instead a join condition.  This query is equivalent to the query to exist

    Select the main

    of main sub_services

    Join select (separate su_seq

    of sub_services

    where so_id = "A09") cond

    We main.su_seq = cond.su_seq;

    John

  • How to get SQL Developer 4.1 to display the query result?

    SQL DEV 4.0.3.16.84 execution of a SELECT statement is stored in a .sql file causes the window of the query result of pop-up indicating the result of a SELECT statement.  SQL DEV 4.1 is not to do so.

    Oops on my part; my SQL formatting has been the root cause.  I got used to insert split without any character of comment lines in front of them.  For example:

    ==================================================

    Select funny business;

    The foregoing indicates the behavior described.

    --==================================================

    Select funny business;

    With the dash double comment shows, the SQL works very well.

    This is different than previous versions of SQL Developer, but is probably better functionality.  I'll try to mark it as answered, but anyone with the admin should certainly do so if I can't.

  • new to 4.02, no grid or column names in the query results

    It is a bit strange, I have SQL Developer 4.02 just installed, and I don't see grid or column names in the query results.  Don't see anything useful in tools > Preferences, what don't get me?

    The worksheet gives you a couple of different ways to run a query...

    1. instruction execute sheet icon toolbar (large green arrow, or Ctrl + Enter).

    This produces a results tab of the query with the data displayed in a grid.

    2. worksheet icon toolbar Execute the Script (the small tip of the green arrow on lined paper, or F5).

    This produces a tab out of the Script with the data displayed on the printer.

    If execution of the statement to Execute the Script, using some SQL * most orders will remove the column headers:

    1. set the position

    2. set the pagesize 0 (or 1 or 2).

    Pagesize and linesize default is - 1.  By default, the spreadsheet is free for formatting output script as he wishes.  If you have not changed these settings in the spreadsheet, then see if you point to a startup script in Tools > Preferences > Database > name of the connection startup script file

    Kind regards

    Gary

    SQL DeveloperTeam

  • The query results: extract all lines?

    I was looking for a feature that will allow me to choose to return "all records" in the query results window. The current behavior is fetching 50 files at a time (for example fetch 50 records when you scroll the results = s-l-o-w). What I would do, that is 'Recover all lines' and then use for the scroll bar to scroll "smoothly" to the last record. For example, the 8.0.6 Query Builder version has this feature and SQL Developer 3.0, if I right click on the results. I choose 'Count lines... ". ", looks like it would be a perfect place to put an option"retrieve all rows.

    If your application is to be able to quickly reach the last record in a query you can press Ctrl + Page Down (with emphasis in the grid of results) and you will automatically position your view to the last record in the query automatically go get all the results in the process.

    You have no need to do anything with the mouse scroll is actually the fastest way to reach the desired line.

  • Need help to build the query/pl-sql block to get the query result and the name of column from DB table in the form of key-value pairs.

    Hi Experts,

    I have a DB table has columns of more than 50.

    I question this table, it should only return one line at any time. as sqldeveloper below image.

    here, I need to build block pl/sql-query, Discover the column in the table as a key and query result as values.

    Eg:     Key                         -  Value

    TASK_EVENT_ID - 1765

    EVENT_TYPE - ASR_UPDATE

    ... etc until all of the columns in my table.

    Experts please comment on that point, appreciate your help on this.

    Thank you

    -Vincent.

    Here is an approach using DBMS_SQL to iterate over the columns of key / value to assign... (Little code snipped for brevity)

    create or replace procedure (task_expired)

    v_store_id in full,

    v_task_action_id in full,

    v_job_id in full

    )

    as

    -[SNIP code...]

    v_sql VARCHAR2 (4000): = ' select * from my_table where PK = 123';  -Your SQL here!

    v_v_val VARCHAR2 (4000);

    v_n_val NUMBER;

    v_d_val DATE;

    v_ret NUMBER;

    c NUMBER;

    d NUMBER;

    col_cnt INTEGER.

    f BOOLEAN;

    rec_tab DBMS_SQL. DESC_TAB;

    col_num NUMBER;

    vAsString VARCHAR2 (4000);

    BEGIN

    -[SNIP code...]

    Message_properties. CORRELATION: = "EDF_EVENT";

    MSG: = SYS. AQ$ _JMS_BYTES_MESSAGE. Construct();

    Msg.set_string_property ('queueName', ' shipping/csi_cth');

    Msg.set_string_property ('MODE', 'CR8');

    c: = DBMS_SQL. OPEN_CURSOR;

    DBMS_SQL. PARSE (c, v_sql, DBMS_SQL. NATIVE);

    d: = DBMS_SQL. Execute (c);

    DBMS_SQL. DESCRIBE_COLUMNS (c, col_cnt, rec_tab);

    1.col_cnt J

    LOOP

    CASE rec_tab (j) .col_type

    WHEN 2 THEN

    DBMS_SQL. DEFINE_COLUMN (c, j, v_n_val);      -Number

    WHEN 12 CAN

    DBMS_SQL. DEFINE_COLUMN (c, j, v_d_val);      -Date

    ON THE OTHER

    DBMS_SQL. DEFINE_COLUMN (c, j, v_v_val, 2000);   -Else treat as varchar2

    END CASE;

    END LOOP;

    LOOP

    v_ret: = DBMS_SQL. FETCH_ROWS (c);

    WHEN OUTPUT v_ret = 0;

    1.col_cnt J

    LOOP

    -Fetch each column to the correct data type based on coltype

    CASE rec_tab (j) .col_type

    WHEN 2 THEN

    DBMS_SQL. COLUMN_VALUE (c, j, v_n_val);

    vAsString: = to_char (v_n_val);

    WHEN 12 CAN

    DBMS_SQL. COLUMN_VALUE (c, j, v_d_val);

    vAsString: = to_char (v_d_val, ' DD/MM/YYYY HH24:MI:SS');

    ON THE OTHER

    DBMS_SQL. COLUMN_VALUE (c, j, v_v_val);

    vAsString: = v_v_val;

    END CASE;

    Msg.set_string_property (rec_tab (j) .col_name, vAsString);

    END LOOP;

    END LOOP;

    DBMS_SQL. CLOSE_CURSOR (c);

    DBMS_AQ. ENQUEUE (queue_name-online 'cbus.aqjms_common',

    Enqueue_options => Enqueue_options,

    Message_properties => Message_properties,

    Payload-online msg,

    Msgid => Message_handle);

    dbms_output.put_line ('00 Msgid =' |) Message_handle);

    dbms_output.put_line('===Done=');

    -[SNIP code...]

    END;

    /

  • Select from another table, when the query returns no result

    Hello

    I have a question where I'm supposed to retrieve the address of an account id-based billing. However, the table of billing may not have an address. There is a table of addresses that always has an address for an account. If the billing address exists, it should be used, so I can't use the address table. Is it possible in a select statement to query to the billing address and if it does not exist, use the address table.

    SELECT * FROM accounts a, b billings WHERE a.accountid = b.accountid

    Any help will be greatly appreciated.

    Thank you.

    user10407139 wrote:
    Hello

    I have a question where I'm supposed to retrieve the address of an account id-based billing. However, the table of billing may not have an address. There is a table of addresses that always has an address for an account. If the billing address exists, it should be used, so I can't use the address table. Is it possible in a select statement to query to the billing address and if it does not exist, use the address table.

    SELECT * FROM accounts a, b billings WHERE a.accountid = b.accountid

    Any help will be greatly appreciated.

    I think you need to explain more clearly if

    -you only have a couple of "billing" columns which is empty and in this case, you want to use the columns from the table 'accounts '.

    - or you have a join with another table that doesn't return data, for example a foreign key "address_id" "billing" is zero and therefore the join to other tables 'address' will return all the data

    In the first case, you have already been provided with some examples here, how to use NVL or similar functions to achieve, even if the first post first evaluates the information of 'accounts' and if it is white using information from "billing". According to your description you need the other way around. The second post a subquery recursive useless in my opinion.

    In the latter case, you should probably use an "outer" join so that the data in your table "bills" are returned, even if the join to another table is not at all the lines.

    SELECT
    NVL(AD1.ADDRESS_ATTR1, AD2.ADDRESS_ATTR1) as ADDRESS_ATTR1,
    NVL(AD1.ADDRESS_ATTR2, AD2.ADDRESS_ATTR2) as ADDRESS_ATTR2,
    NVL(AD1.ADDRESS_STREET, AD2.ADDRESS_STREET) as ADDRESS_STREET,
    ...
    FROM accounts a
    INNER JOIN billings b
    ON a.accountid = b.accountid
    LEFT OUTER JOIN address ad1
    ON b.address_id = ad1.address_id
    INNER JOIN address ad2
    ON a.address_id = ad2.address_id;
    

    In this way you pick up the address stored in the "invoices" table, if it existed, otherwise you pick up the address assigned to the "accounts" table I used an inner for the second address join join because you said that the account always has an assigned address.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • the query results to table 2d

    I have a list created dynamically IDs I want to query a table
    for matching records for one of the IDs. I can run a loop of the list
    the query, but what is the best way to put all of the matching records
    each individual ID into a single statement of output? I question 7
    different columns, so if I use a table it would need to be 2
    dimensional and I do not know how to write the results of the query to a 2d
    table. Or y at - it an easier way for the release of all data without
    put in a picture at all?

    Here is the corresponding code so far:

    Change your code to the attachment to start (no loops!):

  • the query result child parent

    Hi all

    I write the query to the output of the Parent and the child's relationship and would need assistance. Would like to ask someone to help out me.

    I have a table like

    create the table par_chd

    (

    parent_id number (10),

    child_id number (10)

    );

    Who has data like

    SQL > select * from par_chd;

    PARENT_ID, CHILD_ID

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

    1001 1011

    1001-1021

    1001 1031

    1001-1041

    1021 10210

    1031 10310

    6 selected lines

    I would like to have output as

    PARENT_ID CHILD_LEVEL_1 CHILD_LEVEL_2

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

    1001 1011

    1001-1021-10210

    1001-1021

    1001 1031 10310

    1001 1031

    1001-1041

    1001

    7 selected lines

    Thanks in advance

    Saaz

    Hi Saaz,

    Minor adjustment to the script of Moazzam (who made 99% of employment):

    SELECT

    connect_by_root (parent_id),

    CASE

    WHEN LEVEL = 1 THEN child_id

    WHEN LEVEL = 2 THEN PREVIOUSLY child_id

    OTHER prerequisite parent_id

    END CHILD_LEVEL_1

    CASE

    WHEN LEVEL = 2 THEN child_id

    ANOTHER PREREQUISITE Child_id

    END CHILD_LEVEL_2

    CASE

    WHEN LEVEL = 3 THEN child_id

    END CHILD_LEVEL_3

    OF par_chd

    START WITH parent_id = 1001

    CONNECT BY parent_id = child_id PRIOR

    UNION ALL

    SELECT 1001, NULL, NULL, NULL FROM DUAL;

  • The query results display help

    Hello

    I'm having a problem with the display of the results of my query result.

    When I cfloop on the results... the part number was released on 3 different ranks... when I want it on a single line, querying multiple tables... and you cannot use the option to group with the cfloop

    This is the query

    <cfquery datasource="wire" name="testss3">
       SELECT a.part AS pparts, a.wireid AS wireidA, a.strnds, a.wt, a.sps1, a.sps2, a.sps3, a.tin, b.slookup AS lid, b.wireid AS wireidB, b.reelid AS reelnmbr, d.reelid AS rlid, d.rname, d.rsku, d.rcost, e.plookupid, e.prctid, e.wireid AS wireidE, f.prctid, f.percentage, g.rsize
       FROM Mpart a, slookupt b, reeltbl d, prctlup e, prct f, spoolsize g
       WHERE a.wireid = b.wireid AND e.prctid = f.prctid AND a.wireid = e.wireid AND b.reelid = d.reelid AND g.spoolSizeid = b.spoolSizeid
       </cfquery>
    <table border="1" border="1">
     <tr>
            <td></td>
            <td bgcolor="#CCCCCC" class="style23">Part No.  </td>
            <td bgcolor="#CCCCCC" class="style23">Wt./Mft.</td>
            <td bgcolor="#CCCCCC" class="style23" colspan="3">Spool Sizes (Cost/ft.)</td>
            <td> </td>
          </tr>
                  
       <cfloop query="testss3"><cfoutput>
         <tr>
            <td></td>
               <td align="left" class="style23">#pparts# @</td>
                <td align="left" class="style23">#wt#</td>
               <td align="left" class="style23">
                #rsize# #rcost#  #wireidA#</cfoutput></cfloop></td>
            <td> </td>
           </tr>       
    </table>
    

    Reference No..M/m/Mft.Sizes in stock waiting (cost/pi)
    ground 10 @.31.431000 2.8000 1
    ground 10 @.31.432500 5.9800 1
    ground 10 @.31.435000 7.3000 1
    400A31.431000 2,8000 2
    400A31.432500 5,9800 2
    400A31.435000 7,3000 2
    8 ground @.50500 2,8000 4
    8 ground @.501000 5,9800 4
    8 ground @.505000 7,3000 4
    8 T @.50500 2,8000 5
    8 T @.501000 5,9800 5
    8 T @.505000 7,3000 5

    the first line should read 10 ground | 31.43. 1000 | 2500 | 5000

    rank 10 t | 31.43. 1000 | 2500 | 5000

    Any help would be appreciated!

    Thank you!

    You must nest CFOUTPUT tags to use the way you want.  One

    outside the loop to get the 'line after line only' and an inner to get all the

    subdetails in this line:

    roughly

  • Keep the query results set all paging

    I have a query back thouands of records. For do not impact performance display and paging, which would be the best way without use of query caching? Is it possible to keep the first recordset query time she and her use in Exchange?

    Load balancing definitely throws a wrinkle by using shared memory.  There are ways to address these problems, but they all come with the pros and cons, just basically choose what pros like you and what the disadvantages that you can live with.

    I.E. you can use sessions.  So when a user first access your application, all future queries are sent to the same server that processes requests for first.  But this means that if this server will see, all users currently glued to it are s.o.l.

    I saw other people using databases for the persistent memory.  But then, you have the LAG involved in obtaining data from the database on every request, although it should be easy fast queries to do this.  Side pro, it does not matter which server processes the request.

    It would be different then just re - run the original query every time, but rather store the original query results into a temporary table space so that any complexity which may exist should not be repeated.

  • attempts to display the query results in 2 columns

    I'm trying to change someone elses existing of code to display the results of a query in 2 columns on a web page.

    The result of the existing code can be seen
    here

    Here is the code I am trying to change

    < table width = "95%" border = "0" align = "center" cellpadding = "4" cellspacing = "2" >
    < cfoutput query = "News" StartRowOptional = "" #StartRow_News # "LignesMax =" #MaxRows_News #">"
    < tr align = "center" class = "TEXTnormal" >
    < class nowrap = "style1 TEXTnormal" td >... < table >
    < /tr >
    < class tr = "TEXTnormal" >
    < td > < table width = "100%" border = "0" cellpadding = "0" cellspacing = "0" class = "TEXTnormal" >
    < b >
    < td > < cfif News.ImageNameThumb gt 0 >
    "< a href =" news_view.cfm? recordID = #News.ID #"> < img src =" "uploadedimages / #News.ImageNameThumb #" alt = "#News.ImageCaption #" hspace = "8" hspace = "0" border = "0" align = "left" > < / has >
    < cfelse >

    < / cfif > < table >
    < td > < a href = "" news_view.cfm? recordID = #News.ID # "class ="TEXThighlight"> #News.Title # < /a > - #News.Day #. #News.Month #. #News.Year # < br >"
    #News.Summary # < table >
    < /tr >
    < / table > < table >
    < /tr >
    < / cfoutput >
    < /table >

    I changed the above code to

    < table width = "95%" border = "0" align = "center" cellpadding = "4" cellspacing = "2" >
    < cfset LoopEndRow = CEILING(#EndRow_News#/2) >
    < cfloop
    index = "row".
    from = "#StartRow_News #
    to = "#LoopEndRow #
    step = "1" >
    < class tr = "TEXTnormal" >
    < cfset breaker = 0 >
    < cfloop
    index = "column".
    from = '0 '.
    to = '2 '.
    step = "1" >
    < cfoutput query = "News1" StartRowOptional = "" #StartRow_News # "LignesMax =" #MaxRows_News #">"
    < td width = "50%" >
    < table width = "100%" border = "0" cellpadding = "0" cellspacing = "0" class = "TEXTnormal" >
    < b >
    < td > < cfif News1.ImageNameThumb gt 0 >
    "< a href =" news_view.cfm? recordID = #News1.ID #"> < img src =" "uploadedimages / #News1.ImageNameThumb #" alt = "#News1.ImageCaption #" hspace = "8" hspace = "0" border = "0" align = "left" > < / has >
    < cfelse >

    < / cfif > < table >
    < td > < a href = "" news_view.cfm? recordID = #News1.ID # "class ="TEXThighlight"> #News1.Title # < /a > - #News1.Day #. #News1.Month #. #News1.Year # < br >"
    #News1.Summary # < table >
    < /tr >
    < / table > < table >
    < cfset breaker breaker + 1 = >
    < cfif breaker EQUAL 2 >
    < cfbreak >
    < / cfif >
    < / cfoutput >
    < / cfloop >
    < /tr >
    < / cfloop >
    < /table >

    The results of this code change can be see here

    as you can see what I did gives the number of columns (2)
    and the correct number of lines for the amount of data (3)
    However, each line shows the first 2 pieces of data returned by the query

    Can I change the output query so that it returns the data SET by the amount of data already out items?
    If so, how?



    #data #.




    closing tags

  • Unable to produce the query results

    Hi all

    Hello. I'm aunable write a query that can produce reuls froe below question. An account can have several part relationship.

    Here is the data for the x table

    PartyID - AcctNo - indicator - RoleCode

    1111      -----     123   ------     Y         -------  110

    1112    -------     123   ------    N        --------- 120

    1113     ------     123   ------   N          --------   130

    1114     -------   124     -----   N        --------    100

    1115    --------   124    ------- N         ---------   110

    1116   ---------   124      ----   N       ---------    100

    1115      --------  125             Y       -------        100

    1116      -------    125             N      ------         110

    1117      -------   126            Y         -----        100

    Query should return these AcctNo is not any indicator = 'Y' and RoleCode did not have 100. In this case the results should be

    AcctNo

    123

    124

    Thanks in advance

    Don

    Hello

    885137 wrote:

    Hi, Frank, here is creation and insertion of table scripts. ...

    Thank you.

    So what's the problem with the query I posted in response #1?  (You must use the correct name of the table, of course).  Specify where he makes incorrect results and explain why these results are false.

Maybe you are looking for

  • Satellite A200-1AI (PSAECE) error using Toshiba Disc Creator

    I have an A200-1AI (PSAECE) running Windows 7 Ultimate 64 - Bit with 3 GB of RAM and a TEAC DV-W28ECT Combi drive... Whenever I try to create a CD/DVD or anytype of media using Disc Creator, I get the error messages 6 or more: -. An unexpected error

  • In response to the commandKind - bench test/Labview UI event

    Hey guys Hey.  I have control over a UI Labview/Test Stand I want to change the attributes of function if the user is logged on or loading a sequence file.  How can I create an event that fires when the user logs in or out or a sequence is charged or

  • Cannot print using Works 4.5

    Original title: works 4.5 I use Works 4.5 for my bussines for more than 10 years. Now I have problems printing, and the DHS of mouse wheel no longer work with works 4.5.

  • Update for Outlook junk e-mail filter keeps

    Every day for a month I get notification of the need for an update.  The update is for Outlook junk mail filter.  The update appears to install ok but he will come back a few hours later and wanted to do it again.  It's not really install or Microsof

  • Win xp not responding

    recently, my computer started whenerver of freezing that I try to load a page on the internet and after awile it begins to freeze whenever I try to start any program. Ive tried both firefox and ie and it does the same thing.  Ive already reformatted