"/ accounts/1000 ' y at - it never ' / accounts/2000" or "/ accounts/1001" ' "."

I want to check a QString path. Some users never have paths that are as:

' / accounts/1001 ' or ' / accounts/2000 "for some reason any (Balance, BES, BlackBerry etc...)?".

instead of the familiar: ' / accounts/1000?

The permiter of work it will be/accounts/1000-enterprise right now, if we do not promise that these two paths will be the only options always and forever.

Better just to not hardcode the path at all. Use QDir::currentPath()

http://bizblog.BlackBerry.com/2013/09/developing-enterprise-apps-work-space-BlackBerry-10/

Tags: BlackBerry Developers

Similar Questions

  • Vostro 1000 Audio in the problems section

    Hello
    Ive just bought a Vostro 1000. Ive has never tried plugin audio device through the line in socket but theres no sound on the computer speakers. Ive checked all the options audio in Vista Home Basic, but all what you have in the speakers/headphones - levels - is an icon of speakers. Ive seen other phones including the mute line, but I can't yet find a level line.
    Audio driver is - SIGMATEL STAC 92XX C-Major HD Audio
     
    Would be grateful for your help
     
    PS ive already tried to download the latest driver on the dell site, but that did not work

  • Data display

    Hello

    I have a table of Bank Transaction table. I want to display the data account no. rates wise sages Date and withdrawals and the closing balance.

    CREATE TABLE bank_transaction

    (acc_no VARCHAR2 (20 BYTE),

    trn_dt DATE,

    trn_type CHAR (1 BYTE),

    sale NUMBER (10.2)

    );

    I want to display data like that.

    Account no.: 100

    Trn_dt flow Withdrawl closed ball

    01-apr-2014 5000 5000

    02-Apr-2014 1000-4000

    03 Apr-2014 2000-7000

    Account no.: 101

    Trn_dt flow Withdrawl closed ball

    01-apr-2014 10000 10000

    02-Apr-2014 1000-9000

    03 Apr-2014 2000-11000.

    I tried like this.

    DECLARE

    CURSOR c1 IS

    SELECT DISTINCT trn_dt FROM b_trn_t ORDER BY acc_no, acc_no, trn_dt;

    CURSOR c2 (VARCHAR, p_trn_dt DATE p_acc_no) IS SELECT acc_no, TRUNC (trn_dt) trn_dt, trn_type, balance OF the b_trn_t

    WHERE acc_no = p_acc_no AND trn_dt = p_trn_dt ORDER BY acc_no, trn_dt;

    v_cr_amt NUMBER: = 0;

    v_db_amt NUMBER: = 0;

    v_clos_bal NUMBER: = 0;

    v_acc_no varchar (12);

    v_trn_dt DATE;

    BEGIN

    I'm IN c1 LOOP

    IF v_acc_no IS NULL THEN

    Dbms_output.put_line (i.acc_no);

    v_acc_no: = i.acc_no;

    ELSIF v_acc_no <>i.acc_no THEN

    v_acc_no: = i.acc_no;

    v_cr_amt: = 0;

    v_db_amt: = 0;

    v_clos_bal: = 0;

    Dbms_output.put_line (i.acc_no);

    END IF;

    FOR j IN c2 (i.acc_no, i.trn_dt) LOOP

    IF j.trn_type = 'C' THEN

    v_cr_amt: = v_cr_amt + j.balance;

    ON THE OTHER

    v_db_amt: = j.balance - v_db_amt;

    END IF;

    END LOOP;

    v_clos_bal: = v_cr_amt-v_db_amt;

    Dbms_output.put_line(i.trn_dt ||) ' D ' || v_cr_amt | ' C ' || v_db_amt | "CLOS BALL | v_clos_bal);

    END LOOP;

    END;

    Hello

    This request obtains all of the information you want:

    SELECT acc_no

    TRUNC (trn_dt) AS trn_dt

    , SUM (CASE WHEN trn_type = ' THEN trn_amt END) filing form

    SUM (CASE WHEN trn_type = 'W' THEN trn_amt END) AS witthdrawal

    SUM (SUM (CASE

    WHEN trn_type = ' THEN trn_amt

    WHEN trn_type = 'W' THEN - trn_amt

    END

    )

    ) OVER (PARTITION BY acc_no

    ORDER BY TRUNC (trn_dt)

    ) AS closing_bal

    OF bank_transaction

    GROUP BY acc_no, TRUNC (trn_dt)

    ORDER BY acc_no, TRUNC (trn_dt)

    ;

    The format is not quite what you asked:

    ACC_NO TRN_DT DEPOSIT WITTHDRAWAL CLOSING_BAL

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

    100 17 March 2015 6000 6000

    100 24 March 2015 5000 1000

    100 March 25, 2015 10000 5000-6000

    101 17 March 2015 10000 10000

    101 24 March 2015 5000 5000

    101 25 March 2015 5000 1500 8500

    If you are using PL/SQL, to get the results in the exact format you need should be easy.

    Using only SQL, you can get the acc_no on a separate line using GROUP BY GROUPING SETS.  You can use CASES and the GROUPING function to show only the acc_no on some lines and all, but acc_no on others.  May also get the acc_no and the trn_dt in the same column.  (You will need to explicitly call TO_CHAR for this).

    GROUP BY GROUPING SETS can also get a header line after the first acc_no.  If the VARCHAR2 headers are part of the result set, you will need to convert to strings, the total NUMBER of columns using TO_CHAR.

    Maybe some of you have done proof of formatting is not important to you.

  • Help please SQL... Adding a column of total accumulated in a table

    Tonight... I have the task of adding a column of total cumulative to a table that contains a list of transactions. The table contains entries for several accounts.

    for example

    create the table adam_test1
    (
    account char (4),
    date of entry_date,
    amount number 4,
    Balance number 4
    );


    insert into adam_test1 values ('1000', January 1, 2000 ", 50", null);
    insert into adam_test1 values ('1000', January 2, 2000 ', 40', null);
    insert into adam_test1 values ('1000', 3 January 2000', '-50', null ");
    insert into adam_test1 values ('1000', January 4, 2000 ', 10', null);
    insert into adam_test1 values ('1000', 5 January 2000', '-250', null ");
    insert into adam_test1 values ('1000', January 6, 2000', '100', null);
    insert into adam_test1 values ('1000', January 7, 2000 ", 50", null);

    insert into adam_test1 values ('2000,' 1 January 2000 ', 30', null);
    insert into adam_test1 values ('2000', January 2, 2000 ', 10', null);
    insert into adam_test1 values ('2000', 3 January 2000', '-520', null ");
    insert into adam_test1 values ('2000', January 4, 2000', '140', null);
    insert into adam_test1 values ('2000', 5 January 2000', '-4', null ");
    insert into adam_test1 values ('2000', January 6, 2000 "," 120", null);
    insert into adam_test1 values ('2000', January 7, 2000 ', 57', null);


    SQL > select * from adam_test1;

    ACCO ENTRY_DAT BALANCE AMOUNT
    ---- --------- ---------- ----------
    1000 1 JANUARY 00 50
    1000 2 JANUARY 00 40
    1000 3 JANUARY 00-50
    1000 4 JANUARY 00 10
    1000 5 JANUARY 00-250
    1000 6 JANUARY 00 100
    1000 7 JANUARY 00 50
    2000 1 JANUARY 00 30
    2000 2 JANUARY 00 10
    2000 3 JANUARY 00-520
    2000 4 JANUARY 00 140
    2000 JANUARY 5, 00-4
    2000-6 JANUARY 00 120
    2000-7 JANUARY 00 57

    .. I tried a few things to fill the values using rowid, but I was not able to get anything to work - ideas?
    Thank you!
    Adam

    Use MERGE:

    merge
      into  adam_test1 t1
      using (
             select  rowid,
                     sum(amount) over(partition by account order by entry_date) balance
               from  adam_test1
            ) t2
      on (t1.rowid = t2.rowid)
      when matched
        then
          update set t1.balance = t2.balance
    /
    
    ACCO ENTRY_DAT     AMOUNT    BALANCE
    ---- --------- ---------- ----------
    1000 01-JAN-00         50         50
    1000 02-JAN-00         40         90
    1000 03-JAN-00        -50         40
    1000 04-JAN-00         10         50
    1000 05-JAN-00       -250       -200
    1000 06-JAN-00        100       -100
    1000 07-JAN-00         50        -50
    2000 01-JAN-00         30         30
    2000 02-JAN-00         10         40
    2000 03-JAN-00       -520       -480
    2000 04-JAN-00        140       -340
    
    ACCO ENTRY_DAT     AMOUNT    BALANCE
    ---- --------- ---------- ----------
    2000 05-JAN-00         -4       -344
    2000 06-JAN-00        120       -224
    2000 07-JAN-00         57       -167
    
    14 rows selected.
    
    SQL> 
    

    SY.

  • Count the number of fields in a record of CSV file

    Hello

    Here's my problem. I need to open a CSV file on a directory and to count the number of fields in a record. I can easily read the first record using the package UTL_FILE, something like:

    UTL_FILE.fopen (s_remote_dir, s_csv_file, 'R', 32767);
    UTL_FILE.get_line (input_file, buffer_entree);

    then I count the number of commas in the buffer in order to get none. fields:

    IF buffer_entree IS NOT NULL THEN
    n: = < function that counts the number of commas in a string, buffer_entree >
    END IF;

    However, this method will not work If a comma is present within a field, that is to say:

    127763, account "TRA", 1001, 34, _ "1007 main St., apt. 798 "_"
    (last field contains a comma)

    Please notify.

    Kind regards
    M.R.

    Here is an example of regexp Etbins solution:

    SQL> declare
      2     line     varchar2(1000) := '127763, "TRA account", 1001, 34, "1007 main St., apt. 798", 42, "This, and that, and more"';
      3     fields   number;
      4  begin
      5     fields := regexp_count(regexp_replace(line,'".*?"'),',') + 1;
      6     dbms_output.put_line('Number of fields: '||to_char(fields,'TM9'));
      7  end;
      8  /
    Number of fields: 7
    

    Edit:
    Added the '+ 1', because the number of commas is a less number of fields ;-)

    Published by: Kim Berg Hansen on November 2, 2011 08:53

  • I have a file svg 1095 bytes that works in chrome, but Firefox and Internet Explorer Remove somehow one of the components, you can solve the problem?

    The bottom rectangle is missing, if I change the top of this rectangle invisible 1 pixel upward or down it becomes a 1 pixel line, very strange.

    <?xml version="1.0" standalone="no"?>
    <svg width="3cm" height="3cm" viewBox="0 0 1000 1000"
         xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny">
      <title>Genetics Logo</title>
      <desc>Genetics Logo</desc>
    
    <mask id="circles">
      <rect fill="white" width="100%" height="100%"/>
      <circle fill="black" cx="846" cy="800" r="170"/>
      <circle fill="black" cx="500" cy="200" r="170"/>
      <circle fill="black" cx="500" cy="600" r="190"/>
      <circle fill="black" cx="154" cy="800" r="170"/>
    </mask>
    
      <polyline stroke="black" stroke-width="140" points="154,800 500,200" mask="url(#circles)"/>
      <polyline stroke="black" stroke-width="140" points="846,800 500,200" mask="url(#circles)"/>
      <polyline stroke="black" stroke-width="140" points="154,800 846,800" mask="url(#circles)"/>
    
      <circle class="CtlPoint" cx="154" cy="800" r="130"/>
      <circle class="CtlPoint" cx="846" cy="800" r="130" />
      <circle class="CtlPoint" cx="500" cy="200" r="130" />
      <circle class="CtlPoint" cx="500" cy="600" r="150" fill="#C00"/>
    </svg>

    Imagine that the lines had no stroke. The top two lines are tilted so that if you drew a box round them aligned to x and there axes would not empty.

    The bottom line is horizontal. If you exclude his race-width of the rectangle enclosing has no height.

    It turns out it's important!

    You do not specify one attribute maskUnits so the default is used http://www.w3.org/TR/SVG/masking.html#Masking which is objectBoundingBox and it turns out that this (http://www.w3.org/TR/SVG/coords.html#ObjectBoundingBox) is incompatible with forms that have no framework encompassing.

    The specification SVG that specifically said...

    Keyword objectBoundingBox should not be used when the geometry of the applicable element has no width or no height, as in the case of a line horizontal or vertical, even when the line has actual thickness seen due to having a width of line not zero as the width of the line is ignored for limit box calculations. When the geometry of the applicable element has no width or height and objectBoundingBox is specified, then the given effect (e.g., a gradient or a filter) will be ignored.

  • LaserJet: Can I force a newer printer to imitate the old Laserjet model?

    Try to replace the printer on an instrument of laboratory a few years to find the compatible template.

    Printer provided originally is Laserjet 1100.

    The system works very well with the Laserjet 1100, I believe with 1320 and other series of 1000, but NOT with the LaserJet 2000 or later.

    Is it possible to force a newer printer (for example P2035) to "pretend" that it's the 1100 model?

    The 1100 uses only PCL5e; the P2035 has PCL5e as one of its languages, but still does not print correctly.

    I believe that the instrument asks the printer port & request "who's there?" and adjusts its output according to the response of the printer; seems he misunderstands P2035 response and other models I've tried like P2014.

    No, I can't change the behavior of the instrument or the exit without a VERY expensive change.

    Centronics parallel connection, I believe that a parallel-USB adapter would not help.

    Test options are very limited due to the location of the instrument in a biological laboratory; If something is happening here that it can exit only by autoclave!

    Any ideas out there?

    Frankly I recommend you buy a LaserJet P3015, then go online and buy a parallel EIO port, they are cheap on ebay.

    HP EIO parallel port is supported in the P3015, but this just printer model is no longer supported, but it is still available if you go out and get a fairly quicklvy.

    Your other option is simply to find a used LaserJet 4000, 4100, or 42 X 0 printer, these models all have a built-in parallel port.

    I just discovered the P3015 be be abandoned to randomly talk to someone in sales to the company that I work.

    Due to another scenario, I checked the parallel EIO port that made HP is compatible with the P3015.

    The parallel port also work in HP P4015, but HP does not guarantee that it does, I saw it work properly from any PC in this way however external Jetdirects will have problems with it. I do not know how he would react on your lab equipment, that's why I recommend the P3015 which you can always buy new with a warranty.

    If my post decided and your problem please mark as a solution. You can thank all tech for a good post giving him a helping hand to the top just click the button below the post.

  • 1000M, 2000M vs. 10W in a GPU makes a big difference in the life of consumption and electric battery?

    It is a question similar to one that has been asked before, but I want to just make sure.

    I'm about to pull the trigger on a Thinkpad W520 getting and I was wondering whether to get the system with an NVIDIA Quadro 1000 M graphics card or the 2000 M. the latest is a $250 upgrade, double the CUDA cores, uses 55W rather than 45W, and from what I've heard is that they are essentially the same chip, but the 2000 M is 50% more powerful than the 1000 M.

    I tried searching on these two, but I'll still have trouble deciding. It is worth the upgrade? Is energy use much more of a difference? (I don't know a lot about vs 45W 55W). It will make my system run much hotter? I probably wouldn't make a difference now, but I thought the 2000M would be more future-proof, since it is twice as powerful.

    Thank you!


  • BlackBerry smartphones is that just me?...

    If I live 1000, I will probably never understand why brain damage associated with simple aspects of synchronizing a Blackberry and a Mac seems to be design...

    After upgrading to Snow Leopard and run BDM for Mac for the first time after the upgrade, I was invited with the inept option to overwrite the device with the data of the office or merger, which would duplicate most of the data on the device.

    Well well... What about those of us who do the 98% of our update on the Blackberry, not the desktop computer? Is it really so hard to add a third option... Crush the Office? This simple option is available in Windows since Christophe Colomb used his Blackberry to update the Queen at the end of the 1400s... I mean really!

    I guess they assume that most of us have loads of time on our hands to f___ autour of these problems an averse to work.

    Is it me?

    Laughing out loud... Thanks for the suggestion. I can see where my post can look like a shot of mouth... He wrote with a curious smile. Will do it again if necessary.

  • Site to site VPN help

    Hello

    I'm trying to simulate an intranet VPN for a school project to package 6.0.1 tracers. I did all the settings. VoIP works between sites, I have a connection anywhere. My problem is I want to make connection to the seat with two remote sites. I can't establish the tunnel between the head and the remote site.

    Here is the pattern and the source. Any help would be appreciated. Thank you!

    CCME1 router configuration

    hostname CCME1

    !

    !

    !

    !

    DHCP excluded-address IP 10.10.0.1 10.10.0.10

    DHCP excluded-address IP 10.15.0.1 10.15.0.10

    !

    dhcp Date_pool IP pool

    Network 10.10.0.0 255.255.255.0

    default router 10.10.0.1

    dhcp Voce_pool IP pool

    Network 10.15.0.0 255.255.255.0

    router by default - 10.15.0.1

    option 150 ip 10.15.0.1

    !

    !

    !

    crypto ISAKMP policy 1

    BA aes

    preshared authentication

    Group 2

    !

    ISAKMP crypto key 0 address 172.1.2.1

    !

    86400 seconds, duration of life crypto ipsec security association

    !

    Crypto ipsec transform-set utmset aes - esp esp-sha-hmac

    !

    100 r1_to_r2 of ipsec-isakmp crypto map

    defined by peer 172.1.2.1

    PFS group2 Set

    86400 seconds, life of security association set

    Set transform-set utmset

    match address 102

    !

    !

    !

    !

    !

    pvst spanning-tree mode

    !

    !

    !

    !

    interface Loopback0

    99.99.99.99 IP address 255.255.255.255

    !

    interface FastEthernet0/0

    no ip address

    automatic duplex

    automatic speed

    !

    interface FastEthernet0/0.1

    MNG description

    encapsulation dot1Q 1

    IP 10.1.0.1 255.255.255.0

    !

    interface FastEthernet0/0.10

    Description LAN_DATE

    encapsulation dot1Q 10 native

    IP 10.10.0.1 address 255.255.255.0

    !

    interface FastEthernet0/0.15

    Description LAN_VOCE

    encapsulation dot1Q 15

    IP 10.15.0.1 255.255.255.0

    !

    interface FastEthernet0/1

    no ip address

    automatic duplex

    automatic speed

    Shutdown

    !

    interface FastEthernet1/0

    Description SPRE_MIHAILESTI

    IP 172.1.2.1 255.255.255.252

    automatic duplex

    automatic speed

    r1_to_r2 card crypto

    !

    interface FastEthernet1/1

    Description SPRE_R3

    IP 172.1.3.1 255.255.255.252

    automatic duplex

    automatic speed

    !

    interface Vlan1

    no ip address

    Shutdown

    !

    router ospf 1

    Log-adjacency-changes

    Network 10.1.0.0 0.0.0.255 area 10

    Network 10.10.0.0 0.0.0.255 area 10

    Network 10.15.0.0 0.0.0.255 area 10

    network 172.1.2.0 0.0.0.3 area 10

    network 172.1.3.0 0.0.0.3 area 10

    !

    IP classless

    !

    !

    access-list 102 permit ip 10.10.0.0 0.0.0.255 20.10.0.0 0.0.0.255

    access-list 102 permit ip 10.1.0.0 0.0.0.255 20.1.0.0 0.0.0.255

    access-list 102 permit ip 10.15.0.0 0.0.0.255 20.15.0.0 0.0.0.255

    !

    not run cdp

    !

    !

    !

    !

    !

    Dial-peer voice 6 voip

    destination-model 200.

    session target ipv4:172.1.2.2

    !

    Dial-peer voice 7 voip

    destination-model 300.

    session target ipv4:172.1.3.2

    !

    phone service

    Max-joined 10

    Max - dn 20

    IP source address 10.15.0.1 port 2000

    !

    ePhone-dn 1

    number 1000

    !

    ePhone-dn 2

    number 1001

    !

    ePhone-dn 3

    number 1002

    !

    ePhone-dn 4

    number 1003

    !

    ePhone-dn 5

    Number 1004

    !

    ePhone-dn 6

    number 1005

    !

    ePhone 1

    security-mode device no

    00D MAC address 0. FF2B.27D0

    type of 7960

    button 1:1

    !

    ePhone 2

    security-mode device no

    0090.21D4.9973 Mac address

    type of 7960

    key 1:2

    !

    ePhone 3

    security-mode device no

    0030.F2D9 Mac address. A344

    type of 7960

    key 1:3

    !

    ePhone 4

    security-mode device no

    0004.9A90.47E2 Mac address

    type of 7960

    key 1:4

    !

    ePhone 5

    security-mode device no

    0004.9A1A Mac address. E70E

    type of 7960

    key 1:5

    !

    ePhone 6

    security-mode device no

    0010.118B.34B6 Mac address

    type of 7960

    button 1:6

    !

    Line con 0

    !

    line to 0

    !

    line vty 0 4

    opening of session

    !

    !

    !

    end

    CCME2 router settings:

    hostname CCME2

    !

    !

    !

    !

    DHCP excluded-address IP 20.10.0.1 20.10.0.10

    DHCP excluded-address IP 20.15.0.1 20.15.0.10

    !

    dhcp Date_pool IP pool

    network 20.10.0.0 255.255.255.0

    router by default - 20.10.0.1

    dhcp Voce_pool IP pool

    network 20.15.0.0 255.255.255.0

    router by default - 20.15.0.1

    option 150 ip 20.15.0.1

    !

    !

    !

    crypto ISAKMP policy 1

    BA aes

    preshared authentication

    Group 2

    !

    ISAKMP crypto key 0 address 172.1.2.2

    !

    86400 seconds, duration of life crypto ipsec security association

    !

    Crypto ipsec transform-set utmset aes - esp esp-sha-hmac

    !

    100 r2_to_r1 of ipsec-isakmp crypto map

    defined by peer 172.1.2.2

    PFS group2 Set

    86400 seconds, life of security association set

    Set transform-set utmset

    match address 102

    !

    !

    !

    !

    !

    pvst spanning-tree mode

    !

    !

    !

    !

    interface Loopback0

    99.99.99.98 the IP 255.255.255.255

    !

    interface FastEthernet0/0

    no ip address

    automatic duplex

    automatic speed

    !

    interface FastEthernet0/0.1

    Description MNG_R2

    encapsulation dot1Q 1

    IP 20.1.0.1 255.255.255.0

    !

    interface FastEthernet0/0.10

    Description LAN_DATE_R2

    encapsulation dot1Q 10 native

    IP 20.10.0.1 255.255.255.0

    !

    interface FastEthernet0/0.15

    Description LAN_VOCE_R2

    encapsulation dot1Q 15

    IP 20.15.0.1 255.255.255.0

    !

    interface FastEthernet0/1

    no ip address

    automatic duplex

    automatic speed

    Shutdown

    !

    interface FastEthernet1/0

    Description WAN_R2

    IP 172.1.2.2 255.255.255.252

    automatic duplex

    automatic speed

    r2_to_r1 card crypto

    !

    interface Vlan1

    no ip address

    Shutdown

    !

    router ospf 1

    Log-adjacency-changes

    network 20.1.0.0 0.0.0.255 area 10

    network 20.10.0.0 0.0.0.255 area 10

    network 20.15.0.0 0.0.0.255 area 10

    network 172.1.2.0 0.0.0.3 area 10

    !

    IP classless

    !

    !

    access-list 102 permit ip 20.1.0.0 0.0.0.255 10.1.0.0 0.0.0.255

    access-list 102 permit ip 20.10.0.0 0.0.0.255 10.10.0.0 0.0.0.255

    access-list 102 permit ip 20.15.0.0 0.0.0.255 10.15.0.0 0.0.0.255

    !

    not run cdp

    !

    !

    !

    !

    !

    Dial-peer voice 6 voip

    destination-model 100.

    session target ipv4:172.1.2.1

    !

    Dial-peer voice 7 voip

    session target ipv4:172.1.3.2

    !

    Dial-peer voice voip 23

    destination-model 300.

    session target ipv4:172.20.3.1

    !

    phone service

    Max-joined 10

    Max - dn 20

    IP source address 20.15.0.1 port 2000

    !

    ePhone-dn 1

    issue 2000

    !

    ePhone-dn 2

    number 2001

    !

    ePhone-dn 3

    number 2002

    !

    ePhone 1

    security-mode device no

    0030.F296.69A0 Mac address

    type of 7960

    button 1:1

    !

    ePhone 2

    security-mode device no

    000D Mac address. F399. C70B

    type of 7960

    key 1:2

    !

    ePhone 3

    security-mode device no

    00D MAC address 0. FF0D.31CC

    type of 7960

    key 1:3

    !

    Line con 0

    !

    line to 0

    !

    line vty 0 4

    opening of session

    !

    !

    !

    end

    Thank you!!!

    You want your addresses in the crypto map and cryptographic peer addresses key to be those of the remote router. Looks like they call themselves now.

    Sent by Cisco Support technique iPhone App

  • Query, which returns lines adding up to a value in a column

    Hello

    You are looking for an application that will process and return only the many lines that add up to a special value on a column value.

    for example

    ID name date_joined allocated salary

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

    1 Tom January 1, 2010 1000 5000

    Dave 2 3000 5000 February 1, 2010

    3 Cindy 1000 5000 01-apr-2010

    4 Ian 01-mar-2010 1000 5000

    5         Matt          10 -jan-2010 1000-5000

    Return the lines where wages adding upto or beyond the value allocated to 5000, order by date_joined or more former employee first.

    The query should return:

    ID name date_joined allocated salary

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

    1 Tom January 1, 2010 1000 5000

    2         Matt          10 -jan-2010 1000-5000

    3         Ian            01-mar-2010 1000 5000

    Dave 4 3000 5000 February 1, 2010

    We do not want to deal with or include other lines summarizing calculation, would instead add first, if deficit adds to the line.

    Tried with lead, windowed with range UNLIMITED etc. that PRECEDES, that would not come up with good logic.

    I could make it work with PL/SQL, but do it in SQL turns out to be delicate.

    Thank you.

    A.

    Thanks for the input guys.

    Here, the ask is:

    1. how to treat only as lines that satisfy the "allocated" value, without treatment of all lines.

    > Thanks to Jarkko year John for the right direction.

    > RanitB thank you for your approach to the application of the model, I am not well versed with model query that I'll get to. But for the moment its not useful for me.

    2. to get only as much lines that are either less than or equal to 'assigned' value or satisfy "allocated", from less than "attributed" just beyond "allocated".

    (Sorry for the language, if its not very clear, I do not know how this fits better, following example should help demonstrate).

    I came up with the following code, although there could be best way to do it, I hope to see someone.

    {code: sql}

    create table t:

    Select object_name, join_dt, the salary of 1000 last_ddl_time, allocated 5500

    of object;

    Select

    / * gather_plan_statistics * / *.

    Of

    (select

    object_name, join_dt, salary, allocated, sofar, lag (sofar, 1, 0) over (order by join_dt) lag_sofar

    Of

    (select

    object_name, join_dt, salary, allocated,

    Salary on sofar (order by no_lig)

    Of

    (select object_name, join_dt, salary, allocated, row_number() on no_lig (order of join_dt) t) t - must do it has several join_dt even inputs (objects have same time ddl)

    )

    )

    where

    allocated > lag_sofar;

    OBJECT_NAME JOIN_DT SALARY  ALLOCATED SOFAR LAG_SOFAR
    SDO_TOPO_GEOMETRY 17 JULY 02

    1000

    5500 1000 0
    SI_AVERAGECOLOR 18 JULY 02 1000 5500 2000 1000
    SI_COLORHISTOGRAM 18 JULY 02 1000 5500 3000 2000
    SI_POSITIONALCOLOR 18 JULY 02 1000 5500 4000 3000
    SI_FEATURELIST 18 JULY 02 1000 5500 5000 4000
    SI_STILLIMAGE 18 JULY 02 1000 5500 6000 5000

    {code}

    Sorry for the bad formatting, I tried couple of code integration/formatting of tags, but could not get formatting just as many of you have done above.

    Can someone point me on the document where the tags for this type of formatting is present?

    For now I am marking my question as answered with my own response and that of the other answers as useful.

    If I get a better approach/solution I would mark it as correct.

  • Remove duplicates by selecting the first line of each subgroup in a Recordset

    Oracle: 11 GR 2

    Client Windows 7

    I have a set of data (the result of a query) which is similar to:

    D_rank product_id product_desc category income price cost

    1 112233 prod1-iphone phone 200 500 100

    1 112233 prod1-iphone4 phone 200 500 100

    2 223344 prod2-300 1000 400 windows7 OS

    2 223344 prod2-300 1000 400 software windows7

    3 334455 prod3-Mac 1000 computer 1500-1000

    4 445566 prod4-xyz 2000 800 1200 misc

    :                    :               :                                   :               :             :              :

    :                    :               :                                   :               :             :              :

    :                    :               :                                   :               :             :              :

    As you can see the first 4 rows, these rows are repeated due to the product_desc and category material. I need these fields but the first value in each subgroup, so that each row is unique. I.e.

    D_rank product_id product_desc category income price cost

    1 112233 prod1-iphone phone 200 500 100

    2 223344 prod2-300 1000 400 windows7 OS

    3 334455 prod3-Mac 1000 computer 1500-1000

    4 445566 prod4-xyz 2000 800 1200 misc

    :                    :               :                                   :               :             :              :

    :                    :               :                                   :               :             :              :

    :                    :               :                                   :               :             :              :

    You will enjoy the little help.

    Hello

    user13667036 wrote:

    Oracle: 11 GR 2

    Client Windows 7

    I have a set of data (the result of a query) which is similar to:

    D_rank product_id product_desc category income price cost

    1 112233 prod1-iphone phone 200 500 100

    1 112233 prod1-iphone4 phone 200 500 100

    2 223344 prod2-300 1000 400 windows7 OS

    2 223344 prod2-300 1000 400 software windows7

    3 334455 prod3-Mac 1000 computer 1500-1000

    4 445566 prod4-xyz 2000 800 1200 misc

    :                    :               :                                   :               :             :              :

    :                    :               :                                   :               :             :              :

    :                    :               :                                   :               :             :              :

    As you can see the first 4 rows, these rows are repeated due to the product_desc and category material. I have need of these fields but the first value of each subgroup...

    ...

    What does "first" here?  What "subgroup"?

    Depending on your needs, maybe you want to Request Top - N, something like this:

    WITH got_r_num AS

    (

    SELECT d_rank, product_id, product_desc, category, price, income, cost

    ROW_NUMBER () OVER (PARTITION BY d_rank

    ORDER BY product_desc, category

    ) AS r_num

    OF data_set

    )

    SELECT d_rank, product_id, product_desc, category, price, income, cost

    OF got_r_num

    WHERE r_num = 1

    ;

    I hope that answers your question.

    If this isn't the case, please post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data.  (I know you said this is a game of results from a query, and not an array, but the solution is the same as the entry is a single table, or a query, perhaps involvoing several tables.)

    Report when the request above is erroneous results and explain, using specific examples, how find you the correct results from these data.

    As said ground, see the FAQ in the forum: Re: 2. How can I ask a question on the forums?

  • Not a group by Expression

    I have the following table AR_Complex

    Country_codeCountryComplex_AmtChild_Amt
    CC_1CC50001000
    CC_1CC1000
    CC_1CC2000
    CC_1CC1000
    US_2WE30001000
    US_2WE500
    US_2WE200
    US_2WE100

    I wrote the following query

    Select * from (select Country_code, sum (Complex_Amt), sum (Child_Amt), (sum (Complex_Amt) - sum (Child_Amt)) as a Diff of AR_Complex

    Country_code group)

    where Diff > 1

    which works very well.

    How can I get the Country column in the query because when I adds the Country column it does not appear a group by EXPRESSION.

    I think you want:

    Select * from (select Country_code, country, sum (Complex_Amt), sum (Child_Amt), (sum (Complex_Amt) - sum (Child_Amt)) as a Diff of AR_Complex

    Country_code group, country)

    where Diff > 1

  • How to use the clause type without hard-coding the values inside?

    Query

    Select acct_no,

    gl_code,

    CASE

    WHEN entry_type_label ("earned INCOME") THEN

    "Recipes".

    ON THE OTHER

    "Deferred income of credit."

    END as entry_type_label,

    CASE

    WHEN entry_type_label IN ("opening balance") THEN

    "Opening balance".

    WHEN entry_type_label ("deferred revenue CREDIT") THEN

    "The amount of the invoice.

    WHEN entry_type_label ("earned INCOME") THEN

    "Recipes".

    WHEN entry_type_label IN ('closing balance") THEN

    "Closing balance.

    ON THE OTHER

    "Deferred income of credit."

    END tag as,

    entry_type_no,

    orig_chg_start_date,

    period_no,

    -amt as amt

    of revrec_test

    WHERE acct_no = 1788562

    AND IN (2, 4) entry_type_no (acct_no model dimension,

    gl_code,

    entry_type_label,

    entry_type_no,

    orig_chg_start_date,

    period_no) measures (amt) rules upsert

    all (amt 1788562,

    ' NON-10011561',

    "Opening balance"

    2,

    2 OCTOBER 17 08.30.00 AM'.

    190 = 0,

    AMT 1788562,

    ' NON-10011561',

    "Closing balance."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    190 = amt 1788562,

    ' NON-10011561',

    "Deferred income of credit."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    190 - amt 1788562,

    "WON-10011561',

    "Revenue."

    4,

    2 OCTOBER 17 08.30.00 AM'.

    190,

    AMT 1788562,

    ' NON-10011561',

    "Opening balance"

    2,

    2 OCTOBER 17 08.30.00 AM'.

    191 = amt 1788562,

    ' NON-10011561',

    "Closing balance."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    190,

    AMT 1788562,

    ' NON-10011561',

    "Deferred income of credit."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    191 = 0,

    AMT 1788562,

    ' NON-10011561',

    "Closing balance."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    191 =.

    (amt 1788562, "UNEARNED-10011561',"Opening balance", 2,")

    2 October 17 08.30.00 AM', 191 + amt 1788562, "UNEARNED-10011561',

    ("'Revenue deferred credit', 2, 08.30.00 October 2, 17 h", 191)-amt

    1788562,

    "WON-10011561',

    "Revenue."

    4,

    2 OCTOBER 17 08.30.00 AM'.

    191,

    AMT 1788562,

    ' NON-10011561',

    "Opening balance"

    2,

    2 OCTOBER 17 08.30.00 AM'.

    192 = amt 1788562,

    ' NON-10011561',

    "Closing balance."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    191,

    AMT 1788562,

    ' NON-10011561',

    "Deferred income of credit."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    192 = 0,

    AMT 1788562,

    ' NON-10011561',

    "Closing balance."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    192 =.

    (amt 1788562, "UNEARNED-10011561',"Opening balance", 2,")

    2 October 17 08.30.00 AM', 192 + amt 1788562, "UNEARNED-10011561',

    "Revenue deferred credit", 2, 08.30.00 2 October 17: "(, 192)-amt"

    1788562,

    "WON-10011561',

    "Revenue."

    4,

    2 OCTOBER 17 08.30.00 AM'.

    192,

    AMT 1788562,

    ' NON-10011561',

    "Opening balance"

    2,

    2 OCTOBER 17 08.30.00 AM'.

    193 = amt 1788562,

    ' NON-10011561',

    "Closing balance."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    192,

    AMT 1788562,

    ' NON-10011561',

    "Deferred income of credit."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    193 = 0,

    AMT 1788562,

    ' NON-10011561',

    "Closing balance."

    2,

    2 OCTOBER 17 08.30.00 AM'.

    193 =.

    (amt 1788562, "UNEARNED-10011561',"Opening balance", 2,")

    2 October 17 08.30.00 AM', 193 + amt 1788562, "UNEARNED-10011561',

    ("Revenue deferred credit", 2, 08.30.00 2 October 17: ', 193)-amt

    1788562,

    "WON-10011561',

    "Revenue."

    4,

    2 OCTOBER 17 08.30.00 AM'.

    193)

    ORDER BY period_no, entry_type_no;

    The query above works fine. But I hardcoded the values. I want to do the same operation for the other account number which will have different non periodical. How can I reach it?

    Thanks in advance.

    And why do you need a model for that? If I understand the reqs OK:

    with t as)

    Select acct_no,

    "U-11561' gl_code,

    "Deferred income credit ' entry_type_label,.

    2 entry_type_no,

    orig_chg_start_date,

    period_no,

    Max)

    case entry_type_no

    When 2 then - amt

    0 otherwise

    end

    ) amt,.

    Description of the "invoice."

    2 weight

    from table_one

    Acct_no group,

    orig_chg_start_date,

    period_no

    Union of all the

    Select acct_no,

    gl_code,

    entry_type_label,

    entry_type_no,

    orig_chg_start_date,

    period_no,

    -amt,

    Description "paid the Bill."

    3 weight

    from table_one

    where entry_type_no = 4

    Union of all the

    Select acct_no,

    "U-11561' gl_code,

    "Deferred income credit ' entry_type_label,.

    2 entry_type_no,

    orig_chg_start_date,

    period_no,

    AMT 0,.

    case lvl

    When 1 then 'account opening. "

    of other "close account."

    description of the end,

    case lvl

    When 1 then 1

    another 99

    end weight

    from table_one,.

    (select level lvl from dual connect by level<=>

    Acct_no group,

    orig_chg_start_date,

    period_no,

    LVL

    )

    Select acct_no,

    gl_code,

    entry_type_label,

    entry_type_no,

    orig_chg_start_date,

    period_no,

    case

    what weight (sum) (1.99) can

    case weight

    When 2 then amt

    When 3 then - amt

    0 otherwise

    end

    )

    During)

    acct_no partition

    order of period_no,

    weight

    )

    AMT else

    AMT of end,

    Description

    t

    order of acct_no,

    period_no,

    weight

    /

    ACCT_NO GL_CODE ENTRY_TYPE_LABEL ENTRY_TYPE_NO ORIG_CHG_START_DATE PERIOD_NO AMT DESCRIPTION
    ------- ---------------------------- ----------------------- ------------- --------------------- --------- ---------- ---------------
    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 100 0 opening account
    1001 U-11561 deferred revenue credit 2 Bill October 2, 17 08.30.00 AM 100 44
    E-11561 1001 recipes 4 08.30.00 2 October 17: 100 13.87 paid invoice

    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 100 30.13 closing account
    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 101 30.13 opening account
    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 101 0 Bill
    E-11561 1001 recipes 4 08.30.00 2 October 17: 101 14,35 paid invoice

    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 101 15.78 closing account
    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 102 15.78 opening account
    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 102 Bill 0
    E-11561 1001 recipes 4 08.30.00 2 October 17: 102 14.83 invoice paid

    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 102.95 close account
    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 103.95 opening account
    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 103 Bill 0
    E-11561 1001 recipes 4 08.30.00 2 October 17: 103.95 invoice paid

    1001 U-11561 deferred revenue credit 2 2 October 17 08.30.00 AM 103 0 closing account
    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 104 0 opening account
    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 60 104 Bill
    1002 fixed costs recurring revenue COA Code 4 09.30.00 November 17, 13 h 104 9.13 invoice paid

    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 104 50.87 closing account
    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 105 50.87 opening account
    1002 U-11561 deferred revenue credit 2 December 20, 13 09.30.00 AM 105 50.87 opening account
    1002 U-11561 deferred revenue credit 2 09.30.00 December 20, 13 h 105 19.24 invoice
    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 105 0 Bill
    1002 fixed costs recurring revenue COA Code 4 09.30.00 November 17, 13 h 105 44,91 paid invoice

    1002 fixed costs recurring revenue COA Code 4 December 20, 13 09.30.00 AM 105 - 7.82 Bill paid

    1002 fixed costs recurring revenue COA Code 4 09.30.00 December 20, 13 h 105 3.93 invoice paid

    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 105 29.09 closing account
    1002 U-11561 deferred revenue credit 2 December 20, 13 09.30.00 AM 105 29.09 closing account
    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 106 29.09 opening account
    1002 U-11561 deferred revenue credit 2 December 20, 13 09.30.00 AM 106 29.09 opening account
    1002 U-11561 deferred revenue credit 2 December 20, 13 09.30.00 AM 106 0 Bill
    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 106 0 Bill
    1002 fixed costs recurring revenue COA Code 4 09.30.00 November 17, 13 h 106 44,91 paid invoice

    1002 fixed costs recurring revenue COA Code 4 09.30.00 December 20, 13 h 106 11.75 invoice paid

    1002 fixed costs recurring revenue COA Code 4 December 20, 13 09.30.00 AM - 23.47 106 paid

    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 106-4.1 closing account
    1002 U-11561 deferred revenue credit 2 December 20, 13 09.30.00 AM 106-4.1 closing account
    1002 U-11561 deferred revenue credit 2 December 20, 13 09.30.00 AM 107 - 4.1 opening account
    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 107 - 4.1 opening account
    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 107 Bill 0
    1002 U-11561 deferred revenue credit 2 December 20, 13 09.30.00 AM 107 Bill 0
    1002 fixed costs recurring revenue COA Code 4 December 20, 13 09.30.00 AM - 13.69 107 paid invoice

    1002 fixed costs recurring revenue COA Code 4 November 17, 13 09.30.00 AM 107 35.91 invoice paid

    1002 fixed costs recurring revenue COA Code 4 09.30.00 20 December 13 AM 107 6,86 invoice paid

    1002 U-11561 deferred revenue credit 2 17 November 13 09.30.00 AM 107 - 33.18 closing account
    1002 U-11561 deferred revenue credit 2 December 20, 13 09.30.00 AM 107 - 33.18 closing account

    47 selected lines.

    SQL >

    SY.

  • Update ROLLUP for totals

    Hi guys.

    I tried to summarize a bunch of lines, but I got a bit doing wrong.

    I have a few nested queries that I show below:

    SELECT DATA, SAP, SADIG, DIFF
      FROM (SELECT TMPSAP.DATSAP as DATA,
                   TMPSAP.VALSAP as SAP,
                   TMPSADIG.VALSADIG as SADIG,
                   ABS(TMPSAP.VALSAP - TMPSADIG.VALSADIG) as DIFF,
                   GROUPING(TMPSAP.DATSAP) AS GRUPO
              FROM (SELECT SUM(ZVLBRT) + SUM(ZDESVP) as VALSAP,
                           TO_DATE(SPTAG, 'YYYYMMDD') as DATSAP
                      FROM SAPR3.S974@PRD
                     WHERE VKORG = '1000'
                       AND (TO_NUMBER(SPART) BETWEEN 10 AND 55 OR SPART = '99')
                       AND KUNNR <> 1004
                       AND TO_DATE(SPTAG, 'YYYYMMDD') BETWEEN
                           TRUNC(TRUNC(SYSDATE, 'DD') - 1, 'MM') AND
                           TRUNC(SYSDATE, 'DD') - 1
                     GROUP BY SPTAG) TMPSAP,
                  
                   (SELECT SUM(FATDEVVLR) as VALSADIG, DATFATDEV as DATSADIG
                      FROM SADIG_FATDEV
                     WHERE BUCDG = 01
                       AND DATFATDEV BETWEEN
                           TRUNC(TRUNC(SYSDATE, 'DD') - 1, 'MM') AND
                           TRUNC(SYSDATE, 'DD') - 1
                     GROUP BY DATFATDEV) TMPSADIG
             WHERE TRUNC(TMPSAP.DATSAP, 'DD') = TRUNC(TMPSADIG.DATSADIG, 'DD')
             GROUP BY GROUPING SETS((DATSAP, VALSAP, VALSADIG),())) ALLDATA
     GROUP BY ROLLUP(ALLDATA.GRUPO, ALLDATA.DATA, SAP, SADIG, DIFF)
    

    I will have some difficulties to determine which GROUP BY attributes should I use for the outter request, so the results I get are like these:

    DATASAPSADIGDIFF
    08/01/2013100020001000
    08/01/201310002000
    08/01/20131000
    08/01/2013
    08/02/2013100010000
    08/02/201310001000
    08/02/20131000
    08/02/2013
    08/03/2013200030001000
    08/03/201320003000
    08/03/20132000
    08/03/2013
    08/05/2013500050000
    08/05/201350005000
    08/05/20135000
    08/05/2013
    08/06/2013100020001000
    08/06/201310002000
    08/06/20131000
    08/06/2013

    If you look at my second selection layer (the one that returns ALLDATA), my results are like these:

    DATASAPSADIGDIFFGRUPO
    08/01/20131000200010000
    08/02/20131000100000
    08/03/20132000300010000
    08/05/20135000500000
    08/06/20131000200010000
    1

    And what I want is this:

    DATASAPSADIGDIFF
    08/01/2013100020001000
    08/02/2013100010000
    08/03/2013200030001000
    08/05/2013500050000
    08/06/2013100020001000
    10000130003000

    I tried several combinations in the rollup PACKAGE, but without success. What Miss me?

    Thank you very much!

    Best regards

    Vinicius

    WITH just STEP_3 simulates the result of your step_3. For brevity, I've coded dates as strings.

    Use only the part colored on my previous post.

    Concerning

    Etbin

    better yet

    with

    STEP_3 as

    (select to_date (' 01/08/2013 ',' dd/mm/yyyy') DATA, SAP 300, SADIG 100, 200 DIFF 0 GRUPO of union double all the)

    Select to_date (February 8, 2013 ', ' dd/mm/yyyy'), 1000,1000,0, 0 of all the double union

    Select to_date (March 8, 2013 ',' dd/mm/yyyy ""), - 500,-500, 0, 0 of all the double union

    Select to_date (May 8, 2013 ', ' dd/mm/yyyy'), 5000,5000,0, 0 of all the double union

    Select to_date (June 8, 2013 ', ' dd/mm/yyyy'), 1200,1200,0, 0 of all the double union

    Select to_date (July 8, 2013 ', ' dd/mm/yyyy'), 1800,1800,0, the double 0

    )

    Select decode data (grouping (data), 0, to_char(data,'dd/mm/yyyy'),'Total:');

    Sum (SAP) sap,

    Jeremy Sum (Sadig),

    Sum (diff) diff

    of step_3

    Group of rollup (data)

    Post edited by: Etbin used dates

Maybe you are looking for

  • Open the new tab more sign on the left of the tabs rather than on the right

    I'm running FF 9.01 and I just noticed the "open a new tab" plus sign is on the left side of my tabs currently open. How can I move the sign at the end of my open tabs (to the right of the tabs open)? Not sure how he got that way.

  • Brightness & yelow filter problems

    Hello! My problem is that I can not increase the brightness in the games.I use the nwidia Control Panel to increase the brightness, my office is almost white, but nothing happens in the games...Everything was OK under XP (so I change the brightness o

  • error message when the mail is opened

    When I opened my mailbox the mailbox I get error messages and do not know what to do about this.  Also, cannot send mail

  • Change to new SSD startup disk

    Hello I have reformatted my C drive, reinstalled Vista Home premium x 64 with all updates, and then installed a few essential programs.  then I copied the disc to my new SSD using Norton Ghost.  Then, I set the BIOS to boot from the new SSD. good so

  • Bruce

    I have a program listed under programs in the control panel that will not uninstall.  This program's Inbox toolbar by Inbox.com, Inc..  I tried to remove it several times but it remains in place. What can I do? Thank you Bruce