Query to get the total effort Projectwise

I have the following table
create table Allocation 
(
  projID varchar(10),
  projName varchar(20),
  associateID number,
  associateName varchar(10),
  allocationStartDate Date,
  allocationEndDate Date,
  allocationPercent number
  PRIMARY KEY(associateID,associateName)
);

insert into Allocation values ('123','Mr.A','Prj1','Green Computing','to_date('05/15/2011', 'mm/dd//yyyy')','to_date('07/15/2011', 'mm/dd//yyyy')','50');
insert into Allocation values ('123','Mr.A','Prj2','Cloud Computing','to_date('05/31/2011', 'mm/dd//yyyy')','to_date('06/30/2011', 'mm/dd//yyyy')','70');
insert into Allocation values ('1234','Mr.B','Prj1','Green Computing','to_date('06/15/2011', 'mm/dd//yyyy')','to_date('07/31/2011', 'mm/dd//yyyy')','60');
create table Project
(
  projID varchar(10),
  projName varchar(20),
  StartDate Date,
  EndDate Date,
  PRIMARY KEY(associateName)
);

insert into Project values ('Prj1','Green Computing','to_date('05/01/2011', 'mm/dd//yyyy')','to_date('07/31/2011', 'mm/dd//yyyy')');
insert into Project values ('Prj2','Cloud Computing','to_date('05/15/2011', 'mm/dd//yyyy')','to_date('08/31/2011', 'mm/dd//yyyy')');
I want to select the effort wise project. the number of work days multiplied by the 9hrs for each day for all associated with the title of a project. The result should look like this

Project ID     Project Name     Associate ID     Associate Name     Effort
Prj1             Green Computing     123                Mr.A            100
Prj1             Green Computing     1234                Mr.B            120
Oracle version: 9i 10g / 11g

I made my mind reading attempt (to correct mistakes in the script). Do you mean the following:

CREATE TABLE Allocation
(
   associateID           VARCHAR (10),
   associateName         VARCHAR (100),
   projID                VARCHAR (10),
   projName              VARCHAR (20),
   allocationStartDate   DATE,
   allocationEndDate     DATE,
   allocationPercent     NUMBER,
   CONSTRAINT pk_allocation PRIMARY KEY (associateID, ProjID)
);

INSERT INTO Allocation
     VALUES ('123',
             'Mr.A',
             'Prj1',
             'Green Computing',
             TO_DATE ('05/15/2011', 'mm/dd/yyyy'),
             TO_DATE ('07/15/2011', 'mm/dd/yyyy'),
             '50');

INSERT INTO Allocation
     VALUES ('123',
             'Mr.A',
             'Prj2',
             'Cloud Computing',
             TO_DATE ('05/31/2011', 'mm/dd/yyyy'),
             TO_DATE ('06/30/2011', 'mm/dd/yyyy'),
             '70');

INSERT INTO Allocation
     VALUES ('1234',
             'Mr.B',
             'Prj1',
             'Green Computing',
             TO_DATE ('06/15/2011', 'mm/dd/yyyy'),
             TO_DATE ('07/31/2011', 'mm/dd/yyyy'),
             '60');

COMMIT;

CREATE TABLE Project
(
   projID      VARCHAR (10),
   projName    VARCHAR (20),
   StartDate   DATE,
   EndDate     DATE,
   CONSTRAINT pk_project PRIMARY KEY (projID)
);

INSERT INTO Project
     VALUES ('Prj1',
             'Green Computing',
             TO_DATE ('05/01/2011', 'mm/dd/yyyy'),
             TO_DATE ('07/31/2011', 'mm/dd/yyyy'));

INSERT INTO Project
     VALUES ('Prj2',
             'Cloud Computing',
             TO_DATE ('05/15/2011', 'mm/dd/yyyy'),
             TO_DATE ('08/31/2011', 'mm/dd/yyyy'));

COMMIT;

SELECT a.projid "Project ID",
       p.projname "Project Name",
       a.associateid "Associate ID",
       a.associatename "Associate Name",
       CASE
          WHEN a.allocationenddate - a.allocationstartdate >= 0
          THEN
              /*if project begins and ends on the same day,
                we still want to allocate 9 hrs,
                so we use a "1 + " to account for the first day*/
              to_char((1 + (a.allocationenddate - a.allocationstartdate) * 9))
          WHEN a.allocationenddate is null or a.allocationstartdate is null
          THEN
             /*if project is still underway*/
             'Project is in progress'
          WHEN a.allocationenddate - a.allocationstartdate < 0
          THEN
              /*begin date is later than end date*/
             'Invalid data - begin date must occur before end date'
          ELSE
           null
       END
          "Effort"
  FROM allocation a
  JOIN project p
  ON a.projid = p.projid;

Tags: Database

Similar Questions

  • Query to get the total counts in the given scenario

    Hello

    I use Oracle 10 g

    I have a table with the following data

    AgId Trm CD S
    -------------------------------------------------
    A 1000 100010, 12 - JAN
    A 1000 100019, 20 - MAR
    1000 100019 D 20-JUL
    -------------------------------------------------
    1001 100011 25-JAN HAS
    1001 100011 D 20 - FEB
    A 1001 100011, 23 - MAR
    1001 100012 A 31 - JAN
    -------------------------------------------------
    1002 100013 A 14 - FEB
    D 1002 100013 05 - APR
    1002 100015 02-MAY HAS
    -------------------------------------------------
    A 1003 100014, 03 - MAR
    1003 100014 D 25 - MAR
    -------------------------------------------------
    1004 100016 HAS 22 - MAY
    1004 100017 21 - JUN HAS
    A 1004 100018, 01 - JULY
    -------------------------------------------------
    1005 100020 D 21-MAY
    1005 100020 HAS 21-JUL
    1005 100020 D 11 - AUG

    Here the overall status of AgId '1000' is A as it is to have at least 1 active Trm
    Similarly, the status of AgId '1001' is A
    status of AgId '1002' is A
    But, the AgId '1003' is D its CRT is disconnected after activation (according to the date column 'CD')
    Then, the status of AgId '1004' is A
    and finally AgId '1005' is new D as its CRT disabled, active and disabled finally

    Therefore, taking into account these criteria can someone give me a query to get (not AgId, who are 'Assets') and similarly 'disabled '.
  • Can I get the total number of records that meet the conditions of a query using the Table API?

    Hello

    A < row > TableIterator is returned when I ask operations using the index of tables. If I want to get the total number of records, I count one by one using the returned TableIterator < row >.


    Can I get the total number of records directly meets the conditions of the query?

    I can get the total number of records directly the request of the meeting of the conditions of CLI using the command Global table - name tableName - count - index index-name-field fieldName - start startValue-end endValue.

    Can I get the same results using the Table API?

    I used MongoDB and NoSQL Oracle for about a year. According to the experience of the use of these dbs, I think mongoDB querying interface is powerful. In the contras, the query interface is relatively simple, which results is a lot of work that is usually a long time in the client side.

    Hello

    Counting records in a database is a tricky thing.  Any system that gives you an accurate count of the records will have a hotspot of concurrency on updates, namely the place where the counting is maintained.  Such a count is a problem of performance in addition to competitive access problem.   The problem is even more difficult in a system widely distributed such a NoSQL database.

    The CLI has overall command that counts, but does so by brutal force - iterate keys that correspond to the parameters of the operation.  This is how you must do this within the API.  There is not a lot of code, but you have to write.  You certainly want to use TableIterator TableAPI.tableKeysIterator (), because a key iteration is significantly faster than the iteration of lines.  Just one iteration and count.

    If you use TableAPI.multiGet () and a key with a touch of brightness full then, in fact, count the results as they are returned in a single piece (a list).

    Kind regards

    George

  • How to get the total runtime of a file of tkprof

    Hello

    I have a file tkprof. How can I get the total execution time. Through the file I guess than the sum of "Total expected" would give the total time in the section "elapsed time are waiting on the following events:

    . Sample tkprof is given below.
    SQL ID: gg52tq1ajzy7t Plan Hash: 3406052038
    
    SELECT POSTED_FLAG 
    FROM
     AP_INVOICE_PAYMENTS WHERE CHECK_ID = :B1 UNION ALL SELECT POSTED_FLAG FROM 
      AP_PAYMENT_HISTORY APH, AP_SYSTEM_PARAMETERS ASP WHERE CHECK_ID = :B1 AND 
      NVL(APH.ORG_ID, -99) = NVL(ASP.ORG_ID, -99) AND 
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'ALWAYS' OR 
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'CLEARING ONLY' AND 
      APH.TRANSACTION_TYPE IN ('PAYMENT CLEARING', 'PAYMENT UNCLEARING'))) 
    
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          0           0
    Execute    442      0.08       0.13          0          0          0           0
    Fetch      963      0.22       4.72        350      16955          0         521
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total     1406      0.31       4.85        350      16955          0         521
    
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 173     (recursive depth: 1)
    Number of plan statistics captured: 1
    
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
    ---------- ---------- ----------  ---------------------------------------------------
             1          1          1  UNION-ALL  (cr=38 pr=3 pw=0 time=139 us)
             1          1          1   TABLE ACCESS BY INDEX ROWID AP_INVOICE_PAYMENTS_ALL (cr=5 pr=0 pw=0 time=124 us cost=6 size=12 card=1)
             1          1          1    INDEX RANGE SCAN AP_INVOICE_PAYMENTS_N2 (cr=4 pr=0 pw=0 time=92 us cost=3 size=0 card=70)(object id 27741)
             0          0          0   NESTED LOOPS  (cr=33 pr=3 pw=0 time=20897 us)
             0          0          0    NESTED LOOPS  (cr=33 pr=3 pw=0 time=20891 us cost=12 size=41 card=1)
             1          1          1     TABLE ACCESS FULL AP_SYSTEM_PARAMETERS_ALL (cr=30 pr=0 pw=0 time=313 us cost=9 size=11 card=1)
             0          0          0     INDEX RANGE SCAN AP_PAYMENT_HISTORY_N1 (cr=3 pr=3 pw=0 time=20568 us cost=2 size=0 card=1)(object id 27834)
             0          0          0    TABLE ACCESS BY INDEX ROWID AP_PAYMENT_HISTORY_ALL (cr=0 pr=0 pw=0 time=0 us cost=3 size=30 card=1)
    
    
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                       350        0.15          4.33
      Disk file operations I/O                        3        0.00          0.00
      latch: shared pool                              1        0.17          0.17
    ********************************************************************************

    user13019948 wrote:
    Hello

    I have a tkprof file. How can I get the total execution time.
    call count cpu elapsed disk query current rows
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------
    total 1406 0.31 4.85 350 16955 0 521

    TOTAL ELAPSED TIME is 4.85 seconds from line above

  • to get the total value as application even if item_number is added

    Hi all

    I have the following query with me
    SELECT   SUM (  (NVL (f.calc_cement_sk, f.calc_amount) * NVL (f.item_price, 0)
                    )
                  - (  NVL (f.calc_cement_sk, f.calc_amount)
                     * NVL (f.item_price, 0)
                     * (NVL (f.dis_per, 0) / 100)
                    )
                 ) total,
             h.slurry_type, h.stage_id, h.slurry_vol_actual
        FROM xxnp_opn_joblog_est_002 f,
             xxnp_opn_joblog_001 j,
             xxnp_opn_joblog_slurry_003 h,
             qp_secu_list_headers_v qw
       WHERE j.opn_job_desc = 'K/D/KD43/UG187/1338/D/0211/1'
         AND f.opn_joblog_001_id = j.opn_joblog_001_id
         AND j.contract = qw.NAME
         AND h.opn_joblog_001_id = j.opn_joblog_001_id
         AND h.opn_joblog_007_id = f.opn_joblog_007_id
         AND h.opn_joblog_006_id = f.opn_joblog_006_id
    GROUP BY h.stage_id, h.slurry_type, h.slurry_vol_actual
    the result I get is


    SLURRY_TYPE TOTAL STAGE_ID SLURRY_VOL_ACTUAL
    9,562.59 lead 1 490
    2,184.84 1 80 tail
    1,091.73 reload 1 56
    3,431.64 tail 2 100
    when i add f.item_number to the above query as shown below
    
    SELECT   SUM (  (NVL (f.calc_cement_sk, f.calc_amount) * NVL (f.item_price, 0)
                    )
                  - (  NVL (f.calc_cement_sk, f.calc_amount)
                     * NVL (f.item_price, 0)
                     * (NVL (f.dis_per, 0) / 100)
                    )
                 ) total,f.item_number,
             h.slurry_type, h.stage_id, h.slurry_vol_actual
        FROM xxnp_opn_joblog_est_002 f,
             xxnp_opn_joblog_001 j,
             xxnp_opn_joblog_slurry_003 h,
             qp_secu_list_headers_v qw
       WHERE j.opn_job_desc = 'K/D/KD43/UG187/1338/D/0211/1'
         AND f.opn_joblog_001_id = j.opn_joblog_001_id
         AND j.contract = qw.NAME
         AND h.opn_joblog_001_id = j.opn_joblog_001_id
         AND h.opn_joblog_007_id = f.opn_joblog_007_id
         AND h.opn_joblog_006_id = f.opn_joblog_006_id
    GROUP BY h.stage_id, h.slurry_type, h.slurry_vol_actual,f.item_number
    
    
    the field total gets split and gives value corresponding to each item_number
    
    i am giving the ouptut for stage 1
    ITEM_NUMBER TOTAL SLURRY_TYPE STAGE_ID SLURRY_VOL_ACTUAL
    5011.5 1020101001 lead 1 490
    1308.93 1020102002 lead 1 490
    127.215 1020111001 lead 1 490
    138.92 1020112001 lead 1 490
    686 1020113001 lead 1 490
    550,5 1020113002 lead 1 490
    1739.52 1020222010 lead 1 490
    1517.1 1020101001 1 80 tail
    379.5 1020102003 1 80 tail
    83.2 1020103001 1 80 tail
    166.53 1020104001 1 80 tail
    38.511 1020111001 1 80 tail
    1064,7 1020101001 reload 1 56
    27,027 1020111001 reload 1 56


    If we add up the values in the total field to the head, tail, charge that we get 9562.59,2184.84,1091.73 respectively

    kindly Guide
    to get the total value as application even if item_number is added
    thanking in advance

    Hello

    You can do this by enclosing it with another selection

    select
    total, slurry_type, stage_id, slurry_vol_actual,
    sum(total) over (partition by slurry_type, stage_id, slurry_vol_actual) from (
    your actual select
    )
    

    concerning

  • How can I get the total number of pages printed on my LaserJet 3055?

    I have a nice 1012 LaserJet that is not supported in Windows 7, but there is a solution which is to set up a Vista driver as if the printer is a LaserJet 3055.  It works, even if sometimes I get a printed statement that it does not work, and when that happens I just turn off the printer and turn on again immediately and it is fine.  I would like to know if there is anyway I can get the total number of pages printed at some point, as I could with the LaserJet 1012.

    P.S. This thread was moved from software for Laserjet. -Hp moderator of the Forum

    Please ignore my post on the LaserJet 3055.  With the help of a good soul on another thread of discussion, I was able to install and operate my LaserJet 1012 printer on Windows 7, exactly as it did in XP.  No errors, no slow printing, no problem.  The LaserJet 3055 thing helped initially as a work around, but the message about the bad personality who stopped the printer until you turned off and turned it back was boring.

  • Unable to get the total number of records processed by the processor of trade rules

    Details of the environment

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

    Disqualification Version: 12.1.3.0.0


    I use a business rules processor to implement multiple business rules on one record and I am looking for a summary of the number of records increased and does not have a specific rule.


    To illustrate:
    Suppose there are 2 rules, invalid number in Column1 and valid number on Column2.
    10 records to process and 3 folders don't rule 1 (valid on column1) and 9 entered failure of rule 2 (valid number on Column2).

    In the browser of result of the processor Business, the number of past records and failed is displayed but is not part of the output of the processor itself. In the example above, there will be 1 pass and 9 fail records and given the values of said the total number of records can be derived which is 10.

    This is why the expected output will be:
    Success of failure
    Rule 1:7 (10-3) 3
    Rule 2: 1 (10-1) 9
    Note: The number of records that failed can be derived from the table of the rule ID but I don't know how to get the total number of records in order to calculate the number of records that a given rule.

    I tried to publish the County of acceptance and rejection in the browser of result of the processor Business in an intermediate table and ask the same intermediate table to get the pass and fail values but Disqualification does not allow to write and read the same intermediary object in a single process. What is the best way to get the number of records total handled by the processor business rules? This kind of attributes (that do not exist only in the browser of result) can be included in the output of the processor in the next version of the Disqualification?

    In addition, the intermediate table contains only 1 sheet with pass and failure values while the exceptions which have individual failure on each rule contains 12 Archives. What would be the best approach to merge a single record into multiple records according to the example below?

    Staging table
    Success of failure
    1 9

    Exception table
    Single ID ID rule
    Rule 1 Record1
    Rule 1 Record2
    Rule 1 record Record3
    Rule 2 Record1

    Exception table with: staging Table data merge
    Rule ID ID Unique Pass Fail Total
    Rule 1 1 9 10 Record1
    Rule 1 1 9 10 Record2
    Recording rule 1 Record3 1 9 10
    Record1 rule 2 1 9 10

    Please notify.

    Hi Jason,

    The best way to explain how to do this is with an example project (DXI). I'll send you one in offline mode.

    -Mike

  • SQL query to find the total number of source based nonsource passangersbetween source and destination station and passenger station on the same chekindate

    Hello

    SQL query to find the total number of source based nonsource passangersbetween source and destination station and passenger station on the same chekindate.

    Please help on this script and let me know if you need more details.

    ---

    You use a SELECT statement.  Let me know if you need more details.

  • SQL query to get the NULL records after the last matching flag

    I have a xx1 table with id and flag columns. So I want the data in this table, after the last flag matched. I want that data to id 7 in the rooms. Even if the id 2,3,5 are null flag 'Y' was at 6. ID so I need a query to get the data of the xx1 table after the last correspondence flag (from 7 to 9 id).

    SQL > create table xx1

    2 (identification number,

    3 flag varchar2 (10));

    Table created.

    SQL > insert into xx1 values (1, 'Y');

    1 line of creation.

    SQL > insert into values xx1 (2, null);

    1 line of creation.

    SQL > insert into values xx1 (3, null);

    1 line of creation.

    SQL > insert into xx1 values (4, 'Y');

    1 line of creation.

    SQL > insert into values xx1 (5, null);

    1 line of creation.

    SQL > insert into xx1 values (6, 'Y');

    1 line of creation.

    SQL > insert into values xx1 (7, null);

    1 line of creation.

    SQL > insert into values xx1 (8, null);

    1 line of creation.

    SQL > insert into values xx1 (9, null);

    1 line of creation.

    SQL > select * from xx1.

    FLAG OF THE ID

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

    1. IS

    2

    3

    4. IS

    5

    6. IS

    7

    8

    9

    9 selected lines.

    SQL >

    Hello

    user11164339 wrote:

    Hi Frank - when I run the query, I don't see the results data.

    I get

    FLAG OF THE ID

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

    7

    8

    9

    What you do differently?

  • How to get the total reserved cpu or total cpu capacity available with PowerCLI?

    I am able to use the cmdlet Get-Host for a total capcity of CPU and the current CPU usage.  However, I am not able to get the total of reserved CPU.  I also tried another cmdlet like Get-VMHostAdvancedConfiguration, but which does not include either total reserved cpu info.  Any suggestion?

    OK, try this

     foreach($esx in Get-VMHost){
       $parent = Get-View $esx.ExtensionData.Parent   $rp = Get-View $parent.ResourcePool   Select -InputObject $esx -Property Name,      @{N="Total CPU Capacity MHz";E={$rp.Runtime.Cpu.MaxUsage}},      @{N="Reserved CPU Capacity MHz";E={$rp.Runtime.Cpu.ReservationUsed}},      @{N="Available CPU Capacity MHz";E={$rp.Runtime.Cpu.MaxUsage - $rp.Runtime.Cpu.ReservationUsed}}
    }
    
  • vSphere sdk api to get the total memory available for booking of virtual machine

    What vsphere sdk api should I use to get the total memory available to make reservations for virtual machines?

    Here's what I see in the VI client,

    Click on hos-> Configuration:

    Memory

    Physics

    Total xx

    System xx

    VMS 3512,0 MB

    Service xx console

    Now, when I click on the resource allocation tab I see

    3348 MB memory reservation

    Memorey reservation used: 0 MB

    Unreserved memory: 3348 MB

    The question is what value is correct and which are programming API to get all these values (even if it is wrong)?

    If you are familiar with the vSphere API, the easiest way is to browse through the documentation of API reference: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/index.html and/or using the CROWD (object browser), once you explore a bit, you will begin to understand where some properties of what you see on the vSphere Client

    For the configuration of host memory, take a look at: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.MemoryManagerSystem.ServiceConsoleReservationInfo.html

    To the memory of VM host accessible to the general public, take a look at: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.ResourceAllocationInfo.html

    To get information "Resource allocation", you must get a reference to the list of local resources for your host: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.ResourcePool.ResourceUsage.html#reservationUsedForVm

    Even if you do not have a "Resource Pool", there is a defect which still exists. This should get your started

    If you use the VI of Java, you can take a look at the VI Java Browser: http://www.doublecloud.org/2010/02/22/vijava-browser-a-great-tool-to-recommend/

    You must also follow Steve Jin blog (author/creator of connections of vSphere Java open source VI)

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

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    VMware developer community

    If you find this information useful, please give points to "correct" or "useful".

  • IOM sql Query to get the status of the failed task

    Hello world

    We have an obligation as we need to get the status of a particular task (say Create User in OID - Completed\Rejected status resource) for the particular user. We are able to get the status of the provisioed of resources to the user but not the status of the special mission which is trigerred for the user.can someone put some light on it. We must have the SQL query to do this.

    Thanks in advance.

    Kind regards
    MKN

    Hello
    Use this query to get the status of the task, also check the cooments

    SELECT USR. USR_LOGIN, OSI. SCH_KEY, ANN. SCH_STATUS, STA. STA_BUCKET OF
    OSI, CHS, STA, MIL, TOS, PKG, OUEDRAOGO, USR, OBJ, OST
    WHERE OSI.MIL_KEY = MIL.MIL_KEY
    AND ANN. SCH_KEY = OSI. SCH_KEY
    AND STA. STA_STATUS = SCH. SCH_STATUS
    AND TOS. PKG_KEY = PKG. PKG_KEY
    AND MIL. TOS_KEY = TOS. TOS_KEY
    AND OUÉDRAOGO. USR_KEY = USR. USR_KEY
    AND OUÉDRAOGO. OST_KEY = OST. OST_KEY
    AND OST. OBJ_KEY = OBJ. OBJ_KEY
    AND OSI. ORC_KEY = OUEDRAOGO. ORC_KEY
    AND OBJ. OBJ_NAME = "User AD".
    AND OST. OST_STATUS = "Provisioning" - filter accordinglly
    AND STA. STA_BUCKET = 'pending' - filter accordinglly
    AND PKG. PKG_NAME = "AD User" - filter accordinglly
    AND MIL.MIL_NAME = 'System' - filter accordinglly Validation
    ;
    Thank you
    Kuldeep

  • Query to get the data of the column and the metadata in the same set of results.

    Is it possible to build a query to get the values of the columns in a table and also be able to get some metadata (data type, data_length, data_precision, data_scale) for columns in the same set of results.

    If I use a join, have a common value to join on the two tables?

    you use a cross join, not requiring common values.

    create table T (n number, d date, v varchar2(30));
    insert into T values (1,sysdate,'ABC');
    commit;
    
    select C.column_name, c.data_type, c.data_length,
    case c.column_id
     when 1 then to_char(T.N)
     when 2 then to_char(T.D)
     when 3 then T.V
    end VALUE
    from USER_TAB_COLUMNS C, T
    where C.table_name='T'
    order by c.column_id;
    
  • How can I get the total amount of keyframes in the timeline

    I'm building a very simple, single timeline based resource. I want to be able to count the number of pages and display the page number, I'm sure. The resource uses sym.stop (); on the timeline, and the sym.play(1000) () attached to a button. The idea is that I have 2 global variables. 1 that updates the progress of keyframes 'pageNum' and one that calculates the total number of pages (keyframes) on the timeline 'totalPages '.

    "pageNum" is very good, simply a case of incrementing the timeline progress, as I have, but I'm stuck on getting the total number of keyframes. Of course, in the code pane I can look through and count the number of functions "Trigger XXXX @ ms", but can I get the code to do it for me?

    See you soon


    Sean

    Hey,.

    It is ok. I thought about it, although it is very ugly.

    totalPages = 0;

    convert the file edgeActions.js to a string

    $.get ('myAnimateProject_edgeActions.js', {function (data)})

    var data = dataAsStr;

    Look in the 'Editing by default' file as this defines where the triggers are

    var match = dataAsStr.match (/ default Timeline/g);

    get the length of the returned array

    totalPages = match.length;

    });

    If there is an easier way, I'd love to hear, or if people think this way could throw up problems. In the meantime, this will make numbering pages much easier and works for this project

    Thank you for your ideas resdeign.

  • How to write a simple select query to get the data of the table as an XML.

    How to write a simple select query to get the data of the table as an XML. In the query, I'm just adding items below which i need be there in the XML document
    select '<test_tag>'||EMP_NAME||'</test_tag>','<date>'||sysdate||'</date>' 
    from temp_table where id_num BETWEEN 1 AND 10;
    I have need to add the root tag as well in the beginning and the end of < root > < / root > this xml file. Please advice if this is possible with the select query
    without using XMLGEN, XMLQUERY or any other packages built and function?

    I need to URL escapes with the UTF-8 code points that we have already achieved using the utl_http package. Please help how to do that without using the utl_http package.

    What is wrong with him?

    At present, the only way I can think of to avoid a call to UTL_HTTP. SET_BODY_CHARSET is to write your own little wrapper.
    In this way, you can specify the Boolean parameter or omit it if you choose to use named parameters:

    SQL> create or replace function my_url_escape (url in varchar2)
      2  return varchar2
      3  deterministic
      4  is
      5  begin
      6   return utl_url.escape(url, false, 'AL32UTF8');
      7  end;
      8  /
    
    Function created
    
    SQL> select my_url_escape('http://some.uri.com/param?lang=fr&text=contrôle') from dual;
    
    MY_URL_ESCAPE('HTTP://SOME.URI
    --------------------------------------------------------------------------------
    http://some.uri.com/param?lang=fr&text=contr%C3%B4le
     
    

Maybe you are looking for

  • Yoga 2 Pro: plugged headphones problem

    Alrighty, I have a lenovo yoga 2 pro and I recently noticed something really weird. Whenever I plug my headphones on one side (left side) will play the music louder than the other side. At first, I thought that it was my helmet but, I tried my helmet

  • Set to automatic update was already installed on my computer - how can I get rid of the yellow install shield?

    Update for office xp service pack 3 and it is already running on the computer.  How can I get rid of the small yellow update/install shield at the bottom right?  Help, please!

  • Compaq Presario CQ56: Upload photos

    Dear experts.  Sometimes I download pictures from my basic mobile phone.  I used Samsung New PC Studio to do this, before Poto HP or HP photo smart creations.  Since Windows 10 download, don't worry. I contacted Samsung who declare that they are not

  • Start a fan error/push F2

    HP Pavilion a6257c upgrade to Windows 7 32 bit On starting getting a fan error/push F2, but all fans are working properly. No fan on reboot error. There is no builduip of dust that unity is regularly cleaned with dry compressed air. All the fans, pow

  • combine the Lan and wi - fi internet connt

    I have an ADSL broadband through Lan connection with 1 MB/s speed And in my building, we also have a WiFi conection with speed of 1 Mbps. I tried so many times, but only one connection works only ontime. How to increase my speed and how the two connt