The query can be written without a subquery?

Hi all

I am a beginner and need help with the query below.
I discovered my Hyperion reporting tool used mainly on cubes OLAP is not able to understand this query because it implies the sub query.
Can it be written in a single select statement without using the sub query so that I can create a report?
I need to calculate the difference between the columns of the sum.

AHS, SELECT Transaction_Reference_Number, Account_Class, DOHTopLevel, BTS_Working,(DOHTopLevel-BTS_Working) AS Variance
DE)
SELECT A.AHS AS the DAD, B.REFERENCE_NO AS Transaction_Reference_Number, C.ACCOUNT_CLASS AS Account_Class,
Sum (decode(B.version,'DOHTopLevel',B.DATAVALUE,0)) AS DOHTopLevel,
In SHORT AS BTS_Working (DECODE(B.VERSION,'BTS Working',B.DATAVALUE,0))
OF AHS_FE,.
SMRT_PLAN1_BUDGET_TRANSACTIONS b, PLAN1_ACCOUNTDETAIL c WHERE b.ACCOUNT = c.ACCOUNT_NUM AND b.FUNDENTITY = a.FE
AND B.PERIOD <>'BegBalance '.
GROUP BY A.AHS, B.REFERENCE_NO, C.ACCOUNT_CLASS ORDER BY b.REFERENCE_NO ASC);

I need the output in the way below:

PAPA REFERENCE_NO ACCOUNT_CLASS DOHTopLevel BTS Work Variance
DOH HN0001 spends 2 0 2
HNEAHS HN0001 120,721.50 0-120, 721.50 charges
HNEAHS HN0002 expenses 0 121 440-121, 440


Thank you very much.
SELECT A.AHS AS AHS, B.REFERENCE_NO AS Transaction_Reference_Number, C.ACCOUNT_CLASS AS Account_Class,
SUM(DECODE(B.VERSION,'DOHTopLevel',B.DATAVALUE,0)) AS DOHTopLevel,
SUM(DECODE(B.VERSION,'BTS Working',B.DATAVALUE,0)) AS BTS_Working,
SUM(DECODE(B.VERSION,'DOHTopLevel',B.DATAVALUE,0))-SUM(DECODE(B.VERSION,'BTS Working',B.DATAVALUE,0)) Variance
FROM AHS_FE A,
SMRT_PLAN1_BUDGET_TRANSACTIONS b, PLAN1_ACCOUNTDETAIL c WHERE b.ACCOUNT = c.ACCOUNT_NUM AND b.FUNDENTITY = a.FE
AND B.PERIOD 'BegBalance'
GROUP BY A.AHS, B.REFERENCE_NO, C.ACCOUNT_CLASS ORDER BY b.REFERENCE_NO ASC;

Tags: Database

Similar Questions

  • This MODEL query can be written with features of Google ANALYTICS?

    Hi guys,.

    Earlier today, I replied to this post:
    Update and related queries Co

    I think that the OP wanted looked like something like this:
    -We have a bank account and start with 100 USD.
    -On a monthty basis receive us, say 5%, interest in this account.
    -L' interest is added to the account monthly.
    -Next month we receive again 5%.
    -Etc.

    Penny our balance is changing:
    Month 1: 100
    Month 2: 100 + 0.05 * 100 = 105
    Months 3:105 + 0.05 * 105 =...

    Etc.

    A query can be written with analytics that generates monthly balances, say for the first 12 months?
    With the MODEL, it is easy (I think): see the message I mentioned.

    I just don't see how to do this with analytics.

    Toon

    It helps if you apply some mathematical soaps as well:

    Taking data from the post you refer to:

    SQL> with test as (
     select 'A' r, 1 period, 40 istock, 10 perc, 40 stock from dual union all
     select 'A', 2, 40, 10, 40 from dual union all
     select 'A', 3, 40, 10, 40 from dual union all
     select 'A', 4, 40, 10, 40 from dual
    )
    ---
    ---
    SELECT t.*,
               FIRST_VALUE (stock) OVER (PARTITION BY r ORDER BY period)
               * POWER (1 + FIRST_VALUE (perc) OVER (PARTITION BY r ORDER BY period) / 100,
                   ROW_NUMBER () OVER (PARTITION BY r ORDER BY period) - 1)
                    s
      FROM test t
    /
    R     PERIOD     ISTOCK       PERC      STOCK          S
    - ---------- ---------- ---------- ---------- ----------
    A          1         40         10         40         40
    A          2         40         10         40         44
    A          3         40         10         40       48,4
    A          4         40         10         40      53,24
    
    4 rows selected.
    
  • Volumes of the App can be used without Horizon?

    Volumes of the app can be used without Horizon? It seems to be a case of using these features, not only for desktop computers. Say for R & D working with quick auto tests departments deploying the latest versions etc. Can a unique environment of vSphere be used? If so, these deployment tasks can be controlled by a PLC?

    Yes, and with other brokers. Volumes of app is also sold as a stand-alone product.

    More info in the FAQ.

    http://www.VMware.com/files/PDF/appvolumes/VMware-appvolumes-FAQ.PDF

  • Is it possible to run DiagOnCAN with the NI-CAN driver only (without car Diag command Set)

    Hello world

    Is it possible to run DiagOnCan without using Diag command set auto - only with the NI-CAN driver (hardware I use is low tolerant speed - USB8472 and NOR-XNET)?

    G. Petko

    no problem to do with your hardware and NI-CAN frame API.

    However, you must implement the Diag and Services Transport layer on your own, which is quite a big job.

    I recommend you spend the money for automotive diagnostic command set that supports

    • NI CAN (PXI, PCI, PCMCIA, USB)

    • NOR-XNET

    • cRIO/985 x target (Pharlap and VxWorks) #.

    which means that if you plan to transfer your application in the future to different hardware target or the real-time target, that you don't need to change your app at all.

  • the files can be copied without overwriting the existing files?

    I want to copy music files from an external hard drive to my laptop without any duplicates. files can be copied without overwriting the existing files?

    I want to copy music files from an external hard drive to my laptop without any duplicates. files can be copied without overwriting the existing files?

    Yes, you can.

    You can either use the simple method of drag - move or the right click move optionfrom context menu.

    Method of drag - move will have a copy of the music even external drive and one copy in your personal folder.
    Move To method will be "moving" the music file from the drive of the post to your personal folder. No duplicate.

    If you do not have CopyTo and Move To options in your right click context menu, use this tutorial:

    http://www.Vistax64.com/tutorials/89196-context-menu-add-copy-folder-move-folder.html

    Use a method... that's easier.

  • If the OEM license is tied to the BIOS, the BIOS can be updated without problems?

    I think to update my Vista 64 bit on windows 7 laptop.  I was reading the Ant on the differences between OEM and full, and in a post, it said that the OEM license is tied to the BIOS serial #.  Is it a serial number of the equipment of a firmware #.  What would happen if you fast a new BIOS revision?

    Thank you

    a preinstalled OEM SLP key should interact with the slic table in bios in order to activate itself. You can update the bios without negative consequences as long as you get the bios that is appropriate for your machine.

    An OEM system builder license does not use the slic table.

    Computers, which are built by large manufacturers provided with pre-installed Windows are supplied with 2 two product keys:

    (A) OEM SLP: this key comes pre-installed in Windows, when it comes to the factory. This key is designed to work with the special instructions isn't on the hardware of this manufacturer. Then, when Windows was installed using the OEM SLP (in factory) Windows 7 key leans on the motherboard and he sees special instructions and activates. (that's why you had no need to turn on your computer after you brought it home)

    (B) SLP COA: it's the product key that you see on the sticker on the side (or at the bottom, [or in the battery compartment]) of your computer. It is a valid product key, but must be used only in certain situations (for example, if the OEM SLP key stops automatic activation for a reason any). The key must be activated by phone. (Note: all manufacturers that use the SLP OEM system are bound by contract to include a certificate of Authenticity sticker (COA), which has a COA SLP key, on the computer)

  • How can rewrite the query statement effectively

    Hi gurus,

    BANNER

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

    Oracle Database 10g Release 10.2.0.4.0 - Production 64-bit

    PL/SQL Release 10.2.0.4.0 - Production

    CORE 10.2.0.4.0 Production

    AMT for Linux: release 10.2.0.4.0 - Production

    NLSRTL Version 10.2.0.4.0 - Production

    Table scripts


    CREATE TABLE WAREHOUSE

    (

    IDZONE VARCHAR2 (6 BYTE) NOT NULL,

    ZONE_CREATEDATE DATE NOT NULL,

    DATE OF DT_WAREHOUSE,

    DATE OF DT_POSTING

    )

    AREA ID, ZONE_CREATEDATE is PK

    CREATE TABLE ZONE_VIEW

    (

    IDZONE VARCHAR2 (6 BYTE) NOT NULL,

    ZONE_CREATEDATE DATE NOT NULL,

    ZONE_NUM NUMBER (2) NOT NULL,

    DATE OF TRANX_DATE

    )

    ID of the AREA, ZONE_CREATEDATE, ZONE_NUM is PK

    Query

    SELECT ID area, zone_createdate

    Of

    (

    SELECT ID area, zone_createdate,

    MAX (CASE WHEN zone_num = 18 AND tranx_date 'n' IS NOT NULL, THEN 1 TIME zone_num = 18 AND tranx_date IS NULL THEN 0 ELSE-1 END) region_18,.

    MAX (CASE WHEN zone_num = 110 AND not IS NOT NULL, THEN 1 TIME = 110 zone_num tranx_date AND tranx_date IS NULL THEN 0 ELSE-1 END) region_110,.

    MAX (CASE WHEN zone_num = 135 AND tranx_date no IS NOT NULL, THEN 1 TIMES zone_num = 135 AND tranx_date IS NULL THEN 0 ELSE-1 END) region_135,.

    MAX (CASE WHEN zone_num = 140 AND tranx_date 'n' IS NOT NULL, THEN 1 TIME zone_num = 140 AND tranx_date IS NULL THEN 0 ELSE-1 END) region_140

    OF zone_view

    GROUP BY IDZone, zone_createdate

    ) zrn

    WHERE zrn.region_18 <>0

    AND (((zrn.region_110 = 1) OR (zrn.region_110 = - 1)) AND (there IS NOT (SELECT null from warehouse w WHERE w.zoneid = zrn.zoneid AND w.zone_createdate = zrn.zone_createdate AND w.dt_warehouse IS NULL)))

    AND (((zrn.region_135 = 1) AND (there IS NOT (SELECT null from warehouse w WHERE w.zoneid = zrn.zoneid AND w.zone_createdate = zrn.zone_createdate AND w.dt_posting IS NULL))) OR (zrn.region_140 = 1))

    OR ((zrn.region_18 >-1) AND (zrn.region_135 = - 1) AND (zrn.region_140 < 1))

    OR ((zrn.region_110 = 1) AND (zrn.region_135 = - 1) AND (zrn.region_140, <>, 0))

    );

    Top query runs too slowly on the real data set. Is there an effective way to rewrite the query which can perform the dough?

    Any help or suggestion would be appreciated

    Thanks in advance

    At the time where the application may not throw anything until after he has retrieved and grouped all the ranks of zone_view. His estimate of 7.5 minutes to scan millions 639 lines really fast enough - it's 85 million lines per minute.

    This seems to be where the time went. The only way that the query can be accelerated is to recover some of the conditions that must be applied before the grouping. The only obvious possibilities for this are

    (a) filter values of zone_num

    (b) move the audit only

    NOT EXISTS (SELECT null from warehouse w WHERE w.zoneid = zrn.zoneid AND w.zone_createdate = zrn.zone_createdate AND w.dt_warehouse IS NULL)

    within the group, because this condition is applied regardless of the values in calculated fields. The AREA ID, ZONE_CREATEDATE are not null, so I suggest to try:

    SELECT ID area, zone_createdate

    Of

    (

    SELECT ID area, zone_createdate,

    MAX (CASE WHEN zone_num = 18 AND tranx_date 'n' IS NOT NULL, THEN 1 TIME zone_num = 18 AND tranx_date IS NULL THEN 0 ELSE-1 END) region_18,.

    MAX (CASE WHEN zone_num = 110 AND not IS NOT NULL, THEN 1 TIME = 110 zone_num tranx_date AND tranx_date IS NULL THEN 0 ELSE-1 END) region_110,.

    MAX (CASE WHEN zone_num = 135 AND tranx_date no IS NOT NULL, THEN 1 TIMES zone_num = 135 AND tranx_date IS NULL THEN 0 ELSE-1 END) region_135,.

    MAX (CASE WHEN zone_num = 140 AND tranx_date 'n' IS NOT NULL, THEN 1 TIME zone_num = 140 AND tranx_date IS NULL THEN 0 ELSE-1 END) region_140

    OF zone_view

    where (IDZone, zone_createdate) NOT IN (select the zone ID, w warehouse zone_createdate WHERE w.dt_warehouse IS NULL)

    and zone_num (18, 110, 135, 140)

    GROUP BY IDZone, zone_createdate

    ) zrn

    WHERE zrn.region_18 <> 0

    AND ((zrn.region_110 = 1) OR (zrn.region_110 = - 1))

    AND (((zrn.region_135 = 1) AND (there IS NOT (SELECT null from warehouse w WHERE w.zoneid = zrn.zoneid AND w.zone_createdate = zrn.zone_createdate AND w.dt_posting IS NULL))) OR (zrn.region_140 = 1))

    OR ((zrn.region_18 >-1) AND (zrn.region_135 = - 1) AND (zrn.region_140)<>

    OR ((zrn.region_110 = 1) AND (zrn.region_135 = - 1) AND (zrn.region_140 <> 0))

    )

    Unfortunately, if the plan of the query time estimates are correct, most of the duration of the query is spent doing a reading zone_view in a full analysis, and which will not be changed by this query.

    If there are many rows for each (IDZone, zone_createdate) zone_view pair, then it is possible that an index on (area ID, zone_num, zone_createdate) would contribute to this request, especially if most (IDZone, zone_createdate) pairs are filtered with the NOT IN (select the zone ID, zone_createdate w warehouse WHERE w.dt_warehouse IS NULL). More radical but probably effective measure would be a functional on index

    zone_view (zone_num, IDZone, zone_createdate, case when tranx_date is null then 0 otherwise 1 end)

    and using the expression in the query box:

    SELECT ID area, zone_createdate

    Of

    (

    SELECT ID area, zone_createdate,

    NVL (MAX (CASE WHEN zone_num = 18 then case when tranx_date is null, then 0 or 1 end end),-1) region_18,.

    NVL (MAX (CASE WHEN zone_num = 110 then case when tranx_date is null, then 0 or 1 end end),-1) region_110,.

    NVL (MAX (CASE WHEN zone_num = 135 then case when tranx_date is null, then 0 or 1 end end),-1) region_135,.

    NVL (MAX (CASE WHEN zone_num = 140 then case when tranx_date is null, then 0 or 1 end end),-1) region_140

    OF zone_view

    where (IDZone, zone_createdate) NOT IN (select the zone ID, w warehouse zone_createdate WHERE w.dt_warehouse IS NULL)

    and zone_num (18, 110, 135, 140)

    GROUP BY IDZone, zone_createdate

    ) zrn

    WHERE zrn.region_18 <> 0

    AND ((zrn.region_110 = 1) OR (zrn.region_110 = - 1))

    AND (((zrn.region_135 = 1) AND (there IS NOT (SELECT null from warehouse w WHERE w.zoneid = zrn.zoneid AND w.zone_createdate = zrn.zone_createdate AND w.dt_posting IS NULL))) OR (zrn.region_140 = 1))

    OR ((zrn.region_18 >-1) AND (zrn.region_135 = - 1) AND (zrn.region_140)<>

    OR ((zrn.region_110 = 1) AND (zrn.region_135 = - 1) AND (zrn.region_140 <> 0))

    )

    This gives a very different plan on my database, by performing an iteration on relevant areas of performance status:

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

    | ID | Operation | Name |

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

    |   0 | SELECT STATEMENT |              |

    |*  1 |  FILTER                          |              |

    |   2.   VIEW                           |              |

    |*  3 |    FILTER                        |              |

    |   4.     HASH GROUP BY.              |

    |   5.      ANTI NESTED LOOPS.              |

    |   6.       INLIST ITERATOR.              |

    |*  7 |        INDEX RANGE SCAN | ZV_F1 |

    |*  8 |       TABLE ACCESS BY INDEX ROWID | WAREHOUSE |

    |*  9 |        INDEX UNIQUE SCAN | WAREHOUSE_PK |

    | * 10 |   TABLE ACCESS BY INDEX ROWID | WAREHOUSE |

    | * 11 |    INDEX UNIQUE SCAN | WAREHOUSE_PK |

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

    Your plan will be different because you have data volumes (I didn't create millions of lines of test data)

    It would be useful to know how many rows there are in the WAREHOUSE, how many distinct (IDZone, zone_createdate) pairs there are in zone_view and the number of rows actually returns the query, and how much is NOT IN (select the zone ID, w zone_createdate warehouse WHERE w.dt_warehouse IS NULL) because these relative numbers determine how these approaches are.

    If there is a table containing all of the (area ID, zone_createdate) pairs which could take place in zone_view, which would have may another possible approach:

    First filter possible pairs against NOT IN (select the zone ID, w warehouse zone_createdate WHERE w.dt_warehouse IS NULL)

    Then attach them to the zone_view to retrieve only the rows in the filtered (IDZone, zone_createdate) pairs.

    Good luck.

  • Rewrite the query to improve the performance and the optimized below cost.

    Oracle 10g.

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

    Query

    UPDATE FACETS_CUSTOM. MMR_DTL

    SET

    CAPITN_PRCS_IND = 2,

    FIL_RUN_DT = Current_fil_run_dt,

    ROW_UPDT_DT = dta_cltn_end_dttm

    WHERE CAPITN_PRCS_IND = 5

    AND HSPC_IND = 'Y '.

    AND EXISTS (SELECT 1

    OF FACETS_STAGE. CRME_FUND_DTL_STG STG_CRME

    WHERE STG_CRME. MBR_CK = MMR_DTL. MBRSHP_CK

    AND MMR_DTL. PMT_MSA_STRT_DT BETWEEN STG_CRME. ERN_FROM_DT AND STG_CRME. ERN_THRU_DT

    AND STG_CRME. FUND_ID IN ('AAB1', '1AA2', '1BA2', 'AAB2', '1AA3', '1BA3', ' 1 B 80 ', ' 1 HAS 80 '))

    AND EXISTS (SELECT 1

    OF FACETS_CUSTOM. FCTS_TMS_MBRID_XWLK XWLK

    WHERE XWLK. MBR_CK = MMR_DTL. MBRSHP_CK

    AND MMR_DTL. PMT_MSA_STRT_DT BETWEEN XWLK. HSPC_EVNT_EFF_DT AND XWLK. HSPC_EVNT_TERM_DT);

    Explain the plan of the query

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

    Hash value of plan: 3109991485

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

    | ID | Operation | Name                  | Lines | Bytes | Cost (% CPU). Time |

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

    |   0 | UPDATE STATEMENT.                       |     1.   148. 12431 (2) | 00:02:30 |

    |   1.  UPDATE                       | MMR_DTL |       |       |            |          |

    |   2.   SEMI NESTED LOOPS.                       |     1.   148. 12431 (2) | 00:02:30 |

    |*  3 |    HASH JOIN RIGHT SEMI |                       |    49.  5488. 12375 (2) | 00:02:29 |

    |   4.     TABLE ACCESS FULL | FCTS_TMS_MBRID_XWLK |  6494 | 64940 |    24 (0) | 00:00:01 |

    |*  5 |     TABLE ACCESS FULL | MMR_DTL |   304K |    29 M | 12347 (2) | 00:02:29 |

    |*  6 |    TABLE ACCESS BY INDEX ROWID | CRME_FUND_DTL_STG |     1.    36.     5 (0) | 00:00:01 |

    |*  7 |     INDEX RANGE SCAN | IE1_CRME_FUND_DTL_STG |     8.       |     1 (0) | 00:00:01 |

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

    Information of predicates (identified by the operation identity card):

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

    3 - access("XWLK".") MBR_CK "=" MMR_DTL. " ("' MBRSHP_CK")

    filter ("XWLK". "HSPC_EVNT_EFF_DT" < = INTERNAL_FUNCTION ("MMR_DTL". " PMT_MSA_STRT_DT') AND

    'XWLK '. "" HSPC_EVNT_TERM_DT "> = INTERNAL_FUNCTION ("MMR_DTL". "PMT_MSA_STRT_DT")) "

    5 - filter("CAPITN_PRCS_IND"=5 AND "HSPC_IND"='Y')

    6 filter (("STG_CRME". "FUND_ID" = "1 HAS 80 ' OR 'STG_CRME'." " FUND_ID "="1AA2"OR"

    'STG_CRME '. "FUND_ID"= '1AA3' OR 'STG_CRME'. "FUND_ID" = "1 B 80 ' OR 'STG_CRME'. '. "FUND_ID" = "1BA2" OR "

    'STG_CRME '. "FUND_ID"= "1BA3" OR "STG_CRME". "FUND_ID"= "AAB1" OR "STG_CRME". ("FUND_ID"="AAB2") AND

    'STG_CRME '. "" ERN_FROM_DT "< = INTERNAL_FUNCTION ("MMR_DTL". "PMT_MSA_STRT_DT") AND "

    'STG_CRME '. "" ERN_THRU_DT "> = INTERNAL_FUNCTION ("MMR_DTL". "PMT_MSA_STRT_DT")) "

    7 - access("STG_CRME".") MBR_CK "=" MMR_DTL. " ("' MBRSHP_CK")

    I could not optimize this query for best performance and optimized the cost... Can someone guide me on this.

    Thank you

    DS

    You think you're going to lines updates 85K, Oracle think it will update a line.

    At the time where the existence of the first test runs that oracle think already up to 49 lines, which is probably why he uses the loop join nested for the second test. (In your version of Oracle, the subquery introduced existence a very bad assumption (small) on the amount of data will survive).

    It is possible that you will get better performance if you hint Oracle using a hash join for testing the existence - and you might want to think what test will eliminate most of the data and that we can first force.

    Having said that, however, note that MMR_DTL research is a considerable fraction of the cost of the query - and an analysis is an easy thing for Oracle cost properly - if, despite your comments on update a column with a clue to this topic, you will find that the query can be more effective if you use an index. This is more likely to be the case if data ' WHERE CAPITN_PRCS_IND = 5 AND HSPC_IND = 'Y' "is well grouped (perhaps the latest data added to the table).". "  You could then reduce the cost of maintaining this index by creating an index based on a feature that indexes only the lines where the predicate are both true so that the 2 update deletes the index entries and allows the index remain as thin as possible.

    Concerning

    Jonathan Lewis

  • Impossible to activate the rewrite of the query, no error

    Hello

    I created a simple MV with activated query rewrite, and it works well. The MV is very simple:

    Mv_sales CREATE MATERIALIZED VIEW

    NOLOGGING

    REFRESH THE STRENGTH TO DEMAND

    ACTIVATE THE QUERY REWRITING

    AS

    SELECT

    s.cust_id,

    Sum (s.QUANTITY_SOLD) sold_qty,

    Sum (s.AMOUNT_SOLD) sold_amt

    S SALES

    GROUP BY s.cust_id

    ;

    I tested the mechanism of query rewriting, and everything works as expected.

    Now, I created an another MV with a motion very similar to the one above, but with several tables.

    An excerpt from the new query:

    SELECT...

    Of

    FACT_SALES_AND_MARKDOWNS FSM

    DIM_PRODUCT DP

    DIM_LOCATION DL

    DIM_DATE DD

    WHERE WSF. DIM_PRODUCT_KEY = DP. DIM_PRODUCT_KEY

    AND WSF. DIM_LOCATION_KEY = DL. DIM_LOCATION_KEY

    AND WSF. DIM_SALE_DATE_KEY = DD. DIM_DATE_KEY

    GROUP BY

    DD MERCH_YEAR_ID.

    DD. MERCH_YEAR_START_DATE...

    I can create the MV, but the query rewriting will not activate!

    If I execute ALTER materialized view mv_test ALLOW to REWRITE the QUERY. It runs without giving me an error, but the MV is not always activate the rewrite of the query.

    Am I missing something? Can we not have Query Rewrite on a MV with several tables in the query?

    Thank you

    Joao Moreira

    Hello

    Please provide the results of these queries:

    Select MVIEW_NAME, REWRITE_ENABLED

    of DBA_MVIEWS

    where MVIEW_NAME = '';

    Kind regards.

  • Change the query to a display object

    I have a view currently, object based on an entity. It is the default view object, which means that the query the view object is frank, he grabs all the attributes of the table. And there is no WHERE clause.

    Actually, I only want to show a finite set of rows in my table. Whenever a record is modified/edited in this entity and committed, a new row in the database is created with the same information (I use CreateWithParams) with the exception of a few columns.

    I actually didn't really update it on this table, just creating new lines. But to the user, I want it 'looks' like they change something in the table.

    Example:

    12, 11:32, Thompson, 60 (changes to the user this information in a table of the adf and a new line is created in the comic book)

    12, 11:55, Thompson, 75





    I have a timestamp field (see above) in the database that is used as part of my primary key, while I know that is later.

    When executing the query of the VO, I want the user to only see as the last row of the db.

    12, 11:55, Thompson, 75

    Then...

    I went to my VO, and I changed the query WHERE to add this:

    where t1. TimeStamp = (Select MAX (t2. (TimeStamp) OF THE rcl.x t2 where t1.uid = t2.uid);


    Now, this isn't a question of mysql/sql. There is actually a better query I was running, but the editor of the VO does not allow me to change the query itself...

    When I save the new WHERE to my VO, rerun my page, I get the expected result (showing me only the latest recordings).

    However, when I try and do a sort on the table in which are displayed my data, I get now ORDER BY errors.

    I don't want my VO SQL read-only basis. I want to be able to update my table, so I have my VO running out of the entity.



    Why don't the VO allows me to change the query itself? (As do a subquery instead of having my where clause to do the job)

    Why are sorted by errors are thrown when I sort on my adf table after changing the where clause in my opinion?

    I hope I was not too complicated in explanation of my problem...

    Thanks in advance,

    Joel

    Hello

    You can switch the VO query editor based on an EO to expert mode. This allows you to change the entire query. Unless you change the use of the attribute, the update through this VO work. Open the VO query and choose the Expert mode option of the query to see what I mean

    Frank

  • HP4215 printer can be used without phone connection if want to print, scan or copy

    Have a HP4215 printer that has not been used for a few years. Keep allow the family member, who use only a cell phone, and an old Apple laptop for 1 year, to be able to use it to print, scan and copy only - no fax.  If it downloads the driver, and hooks the USB, the printer can be used without a line of phone being installed?

    Hello

    Yes, given the portable computer Apple has USB ports, you can connect your printer to the laptop via a USB port, but you will not be able to print from cell phone. If you want to print anything from cell phone, the quick and easy way: send or copy on the laptop from Apple to print.

    Kind regards.

  • Modify the query

    I have a question,
    Select Distinct Pod, Filer From Fhm_Filer_Pod_Volume_D Where Pod='ABCSA'
    that the output is as

    ABCSA ac32p25
    ABCSA ac32p27

    The query can be modified so that the output will be like b

    ABCSA ac32p25, ac32p27

    ?

    Thank you.

    Published by: Kuldip on April 19, 2012 02:17
    with t as
    (select 'ABCSA' pod, 'ac23fs' filer from dual union
    select 'ABCSA', 'akskks' from dual
    )
    SELECT   pod, max(substr(SYS_CONNECT_BY_PATH (filer, ','),2)) PATH
          FROM (select rownum rn,
                       a.*
                  FROM (Select * from t order by filer desc) a
                 WHERE POd='ABCSA' )
    CONNECT BY PRIOR rn =rn - 1
     group by pod
    
  • DataPump import by using the query

    Hello

    I need to import data by filtering using the query. can anyone help?

    Thank you

    Hello
    example of

    expdp HR/hr = emp QUERY:'"WHERE dept_id > 10 AND sal > 10000"' NOLOGFILE = y DIRECTORY = dpump_dir1 DUMPFILE = exp1.dmp

    Impdp HR/hr DIRECTORY = dpump_dir1 DUMPFILE = expfull.dmp QUERY = departments:'WHERE department_id «»< 120"'="" nologfile="">

    See this link

    http://download.Oracle.com/docs/CD/B13789_01/server.101/b10825/dp_import.htm

  • 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

  • How can I filter a table of data control without entering the query

    I have a table from a WSDL-based web service data control.

    I want to filter the table without input query in the filter text box. Without text filter box, each could filter the table with a query hardcoded internally.
    For example, when the user menu button click and then it filters the table where type = '1' and B menu button filters the table by type = '2' and C menu button filters the table by type =' "."

    How can I filter the table without entering the query?

    Could someone point me to a solution please.

    Thank you.
    11.1.5 jdev

    Published by: 893364 on October 26, 2011 12:15

    Published by: 893364 on October 26, 2011 12:21

    Hello

    When you have created the table, have you tried selecting the option "filter". Select the table, and access the property of m.. In the toolbar of the Properties Inspector, there is an icon to change the configuration. His fields of filter adding filter for the user to search in.

    Option 2: Data from the Web Service are actually held in iterators. If you want to filter the Web service request, I wouldn't use the WS domain controller but a proxy of JAX - WS in a POJO to recover data from the WS. Then the data control created from the POJO. You might have a method exposed on the POJO which allows you to filter the data internally that is held

    Frank

Maybe you are looking for

  • control the order of the locations

    When I draw several waveforms, or several tracks on a XY plot, the final track is "underneath" those who preceded him.  LV 12.x, can I change the order of tracing, other that by changing the order of the elements in the table used to manufacture the

  • Aspire 5734Z does not start on DVD or USB

    I have an older 5734Z, I was dual-boot Windows 7 and Ubuntu Linux. Please don't ask why, but there are a few nights, I was extremely mad, and finally insert my live cd of Linux and the entire to FAT32 hard drive formatting, I mention this to show why

  • Why my keyboard used let me scroll to safe mode or boot from cd? And how to fix this?

    I use windows xp home eddition and when I start my computer it wont let me press F8 to enter safe mode menu. When I reset my computer that I can get to the screen where it allows you to choose to start in safe mode... but for some reason I can't scro

  • Why are my fonts names in different colors?

    When I go to control panel > fonts, most of the names of fonts are in blue. However, certain that I recently added are black. I wonder if I installed them the wrong way. I open the fonts folder and did a drag and drop. Can someone tell me what is hap

  • Can I install/run MS Paint for Vista in Windows 7?

    I recently instslled Windows 7 upgrade to my Vista machine. I don't like the current version of MS Paint, and I want to install the version of MS Paint included with Vista.