Work with the nested case statement

Hi, I tried the SQL to the date below max but not a single runtime error

Select the case sensitive option

When f.rv = "BITTER" then

(case

When (m.SC. = 'A' and str_name = "ST_DT1")

or (m.SC. = 'B' and str_name = "ST_DT2")

or (m.SC. = 'C' and str_name = "ST_DT3") then

Max (m.STDT)

Where (mc.sc = 'C' and str_name = "ST_DT4")

or (mc.sc = 'K' and str_name = "ST_DT5") then

Max (MC. EDDT)

on the other

null

end)

on the other

null

end

of memo_con mc

baro_uy b

end f

ped pe

where b.id = mc.id

and pe.id = mc.mid

and pe.id1 = 1234

and b.cd = f.cd

and f.id = 93;

Could you please suggest me the correct way on it.

Thank you

You need a group of expression OR the only authorized linked should be aggregation function.

Onw solution could be to put the aggregate function (MAX) education all about box.

Like this

SELECT max)

case

When f.rv = "BITTER" then

case

When (m.SC. = 'A' and str_name = "ST_DT1")

or (m.SC. = 'B' and str_name = "ST_DT2")

or (m.SC. = 'C' and str_name = "ST_DT3")

then m.stdt

Where (mc.sc = 'C' and str_name = "ST_DT4")

or (mc.sc = 'K' and str_name = "ST_DT5")

then mc.eddt

end

end) as maxdate

of memo_con mc

baro_uy b

end f

ped pe

where b.id = mc.id

and pe.id = mc.mid

and pe.id1 = 1234

and b.cd = f.cd

and f.id = 93;

Tags: Database

Similar Questions

  • How can I get the nested case statements to work with listagg?

    I have a statement below that does not work as I want it, here is my code:

    Select

    cases where o.personal_label is not null

    then

    listagg (cases where s.subcodevalue like '% MON %')

    then s.subcodevalue |' '|| o.personal_label

    of other s.subcodevalue

    end,': ')

    the Group (order of s.subcodevalue) as subcodevalue

    on the other

    listagg (s.subcodevalue,': ')

    the Group (order of s.subcodevalue) as subcodevalue

    end

    of mtm_styles_new s, order_mtm o

    where INSTR (o.extras, s.code) > 0

    and o.bodyfitting = s.bodyfitting

    and o.division = s.division

    and s.subcodevalue is not null

    and o.ORDER_MTMID = 'somevalue '.

    It should bring the following

    * MY TEST: RPP

    or the following if the first case is not completed:

    * MONDAY: RPP

    I get an error message saying 'missing keyword', but cannot make out where, can someone please help me here?

    The following works fine as long as it is not a nested case statement, but I need to nest the case statement:

    Select listagg (cases where s.subcodevalue like '% MON %')

    then s.subcodevalue |' '|| o.personal_label

    of other s.subcodevalue

    end,': ')

    the Group (order of s.subcodevalue) as subcodevalue

    of mtm_styles_new s, order_mtm o

    where INSTR (o.extras, s.code) > 0

    and o.bodyfitting = s.bodyfitting

    and o.division = s.division

    and s.subcodevalue is not null

    and o.ORDER_MTMID = 'somevalue ';

    Out alias 'subcodevalue as' the case at the end of the case body.

  • Help - nested Case statement

    Hello everyone.  I'm having a hell of a time trying to understand my nested case statement.  It's pretty simple, but I always feel to get this error:

    ORA-00937: not a single group group function
    * 00937. 00000 - 'not a single-group function. "
    Cause:
    Action:

    However, when I try to enter in a "group by" I get this error:

    ORA-00979: not a GROUP BY expression
    * 00979. 00000 - 'not a GROUP BY expression. "
    Cause:
    Action:

    I don't know if there is something wrong with my nested case statement syntax, or miss me something more fundamental. This is my code:
    SELECT AE.EMP_ID,
      CASE
        WHEN EP.PHYSICAL_DATE IS NULL
        THEN
          CASE
            WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 365)
            THEN 'NEEDS PHYSICAL'
            WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 330)
            THEN 'COMING UP'
            ELSE 'No'
          END
        WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
        ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 365)
        THEN 'NEEDS PHYSICAL'
        WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
        ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 330)
        THEN 'COMING UP'
        ELSE 'No'
      END "Needs Physical?"
    FROM AP AE
    LEFT JOIN EMP_PHYSICAL EP
    ON AE.EMP_ID = EP.EMP_ID
    LEFT JOIN POSITION_OFFERED PO
    ON AE.EMP_ID = PO.EMP_ID
    LEFT JOIN EMP_CONTRACT EC
    ON AE.EMP_ID         = EC.EMP_ID
    WHERE PO.ACTUAL_END IS NULL
    AND (EP.PHYSICAL     = 1
    OR EP.PHYSICAL      IS NULL)
    AND :P71_EMP_ID = AE.EMP_ID;
    I appreciate all help. Nice day.

    Aqua

    SELECT AE.EMP_ID,
    CASE
    WHEN EP.PHYSICAL_DATE IS NULL
    THEN
    CASE
    WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 365)
    THEN 'NEEDS PHYSICAL'
    WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 330)
    THEN 'COMING UP'
    ELSE 'No'
    END
    WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
    ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 365)
    THEN 'NEEDS PHYSICAL'
    WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
    ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 330)
    THEN 'COMING UP'
    ELSE 'No'
    END "Needs Physical?"
    FROM AP AE
    LEFT JOIN EMP_PHYSICAL EP
    ON AE.EMP_ID = EP.EMP_ID
    LEFT JOIN POSITION_OFFERED PO
    ON AE.EMP_ID = PO.EMP_ID
    LEFT JOIN EMP_CONTRACT EC
    ON AE.EMP_ID = EC.EMP_ID
    WHERE PO.ACTUAL_END IS NULL
    AND (EP.PHYSICAL = 1
    OR EP.PHYSICAL IS NULL)
    AND :P71_EMP_ID = AE.EMP_ID;
    GROUP BY AE.EMP_ID,EP.PHYSICAL_DATE,EC.ORIGINAL_CONTRACT_START;

    
    

    Hi,

    You need to add Group by clause at the end of the query i have added above.

  • I have problem with value NULL when the use CASE statement please help this question

    I have problem with value NULL when the use CASE statement please help this question


    Table: digital_val

    SNO cl C2

    1 San1 11

    2 22 San2

    Actual result: expected to A         B

    A            B                                                                           11        22

    11 NULL

    22 NULL



    query:

    Select case when c1 = "san1" then c2,.

    case If c1 = "san2" then c2 B

    of digital_val

    I'm more curious why, when you select 2 rows, you expect a result of row?

    WITH digital_val

    AS (SELECT 1 AS 'Sno', 'San1"C1, c2 FROM DUAL 11)

    UNION ALL

    2 SELECT AS 'Sno', 'San2"C1, c2 FROM DUAL 22)

    SELECT CASE WHEN c1 is "San1" THEN END AS A c2.

    CASE WHEN c1 = "San2" THEN END AS B c2

    OF digital_val;

    With no other input, if you select 2 rows, you get 2 rows.  One of the other solutions use a max function, but is this really what you want, does not specify?

  • High resolution quality of the State of stocks, Adobe and work with the previews?

    I used Sutterstock in the past, but being a CC subscriber, I am seriously investigate Adobe Stock.

    Because you don't actually see the image high resolution up to that after purchasing with Adobe Stock I can't say how easily compare its inventory with Sutterstock.

    I downloaded preview AdobeStock_52339199_WM which was, of course, low resolution and it was much smaller in size (preview 1000 x 662 cases real is 4590 x 3040).  Therefore, I really could not do anything with the preview since it's a "postage stamp" even if Larry White was a video how I was suppose to be able to work with the preview in Photoshop and when done, then buy the license.  And once again, in low resolution, I had know idea, with regard to the quality of the finished product, I'd be buying.

    Any help on these questions would be greatly appreciated.

    Hi Ray,

    I understand your concern. However, from now on, you will only be able to download the image in watermark, which is a version low resolution of the image. If you like, you can buy a version the same high resolution.

    Your comments are appreciated.

    ~ David

  • Can I have several structures with the same case of event event?

    Hello

    I do an application which reproduces the front of the power supply HP6675A. To do this, I did a machine to States with different States

    (initialize, measures, voltage, current, ocp, ov, store, recall, etc.). In each State, should have a structure of the event that attracts the events of the buttons, as for example: If the current state is the voltage mode and the current button is pressed the next State will be the current mode. For this purpose in each State of the state machine should be the same structure of event with the same events.

    My problem is that the Vi does not work properly when I have several structures with the same case of event event. There are some possibly to do and how? Or is impossible to have several events? I read a few posts, but I can't find solutions.

    Any help is appreciated.

    Thank you very much.

    In general, you should have 1 structure of the event in your VI.  In your state machine, the structure of the event should be in "pending" status  So you will probably start in the State of the initialization and then spend idling.  Then, the user presses the present button.  If your state machine should then, go to the current state and then return to Idle.

  • I had a computer repair man replace my hard drive and restore my laptop and now my orginal key does not work with the copy of vista it has installed and it won't validate.

    I had a computer repair man replace my hard drive and restore my laptop and now my orginal key does not work with the copy of vista it has installed and it won't validate how can I solve this
    I have an acer

    Diagnostic report (1.9.0027.0):
    -----------------------------------------
    Validation of Windows data-->
    Validation status: invalid license
    Validation code: 50
    Validation caching Code online: n/a, hr = 0xc004f012
    Windows product key: *-* - XY9X3 - JDXYP-6CJ97
    The Windows Product Key hash: xFQJU8srKsovk6p1Lk1yW93in4E =
    Windows product ID: 89583-OEM-7332157-00211
    Windows product ID type: 2
    Windows license Type: OEM SLP
    The Windows OS version: 6.0.6002.2.00010300.2.0.003
    ID: {F20B4B72-1308-45BE-8F90-95E91A3F0AAF} (1)
    Admin: Yes
    TestCab: 0x0
    LegitcheckControl ActiveX: N/a, hr = 0 x 80070002
    Signed by: n/a, hr = 0 x 80070002
    Product name: Windows Vista (TM) Home Premium
    Architecture: 0 x 00000009
    Build lab: 6002.vistasp2_gdr.110617 - 0336
    TTS error:
    Validation of diagnosis:
    Resolution state: n/a

    Given Vista WgaER-->
    ThreatID (s): n/a, hr = 0 x 80070002
    Version: N/a, hr = 0 x 80070002

    Windows XP Notifications data-->
    Cached result: n/a, hr = 0 x 80070002
    File: No.
    Version: N/a, hr = 0 x 80070002
    WgaTray.exe signed by: n/a, hr = 0 x 80070002
    WgaLogon.dll signed by: n/a, hr = 0 x 80070002

    OGA Notifications data-->
    Cached result: n/a, hr = 0 x 80070002
    Version: N/a, hr = 0 x 80070002
    OGAExec.exe signed by: n/a, hr = 0 x 80070002
    OGAAddin.dll signed by: n/a, hr = 0 x 80070002

    OGA data-->
    Office status: 109 n/a
    OGA Version: N/a, 0 x 80070002
    Signed by: n/a, hr = 0 x 80070002
    Office Diagnostics: 025D1FF3-364-80041010_025D1FF3-229-80041010_025D1FF3-230-1_025D1FF3-517-80040154_025D1FF3-237-80040154_025D1FF3-238-2_025D1FF3-244-80070002_025D1FF3-258-3

    Data browser-->
    Proxy settings: N/A
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win32)
    Default browser: C:\Program Files (x 86) \Mozilla Firefox\firefox.exe
    Download signed ActiveX controls: fast
    Download unsigned ActiveX controls: disabled
    Run ActiveX controls and plug-ins: allowed
    Initialize and script ActiveX controls not marked as safe: disabled
    Allow the Internet Explorer Webbrowser control scripts: disabled
    Active scripting: allowed
    Recognized ActiveX controls safe for scripting: allowed

    Analysis of file data-->

    Other data-->
    Office details: {F20B4B72-1308-45BE-8F90-95E91A3F0AAF}1.9.0027.06.0.6002.2.00010300.2.0.003x 64*-*-*-*-6CJ9789583-OEM-7332157-002112S-1-5-21-923204104-223683984-168055983Acer Extensa 5630 Phoenix Technologies LTD.V1.30 20090319000000.000000 + 00070333507018400FA04090409US Mountain Standard Time(GMT-07:00)03ACRSYSACRPRDCT109

    Content Spsys.log: 0 x 80070002

    License data-->
    The software licensing service version: 6.0.6002.18005
    Name: Windows Vista, HomePremium edition
    Description: operating system Windows - Vista, channel OEM_SLP
    Activation ID: bffdc375-bbd5-499d-8ef1-4f37b61c895f
    ID of the application: 55c92734-d682-4d71-983e-d6ec3f16059f
    Extended PID: 89583-00146-321-500211-02-1033-6002.0000-0042012
    Installation ID: 004511331255365043724851364501374781338933223323713385
    Processor certificate URL: http://go.microsoft.com/fwlink/?LinkID=43473
    The machine certificate URL: http://go.microsoft.com/fwlink/?LinkID=43474
    Use license URL: http://go.microsoft.com/fwlink/?LinkID=43476
    Product key certificate URL: http://go.microsoft.com/fwlink/?LinkID=43475
    Partial product key: 6CJ97
    License status: Notification
    Notification reason: 0xC004F063.

    Windows Activation Technologies-->
    N/A

    --> HWID data
    Current HWID of Hash: OgAAAAEAAgABAAIAAwACAAAAAwABAAEAeqjWy6pVxGJ6f0DXhgfkNoBBsJzy9ErM1F/eG4QdrFYqhQ is

    Activation 1.0 data OEM-->
    N/A

    Activation 2.0 data OEM-->
    BIOS valid for OA 2.0: Yes
    Windows marker version: 0 x 20000
    OEMID and OEMTableID consistent: Yes
    BIOS information:
    ACPI Table name OEMID value OEMTableID value
    APIC APIC PTLTD
    FACP INTEL CRESTLNE
    HPET INTEL CRESTLNE
    START PTLTD $SBFTBL$
    MCFG INTEL CRESTLNE
    SLIC ACRSYS ACRPRDCT
    ASF!            OEMID OEMTBL
    SSDT BrtRef DD01BRT
    SSDT BrtRef DD01BRT

    Ah! -in this case, it is not necessary.

    I see from my records that a similar case has been solved by uninstalling and reinstalling the update WAT - KB971033

    Open the Windows Update - click the link view updates installed on the left of the page

    in the list, find the WAT update KB971033, and then uninstall it.

    Then restart and reinstall the update from here - http://support.microsoft.com/kb/971033

    redemarrer restart again, then try to change your product key to the one on the sticker - what is happening this time?

  • None of my function keys (F1 - F12) works with the exception of the ESC key. They worked fine yesterday, but now they do not have. How can I fix this?

    None of my function keys (F1 - F12) works with the exception of the ESC key. They worked fine yesterday, but now they do not have.

    How can I fix this?

    I use the SHIFT + F7 work much and would really appreciate help in getting up and running.

    Thank you

    Check if you have an F LOCK key in the top right of your keyboard.

    If this is not the case, try a system restore:

    Restore point:

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    Do Safe Mode system restore, if it is impossible to do in Normal Mode.

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    See you soon.

    Mick Murphy - Microsoft partner

  • BlackBerry Z10 headphone only works with the left ear

    My headphones (beats studios) only works with the left ear when connected. The helmet has never had a problem on my old iPhone 4 and currently with my rMBP so I know that's not the headphones. Any suggestions?

    There seems to be a problem with the jacket of the head. They are defective for a few pieces and the jacket cannot recognize the HP in the same case, what makes the phone to give no sounds on the notification.

    Try to use different headphones. If the problem persists try replacing the model.

  • working with the hierarchy

    Hello

    I work with the hierarchy (using start with and plug by front) in order to built a 'tree' of jobs in the application.

    For each job, the hirarchy start with LEVEL 1 to the level "n".

    In the example below, I built the hirarchy for job number 34461, with 4 levels.

    Of curse, I have hundreds of jobs, but for simplicity I shows that the values of a job.

    I need your advice with the following problem:

    In the case wherever one of the lines return "bz" in mach_name column, I need to return ALL of the hirarchy work (in the example below - all 11 lines)

    where "bz" value didn't exists column mach_name - no lines related to the specific job should be returned.

    Please notify.

    < code >

    SQL > fixed line 300

    SQL > with all_data as (SELECT X.JOB_NAME, x.joid, LEVEL,

    x.box_joid,

    mach_name

    OF AEDBADMIN.ujo_job x, AEDBADMIN.ujo_job_tree j

    WHERE X.JOID = J.JOID

    START WITH J.PARENT_JOID = 34461

    CONNECT PRIOR X.JOID = J.PARENT_JOID)

    Select all_data.*

    of all_data;

    JOID'ART BOX_JOID LEVEL MACH_NAME JOB_NAME

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

    Ys_Crm_Inv_Push_Load_Ctrl_tr_BOX 31596 1 34461

    Ys_Crm_Inv_Push_Load_Ctrl_tr 31605 2 31596

    Ys_Crm_Inv_BOX 31586 3 31605

    Ys_Crm_Inv 31587 4 31586 bz

    Auto Ys_Crm_Inv_OK 31588 4 31586

    E_Push_Trx_BOX 31594 3 31605

    E_Push_Trx 31595 4 31594 cr

    E_Push_Trx_OK 31597 4 31594 auto

    Ys_Crm_Load_Cntrl_tr_BOX 31599 3 31605

    Ys_Crm_Load_Cntrl_tr 31600 4 31599 bz

    Ys_Crm_Load_Cntrl_tr_OK 31602 4 31599 auto

    11 selected lines.

    < code >

    Thank you

    SELECT DISTINCT *.

    de)

    SELECT mytest.*

    , COUNTY (CASE

    WHEN mach_name = "bz".

    THEN 1

    END

    ) ON (SCORE OF CONNECT_BY_ROOT joid'art) AS good_cnt

    sys_connect_by_path(joid,'/')

    OF mytest

    START WITH lvl = 1

    CONNECT BY box_joid = PRIOR joid'art

    ) t

    ORDER BY road;

  • Challenges, working with the Blues in vco vcac plugin

    Hello

    Work with the latest plugin VCAC release VCO (5.2 and 5.5 respectively), I intending me to put a simple set of wrapper script element before the workflow 'Configure a virtual machine for an action plan', such that (to start) entries and group plan Director supply could be sent in the form of simple name strings, rather than expecting to complex objects (as expected) to allow for easier consumption REST API (not through the layer of presentation btw, who used the inventory tree to search for and provide said interactive input objects).  I couldn't find any provided action let me do the recoveries of simple object by name and decided to start by entering a complete picture of the objects and don't string correspondent against her...

    This proved be simple enough for the provision of groups and works very well - namely due to the provided method "host.findAllChildProvisioningGroups ()", you were using it directly or through the action "getAvailableProvisioningGroups".

    Blue are becoming another story.  I found the 'getBlueprints' action, which appears to be operated by the presentation layer when the workflow is run interactively, holding an object provisioningGroup in entry (which I had already recovered above).  It did not work when used in a script element, however.  After reviewing the support action, I found that it relied on a property of the object group configuration, rather than a method (it is not a useful method available).  Adding that debugging confirmed that the table was never fill when referenced (group.virtualMachineTemplates).  I don't know if it's broken or if I should wait only it works through presentation, or if I was just incorrect use - but I started looking for alternatives.

    I have looked around in the browser of the API and other samples, including the set of extensibility and reviewed all the activities planned, but they always seem to wait for the entry of VCAC:Blueprint type.  I found getBlueprintsForProperty and it is close to what I need, if it is running too slow when you pull a list of close-up (nearly one second per object).  I don't know linqpad can empty all the plans into VCAC (via ODATA) much faster.

    In the end, I'm looking for a way to get easily all plans for a commissioning Group (or even a host if it is fast enough), returned in an array of type VCAC:Blueprint can I browse - or even more simply, to retrieve the object model directly based on a property displayName known and gets my object.  I am aware of the VCAC entity the full mechanism added in the last plugin, but concerned that I'll be back will not match the input type... It seems that some properties do not match the type VCO and others do not part of an entity to plan at all.  Frankly I was hoping to not who become familiar with the innards of the existing API VCAC and wouldn't not rather recreate a plan object of its parts of the requested Party.

    If you're still with me, thank you! - and, ideas?  I'd like to hear missing me something simple here...

    -Milson

    OK spent more time on it with begins to implement a piece of javascript to directly get an object in the inventory of its entity vCAC. Instead of an iteration all objects of the same type, it is the object directly by ID.

    var entityKeyProperties = entity.entityKey;
    var entityIdKey = entityKeyProperties.keys[0];
    var entityIdValue = entityKeyProperties.get(entityIdKey);
    System.log("Found key " + entityIdKey + " : " + entityIdValue);
    
    switch(entity.entitySetName) {
    
        case "VirtualMachines" :
            inventoryObject = Server.findForType("vCAC:VirtualMachine", entity.hostId + "/" + entityIdValue);
            break;
    
        case "VirtualMachineTemplates" :
            inventoryObject = Server.findForType("vCAC:BluePrint", entity.hostId + "/" + entityIdValue);
            break;
    
        default : throw "No inventory object for entity type " + entity.entitySetName;
    }  
    

    I worked with the old version of the plug-in and then decided to test with the last version of the plugin (5.2) and made a great discovery.

    Engineering simplified our life with the implementation of entity.getInventoryObject ();

    So basically:

    var entity = vCACinventoryObject.getEntity(); // convert an inventory object to an entity
    inventoryObject = entity.getInventoryObject(); // convert an entity to an inventory object
    

    So in your case the code to quickly find a blueprint by name would be:

    if (vcacHost == null) return null;
    var model = "ManagementModelEntities.svc";
    var entitySetName = "VirtualMachineTemplates";
    
    var property = new Properties();
    property.put("VirtualMachineTemplateName",name);
    
    var entities = vCACEntityManager.readModelEntitiesByCustomFilter(vcacHost.id, model, entitySetName, property, null);
    
    var blueprints = new Array();
    for each (var entity in entities) {
        blueprints.push(entity.getInventoryObject());
    }
    
    return blueprints;
    
  • VMware 3.0 or 3.5: will it work with the following equipment?  Has anyone tried it? I want to try HA and all the whistles...

    H1. VMware 3.0 or 3.5: will it work with the following equipment?

    2 x G2 Compaq DL380 5i cards controller 5300 AND attached to the case STORAGEWORKS ENCLOSURE 4354R RM DOUBLE U3 PORTS (not on the compatibility list) basic storage

    OR




    2 x G1 s Ml570 without card 5i but rather 5300 controller cards (in the compatibility list) connected to


    U3 PORTS(not on compatibility list) DOUBLE table of STORAGEWORKS ENCLOSURE 4354R RM storage box

    Although not of your configurations are a list of compatibility, it should work, but don't expect to have the fast system (this is the Pentium III). There is a problem with the connection box to two servers. If you do this, that a single server can access 7 disk, and the other will be able to access the other 7.

    If the Smart Array controller is listed, you do not have to worry too much for speaker. You must use ITS 5300 with two lanes in both configurations (case being double bus, so you have two SCSI cables), or you can connect to a server to one bus SCSI and another server to the second SCSI bus. Whatever you choose to do, ORCA allows to configure the drive HARD and RAID.

    I would not recommend to use this system in a production environment (it's slow and old), for testing it should be OK.

    I have (for testing purposes) DL380 G3 with MA8000 storage and it works without a single problem.

  • [JS, CS4] TextFrame.extractLabel () does not work with the instances of this class

    I have the script, which works very well in CS3. In CS4 (app.version = 6.0.1.532) However, I get an error using extractLabel, after reading a few other a textframe properties:

    frameObject.extractLabel ('name')
    Error: TextFrame.extractLabel () does not work with the instances of this class

    Until the reading of one of the 'normal' properties, such as (frameObject.) content I can call frameObject.extractLabel ('name') without errors, but after "watching" (assign it to a variable in the code, or by getting the value in the javascript console), the content property (or as it seems any normal property) the extractLabel method generates the above error.

    It seems to work to move all frameObject.extractLabel at the beginning of the function calls, but I don't think that I would need to do this.

    It could very well be the case that the label read by extractLabel has no content and never received. Will there be a change in behaviour of CS3 in this sentence? If so, and if this is the reason for the error, is there then a way to determine if the label has been assigned?

    This error is familiar to someone else?

    Best regards

    Andreas

    It works if you use:

    var pgItm = app.activeDocument.textFrames.itemByID(parseInt(myId));
    

    Otherwise, this might work:

    var pgItm = app.activeDocument.pageItems.itemByID(parseInt(myId)).getElements()[0];
    

    Although, generally, itemByID gives you the question no matter what it is as long as there are, so I'm bit puzzled that neither of them will be necessary.

    Dave

  • Procedure failed when using bulk collect clause and works with the cursor

    Hi all

    I use "BULK collect into" clause in my procedure and it is a failure after 21 minutes and gives the error "end of file communication channel.
    After that this error comes when I tried to connect the database it gives following error.

    ORA-01034 - Oracle is not available.
    ORA - 27101-shared memory realm does not exist.
    SVR4 error: 2: no such file or directory.

    When I use the cursor instead of the COLLECTION in BULK IN the clause, it runs successfully.

    Following the code works with the slider.
    procedure work_kiosk_full (an_jobid in number, ac_sqlcode out varchar2, ac_sqlerrm out varchar2) is

    ld_curr_time Date;

    cursor cur_work_kiosk is
    Select distinct jt.jt_id AS jt_id,
    NVL ((ROUND ((jt_date_completed-jt_date_requested) * 24, 2)))
    ),
    0
    ) AS actual_hrs_to_complete,
    NVL ((ROUND ((jt_date_responded-jt_date_requested) * 24, 2)))
    ),
    0
    ) AS actual_hrs_to_respond,
    peo1.peo_name AS agent_name,
    peo1.peo_user_name AS asagent_soe_id,
    Le.lglent_desc AS ap_system,
    "" AS assign_work_request_comment,
    DECODE (jt.jt_bill_id,
    138802, 'BILLABLE CLIENT. "
    138803, "CONTRACTED"
    "138804, ' BILLABLE IN-HOUSE."
    NULL, ' '
    ) Billable.
    BL.bldg_name_cc BUILDING, bl.bldg_id_ls AS building_id,
    DECODE (bl.bldg_active_cc,
    'Y', 'ACTIVE',
    'INACTIVE '.
    ) AS building_status,
    DECODE (jt.jt_wrk_cause_id,
    141521, "STANDARD WEAR."
    141522, "NEGLIGENCE."
    141523, "ACCIDENTAL."
    141524, "MECHANICAL FAILURE."
    141525, "CONTROL."
    141526, "VANDAL."
    141527, 'STANDARD ',.
    141528, "WORK PROJECT",.
    6058229, "TEST."
    NULL, ' '
    ) AS cause_type,
    ' ' AS comments, peo3.peo_name AS completed_by,
    JT.jt_requestor_email AS contact_email,
    JT.jt_requestor_name_first
    || ' '
    || JT.jt_requestor_name_last AS contact_name,
    JT.jt_requestor_phone AS contact_phone,
    CC.cstctrcd_apcode AS corp_code,
    CC.cstctrcd_code AS cost_center,
    JT.jt_date_closed AS date_closed,
    JT.jt_date_completed AS date_completed,
    JT.jt_date_requested AS date_requested,
    JT.jt_date_responded AS date_responded,
    JT.jt_date_response_ecd AS date_response_ecd,
    JT.jt_date_scheduled AS date_scheduled,
    DECODE (jt.jt_def_id,
    139949, "WTG VENDOR RESPONSE."
    139950, "WAITING ON PARTS."
    139951, "AVAILABILITY OF THE HAND ŒUVRE."
    139952, "WORK DEFERRED-HI PRI."
    139953, "APPROVAL OF WIND TURBINES."
    139954, "FUNDING."
    139955, "ACCESS DENIED."
    139956, "WTG MATERIAL."
    NULL, ' '
    ) AS deferral_reason,
    JT.jt_description as description,
    JT.jt_date_resched_ecd IN the development of the young child,
    FMG.facility_manager AS facility_manager,
    FL.floors_text AS FLOOR, gl.genled_desc AS general_ledger,
    '' AS kiosk_date_requested,' ' AS kiosk_dispatch_confirmed.
    "" AS kiosk_dispatched,
    EQP.equip_customer_code AS linked_equipment_alias,
    EQP.equip_id AS linked_equipment_id,
    EQP.equip_text AS linked_equipment_name,
    DECODE (jt_originator_type_id,
    1000, "PROJECT MOVE REQUEST."
    138834, "CUSTOMER OPEN CORRECTION."
    138835, "OPEN REQUEST CUSTOMER."
    138836, "CORRECTIVE MAINTENANCE",.
    138837, "BOOKING CONFERENCE ROOM."
    138838, "PROJECT INITIATED REQUEST."
    138839, "PLANNED PREVENTATIVE MAINTENANCE."
    138840, "COULD START FREE APPLICATION."
    NULL, ' '
    ) AS originator_type,
    "" AS payment_terms, priority_text AS priority_code,
    swoty.sworktype_text AS problem_type,
    Prop.property_name_cc as a property,
    JT.jt_cost_quote_total AS quote_total,
    par.levels_name IN the region,
    DECODE (jt.jt_repdef_id,
    141534, 'ADJUSTED SETTING. "
    141535, "THE TRAINING OF THE END,"
    141536, "NEW REQUEST"
    141537, "NO INVESTIGATION OF REPAIR."
    141538 "REPLACED PARTS."
    141539, 'REPLACE EQUIPMEN.
    1000699, "NEW REQUEST"
    NULL, ' '
    ) AS repair_definitions,
    JT.jt_repairdesc AS MARKED_COR,
    JT.jt_requestor AS applicant, ' ' AS requestor_cost_center.
    JT.jt_requestor_email AS requestor_email,
    JT.jt_requestor_name_first AS requestor_name,
    JT.jt_requestor_phone AS requestor_phone,
    "" LIKE response_time, rm.room_name_cc ROOM,
    P1.peo_provider_code1 AS service_provider,
    P1.peo_address_1 AS service_provider_address,
    peocity.city_text service_provider_city,
    P1.peo_provider_code1 AS service_provider_code,
    peocity.city_country_name AS service_provider_country,
    peocur.currency_text AS service_provider_currency,
    P1.peo_name AS service_provider_description,
    P1.peo_dispatch_method AS serv_prov_dispatc_hmethod,
    P1.peo_rate_double AS serv_prov_double_time_rate,
    P1.peo_email AS service_provider_email,
    P1.peo_emergency_phone AS serv_prov_emergency_phone,
    P1.peo_fax AS service_provider_fax_number,
    P1.peo_home_phone AS service_provider_home_phone,
    P1.peo_rate_hourly AS service_provider_hourly_rate,
    P1.peo_title AS service_provider_job_title,
    P1.peo_method_id AS service_provider_method,
    P1.peo_cell_phone AS service_provider_mobile_phone,
    P1.peo_pager AS service_provider_pager,
    P1.peo_rate_differential AS service_provider_rates,
    P1.peo_rate_differential AS ser_prov_shift_differential,
    peocity.city_state_prov_text AS serv_prov_state_province,
    DECODE (p1.peo_active,
    'Y', 'ACTIVE',
    'INACTIVE '.
    ) AS service_provider_status,
    P1.peo_url AS serv_prov_web_site_address,
    P1.peo_phone AS service_provider_work_phone,
    P1.peo_postal_code AS serv_prov_zip_postal_code, ' ' shift, as.
    ' ' AS skill,.
    DECODE (jt.jt_bigstatus_id,
    138813, «NEWS»,
    138814 "PENDING."
    138815, 'OPEN ',.
    138816, "END."
    138817, 'CLOSED ',.
    138818, "CANCELLED."
    NULL, ' '
    ) The STATUS,
    Lev.levels_name IN the subregion, ' ' IN the trade.
    P1.peo_ls_interface_code1 AS vendor_id,
    P1.peo_fax AS vendor_purchasing_fax,
    P1.peo_vendor_site_code AS vendor_sitecode,
    JT.jt_id AS vendor_ticket, p1.peo_name AS vendor_companyname,
    JT.jt_requestor_vip AS vip, wo.wo_id AS work_order_no,
    JT.jt_id AS work_request,
    JT.jt_class_id AS work_request_class,
    woty.worktype_text AS work_type, ' ' AS wr_cost.
    JT.jt_description AS wr_description,
    "" AS wr_dispatch_method,
    DECODE (jt.jt_bigstatus_id,
    138813, «NEWS»,
    138814 "PENDING."
    138815, 'OPEN ',.
    138816, "END."
    138817, 'CLOSED ',.
    138818, "CANCELLED."
    NULL, ' '
    ) AS wr_status,
    ctrY.country_name as a country
    OF citi.jobticket jt,.
    Citi.Property prop,
    Citi.Bldg bl,
    Citi.bldg_levels bldglvl,
    civil LEVEL lev,
    civil by LEVELS.
    (SELECT crstools.stragg (peo_name) facility_manager,
    bldgcon_bldg_id
    OF citi.bldg_contacts, citi.people
    WHERE bldgcon_peo_id = peo_id
    AND IN bldgcon_contype_id (40181, 10142)
    FMG GROUP BY bldgcon_bldg_id),
    Citi.floors, fl,
    Citi.Room rm,
    Citi.general_ledger gl,
    the Citi.legal_entity
    Citi.cost_center_codes cc,
    Citi.Equipment eqp,
    Citi.workType woty,
    Citi.subworktype swoty,
    Citi.work_order wo,
    Jtwo Citi.jt_workers,
    Citi.Priority,
    Ctry Citi.Country,
    Citi.People p1,
    Citi.People peo3,
    Citi.People peo1,
    Citi.City peocity,
    Citi.Currency peocur
    WHERE jt.jt_bldg_id = bl.bldg_id
    AND bl.bldg_id = bldglvl.bldg_levels_bldg_id
    AND bldglvl.bldg_levels_levels_id = lev.levels_id
    AND lev.levels_parent = par.levels_id (+)
    AND prop.property_id = bl.bldg_property_id
    AND bl.bldg_active_ls <>' n
    AND jt.jt_floors_id = fl.floors_id (+)
    AND jt.jt_room_id = rm.room_id (+)
    AND jt.jt_bldg_id = fmg.bldgcon_bldg_id (+)
    AND jt.jt_genled_id = gl.genled_id (+)
    AND gl.genled_lglent_id = le.lglent_id (+)
    AND jt.jt_cstctrcd_id = cc.cstctrcd_id (+)
    AND jt.jt_equip_id = eqp.equip_id (+)
    AND jt.jt_id = jtwo.jtw_jt_id (+)
    AND jt.jt_worktype_id = woty.worktype_id (+)
    AND jt.jt_sworktype_id = swoty.sworktype_id (+)
    AND jt.jt_wo_id = wo.wo_id
    AND jt.jt_priority_id = priority_id (+)
    - AND jt.jt_date_requested > = ADD_MONTHS (SYSDATE,-12)
    AND jt.jt_last_update > = ADD_MONTHS (ld_curr_time-12)
    AND bl.bldg_country_id = ctry.country_id
    AND jtwo.jtw_peo_id = p1.peo_id (+)
    AND p1.peo_city_id = peocity.city_id (+)
    AND jt.jt_completed_by_peo_id = peo3.peo_id (+)
    AND p1.peo_rate_currency_id = peocur.currency_id (+)
    AND jt.jt_agent_peo_id = peo1.peo_id (+);


    BEGIN
    run immediately 'truncate table crstools.drt_bom_work_kiosk;
    Select sysdate in double ld_curr_time;
    FOR cur_rec in cur_work_kiosk LOOP
    IF MOD (cur_work_kiosk % rowcount, 10000) = 0 then
    COMMIT;
    END IF;

    INSERT INTO crstools.drt_bom_work_kiosk
    (JT_ID
    ACTUAL_HRS_TO_COMPLETE
    ACTUAL_HRS_TO_RESPOND
    AGENT_NAME
    ASAGENT_SOE_ID
    AP_SYSTEM
    ASSIGN_WORK_REQUEST_COMMENT
    BILLABLE
    BUILDING
    BUILDING_ID
    BUILDING_STATUS
    CAUSE_TYPE
    COMMENTS
    COMPLETED_BY
    CONTACT_EMAIL
    CONTACT_NAME
    CONTACT_PHONE
    CORP_CODE
    COST_CENTER
    DATE_CLOSED
    DATE_COMPLETED
    DATE_REQUESTED
    DATE_RESPONDED
    DATE_RESPONSE_ECD
    DATE_SCHEDULED
    DEFERRAL_REASON
    DESCRIPTION
    DPE
    FACILITY_MANAGER
    FLOOR
    GENERAL_LEDGER
    KIOSK_DATE_REQUESTED
    KIOSK_DISPATCH_CONFIRMED
    KIOSK_DISPATCHED
    LINKED_EQUIPMENT_ALIAS
    LINKED_EQUIPMENT_ID
    LINKED_EQUIPMENT_NAME
    ORIGINATOR_TYPE
    PAYMENT_TERMS
    PRIORITY_CODE
    PROBLEM_TYPE
    PROPERTY
    QUOTE_TOTAL
    REGION
    REPAIR_DEFINITIONS
    MARKED_COR
    APPLICANT
    REQUESTOR_COST_CENTER
    REQUESTOR_EMAIL
    REQUESTOR_NAME
    REQUESTOR_PHONE
    RESPONSE_TIME
    ROOM
    SERVICE_PROVIDER
    SERVICE_PROVIDER_ADDRESS
    SERVICE_PROVIDER_CITY
    SERVICE_PROVIDER_CODE
    SERVICE_PROVIDER_COUNTRY
    SERVICE_PROVIDER_CURRENCY
    SERVICE_PROVIDER_DESCRIPTION
    SERV_PROV_DISPATC_HMETHOD
    SERV_PROV_DOUBLE_TIME_RATE
    SERVICE_PROVIDER_EMAIL
    SERV_PROV_EMERGENCY_PHONE
    SERVICE_PROVIDER_FAX_NUMBER
    SERVICE_PROVIDER_HOME_PHONE
    SERVICE_PROVIDER_HOURLY_RATE
    SERVICE_PROVIDER_JOB_TITLE
    SERVICE_PROVIDER_METHOD
    SERVICE_PROVIDER_MOBILE_PHONE
    SERVICE_PROVIDER_PAGER
    SERVICE_PROVIDER_RATES
    SER_PROV_SHIFT_DIFFERENTIAL
    SERV_PROV_STATE_PROVINCE
    SERVICE_PROVIDER_STATUS
    SERV_PROV_WEB_SITE_ADDRESS
    SERVICE_PROVIDER_WORK_PHONE
    SERV_PROV_ZIP_POSTAL_CODE
    MAJ
    SKILLS
    STATUS
    SUBREGION
    TRADE
    VENDOR_ID
    VENDOR_PURCHASING_FAX
    VENDOR_SITECODE
    VENDOR_TICKET
    VENDOR_COMPANYNAME
    VIP
    WORK_ORDER_NO
    WORK_REQUEST
    WORK_REQUEST_CLASS
    WORK_TYPE
    WR_COST
    WR_DESCRIPTION
    WR_DISPATCH_METHOD
    WR_STATUS
    COUNTRY
    CREATE_DATE
    )
    VALUES
    (cur_rec.jt_id
    cur_rec, ACTUAL_HRS_TO_COMPLETE
    cur_rec, ACTUAL_HRS_TO_RESPOND
    cur_rec, AGENT_NAME
    cur_rec, ASAGENT_SOE_ID
    cur_rec, AP_SYSTEM
    cur_rec, ASSIGN_WORK_REQUEST_COMMENT
    BILLABLE cur_rec.
    cur_rec, BUILDING
    cur_rec, BUILDING_ID
    cur_rec, BUILDING_STATUS
    cur_rec, CAUSE_TYPE
    cur_rec.COMMENTS
    cur_rec.COMPLETED_BY
    cur_rec, CONTACT_EMAIL
    cur_rec, CONTACT_NAME
    cur_rec, CONTACT_PHONE
    cur_rec, CORP_CODE
    cur_rec, COST_CENTER
    cur_rec, DATE_CLOSED
    cur_rec, DATE_COMPLETED
    cur_rec, DATE_REQUESTED
    cur_rec, DATE_RESPONDED
    cur_rec, DATE_RESPONSE_ECD
    cur_rec, DATE_SCHEDULED
    cur_rec, DEFERRAL_REASON
    cur_rec, DESCRIPTION
    cur_rec, DEVELOPMENT OF THE YOUNG CHILD
    cur_rec, FACILITY_MANAGER
    cur_rec, FLOOR
    cur_rec, GENERAL_LEDGER
    cur_rec, KIOSK_DATE_REQUESTED
    cur_rec, KIOSK_DISPATCH_CONFIRMED
    cur_rec, KIOSK_DISPATCHED
    cur_rec, LINKED_EQUIPMENT_ALIAS
    cur_rec, LINKED_EQUIPMENT_ID
    cur_rec, LINKED_EQUIPMENT_NAME
    cur_rec, ORIGINATOR_TYPE
    cur_rec, PAYMENT_TERMS
    cur_rec, PRIORITY_CODE
    cur_rec, PROBLEM_TYPE
    cur_rec, PROPERTY
    cur_rec, QUOTE_TOTAL
    cur_rec, REGION
    cur_rec, REPAIR_DEFINITIONS
    cur_rec, MARKED_COR
    cur_rec, APPLICANT
    cur_rec, REQUESTOR_COST_CENTER
    cur_rec, REQUESTOR_EMAIL
    cur_rec, REQUESTOR_NAME
    cur_rec, REQUESTOR_PHONE
    cur_rec, RESPONSE_TIME
    cur_rec, ROOM
    cur_rec, SERVICE_PROVIDER
    cur_rec, SERVICE_PROVIDER_ADDRESS
    cur_rec, SERVICE_PROVIDER_CITY
    cur_rec, SERVICE_PROVIDER_CODE
    cur_rec, SERVICE_PROVIDER_COUNTRY
    cur_rec, SERVICE_PROVIDER_CURRENCY
    cur_rec, SERVICE_PROVIDER_DESCRIPTION
    cur_rec, SERV_PROV_DISPATC_HMETHOD
    cur_rec, SERV_PROV_DOUBLE_TIME_RATE
    cur_rec, SERVICE_PROVIDER_EMAIL
    cur_rec, SERV_PROV_EMERGENCY_PHONE
    cur_rec, SERVICE_PROVIDER_FAX_NUMBER
    cur_rec, SERVICE_PROVIDER_HOME_PHONE
    cur_rec, SERVICE_PROVIDER_HOURLY_RATE
    cur_rec, SERVICE_PROVIDER_JOB_TITLE
    cur_rec, SERVICE_PROVIDER_METHOD
    cur_rec, SERVICE_PROVIDER_MOBILE_PHONE
    cur_rec, SERVICE_PROVIDER_PAGER
    cur_rec, SERVICE_PROVIDER_RATES
    cur_rec, SER_PROV_SHIFT_DIFFERENTIAL
    cur_rec, SERV_PROV_STATE_PROVINCE
    cur_rec, SERVICE_PROVIDER_STATUS
    cur_rec, SERV_PROV_WEB_SITE_ADDRESS
    cur_rec, SERVICE_PROVIDER_WORK_PHONE
    cur_rec, SERV_PROV_ZIP_POSTAL_CODE
    cur_rec, UPDATE
    cur_rec SKILL.
    cur_rec, STATUS
    cur_rec subregion.
    cur_rec, TRADE
    cur_rec, VENDOR_ID
    cur_rec, VENDOR_PURCHASING_FAX
    cur_rec, VENDOR_SITECODE
    cur_rec, VENDOR_TICKET
    cur_rec, VENDOR_COMPANYNAME
    cur_rec, VIP
    cur_rec, WORK_ORDER_NO
    cur_rec, WORK_REQUEST
    cur_rec, WORK_REQUEST_CLASS
    cur_rec, WORK_TYPE
    cur_rec, WR_COST
    cur_rec, WR_DESCRIPTION
    cur_rec, WR_DISPATCH_METHOD
    cur_rec, WR_STATUS
    cur_rec, COUNTRY
    ld_curr_time
    );
    END LOOP;

    COMMIT;

    exception
    while others then
    Rollback;
    dbms_output.put_line('SQLCODE:'||) SQLCODE. "Error :'|| SQLERRM);

    end work_kiosk_full;

    Note: total record inserted 849000.

    The same code does not work with big collect in would adopt.

    Please help me why this is happening.


    Thanks and greetings
    Shyam ~.

    Shyam,

    I agree with Billy.

    Why are you not using an INSERT..SELECT ?
    
    Also, what are you trying to achieve by
    - incremental commits?
    - copying data from one table to another (using expensive I/O)?
    - using dynamic DML?
    
    Most of these approaches are typically wrong - and not recommended for scalable and performant Oracle applications.
    

    I could see you using a CURSOR for LOOP if you change the data inserted so that you could not encapsulate the changes in a query, but you do an insert in right in the table of your cursor. A much more effective way would be to use the following changes I made to your code sample:

    PROCEDURE WORK_KIOSK_FULL(AN_JOBID   IN NUMBER,
                              AC_SQLCODE OUT VARCHAR2,
                              AC_SQLERRM OUT VARCHAR2) IS
    BEGIN
       EXECUTE IMMEDIATE 'truncate table crstools.drt_bom_work_kiosk';
    
       /* Note:  The APPEND hint forces a Direct Path INSERT (see Link below code sample) and is combined with the NOLOGGING Hint */
       /*        To dramtically increase performance.  The Direct Path INSERT inserts records above the High-Water Mark on the table. */
    
       INSERT /*+ APPEND NOLOGGING */ INTO CRSTOOLS.DRT_BOM_WORK_KIOSK
          (JT_ID
          ,ACTUAL_HRS_TO_COMPLETE
          ,ACTUAL_HRS_TO_RESPOND
          ,AGENT_NAME
          ,ASAGENT_SOE_ID
          ,AP_SYSTEM
    --      ,ASSIGN_WORK_REQUEST_COMMENT     /* I commented out this COLUMN because it doesn't make sense to me to insert */
          ,BILLABLE                          /* a couple of space characters into a table.   If the intent is to leave the column NULL */
          ,BUILDING                          /* don't include it in your INSERT statement and it will be NULL.  If there is a valid reason */
          ,BUILDING_ID                       /* for inserting the spaces, then remove the "line comments" from the insert and select statments */
          ,BUILDING_STATUS
          ,CAUSE_TYPE
    --      ,COMMENTS
          ,COMPLETED_BY
          ,CONTACT_EMAIL
          ,CONTACT_NAME
          ,CONTACT_PHONE
          ,CORP_CODE
          ,COST_CENTER
          ,DATE_CLOSED
          ,DATE_COMPLETED
          ,DATE_REQUESTED
          ,DATE_RESPONDED
          ,DATE_RESPONSE_ECD
          ,DATE_SCHEDULED
          ,DEFERRAL_REASON
          ,DESCRIPTION
          ,ECD
          ,FACILITY_MANAGER
          ,FLOOR
          ,GENERAL_LEDGER
    --      ,KIOSK_DATE_REQUESTED
    --      ,KIOSK_DISPATCH_CONFIRMED
    --      ,KIOSK_DISPATCHED
          ,LINKED_EQUIPMENT_ALIAS
          ,LINKED_EQUIPMENT_ID
          ,LINKED_EQUIPMENT_NAME
          ,ORIGINATOR_TYPE
    --      ,PAYMENT_TERMS
          ,PRIORITY_CODE
          ,PROBLEM_TYPE
          ,PROPERTY
          ,QUOTE_TOTAL
          ,REGION
          ,REPAIR_DEFINITIONS
          ,REPAIR_DESCRIPTION
          ,REQUESTOR
    --      ,REQUESTOR_COST_CENTER
          ,REQUESTOR_EMAIL
          ,REQUESTOR_NAME
          ,REQUESTOR_PHONE
    --      ,RESPONSE_TIME
          ,ROOM
          ,SERVICE_PROVIDER
          ,SERVICE_PROVIDER_ADDRESS
          ,SERVICE_PROVIDER_CITY
          ,SERVICE_PROVIDER_CODE
          ,SERVICE_PROVIDER_COUNTRY
          ,SERVICE_PROVIDER_CURRENCY
          ,SERVICE_PROVIDER_DESCRIPTION
          ,SERV_PROV_DISPATC_HMETHOD
          ,SERV_PROV_DOUBLE_TIME_RATE
          ,SERVICE_PROVIDER_EMAIL
          ,SERV_PROV_EMERGENCY_PHONE
          ,SERVICE_PROVIDER_FAX_NUMBER
          ,SERVICE_PROVIDER_HOME_PHONE
          ,SERVICE_PROVIDER_HOURLY_RATE
          ,SERVICE_PROVIDER_JOB_TITLE
          ,SERVICE_PROVIDER_METHOD
          ,SERVICE_PROVIDER_MOBILE_PHONE
          ,SERVICE_PROVIDER_PAGER
          ,SERVICE_PROVIDER_RATES
          ,SER_PROV_SHIFT_DIFFERENTIAL
          ,SERV_PROV_STATE_PROVINCE
          ,SERVICE_PROVIDER_STATUS
          ,SERV_PROV_WEB_SITE_ADDRESS
          ,SERVICE_PROVIDER_WORK_PHONE
          ,SERV_PROV_ZIP_POSTAL_CODE
    --      ,SHIFT
    --      ,SKILL
          ,STATUS
          ,SUBREGION
    --      ,TRADE
          ,VENDOR_ID
          ,VENDOR_PURCHASING_FAX
          ,VENDOR_SITECODE
          ,VENDOR_TICKET
          ,VENDOR_COMPANYNAME
          ,VIP
          ,WORK_ORDER_NO
          ,WORK_REQUEST
          ,WORK_REQUEST_CLASS
          ,WORK_TYPE
    --      ,WR_COST
          ,WR_DESCRIPTION
    --      ,WR_DISPATCH_METHOD
          ,WR_STATUS
          ,COUNTRY
          ,CREATE_DATE
          )
       VALUES
          (SELECT DISTINCT
              JT.JT_ID AS JT_ID
             ,NVL((ROUND((JT_DATE_COMPLETED - JT_DATE_REQUESTED) * 24,2)),0) AS ACTUAL_HRS_TO_COMPLETE
             ,NVL((ROUND((JT_DATE_RESPONDED - JT_DATE_REQUESTED) * 24,2)),0) AS ACTUAL_HRS_TO_RESPOND
             ,PEO1.PEO_NAME AS AGENT_NAME
             ,PEO1.PEO_USER_NAME AS ASAGENT_SOE_ID
             ,LE.LGLENT_DESC AS AP_SYSTEM
    --         ,' ' AS ASSIGN_WORK_REQUEST_COMMENT
             ,DECODE(JT.JT_BILL_ID,138802,'CLIENT BILLABLE'
                                  ,138803,'CONTRACTED'
                                  ,138804,'INTERNAL BILLABLE',NULL,' ') AS BILLABLE
             ,BL.BLDG_NAME_CC AS BUILDING
             ,BL.BLDG_ID_LS AS BUILDING_ID
             ,DECODE(BL.BLDG_ACTIVE_CC, 'Y', 'ACTIVE', 'INACTIVE') AS BUILDING_STATUS
             ,DECODE(JT.JT_WRK_CAUSE_ID,141521,'STANDARD WEAR AND TEAR'
                                       ,141522,'NEGLIGENCE'
                                       ,141523,'ACCIDENTAL'
                                       ,141524,'MECHANICAL MALFUNCTION'
                                       ,141525,'OVERSIGHT'
                                       ,141526,'VANDAL'
                                       ,141527,'STANDARD'
                                       ,141528,'PROJECT WORK'
                                       ,6058229,'TEST',NULL,' ') AS CAUSE_TYPE
    --         ,' ' AS COMMENTS
             ,PEO3.PEO_NAME AS COMPLETED_BY
             ,JT.JT_REQUESTOR_EMAIL AS CONTACT_EMAIL
             ,JT.JT_REQUESTOR_NAME_FIRST || ' ' ||JT.JT_REQUESTOR_NAME_LAST AS CONTACT_NAME
             ,JT.JT_REQUESTOR_PHONE AS CONTACT_PHONE
             ,CC.CSTCTRCD_APCODE AS CORP_CODE
             ,CC.CSTCTRCD_CODE AS COST_CENTER
             ,JT.JT_DATE_CLOSED AS DATE_CLOSED
             ,JT.JT_DATE_COMPLETED AS DATE_COMPLETED
             ,JT.JT_DATE_REQUESTED AS DATE_REQUESTED
             ,JT.JT_DATE_RESPONDED AS DATE_RESPONDED
             ,JT.JT_DATE_RESPONSE_ECD AS DATE_RESPONSE_ECD
             ,JT.JT_DATE_SCHEDULED AS DATE_SCHEDULED
             ,DECODE(JT.JT_DEF_ID,139949,'WTG VENDOR RESPONSE'
                                 ,139950,'WAITING ON PARTS'
                                 ,139951,'LABOR AVAILABILITY'
                                 ,139952,'DEFERRED- HI PRI WORK'
                                 ,139953,'WTG APPROVAL'
                                 ,139954,'FUNDING REQUIRED'
                                 ,139955,'ACCESS DENIED'
                                 ,139956,'WTG MATERIAL',NULL,' ') AS DEFERRAL_REASON
             ,JT.JT_DESCRIPTION AS DESCRIPTION
             ,JT.JT_DATE_RESCHED_ECD AS ECD
             ,FMG.FACILITY_MANAGER AS FACILITY_MANAGER
             ,FL.FLOORS_TEXT AS FLOOR
             ,GL.GENLED_DESC AS GENERAL_LEDGER
    --         ,' ' AS KIOSK_DATE_REQUESTED
    --         ,' ' AS KIOSK_DISPATCH_CONFIRMED
    --         ,' ' AS KIOSK_DISPATCHED
             ,EQP.EQUIP_CUSTOMER_CODE AS LINKED_EQUIPMENT_ALIAS
             ,EQP.EQUIP_ID AS LINKED_EQUIPMENT_ID
             ,EQP.EQUIP_TEXT AS LINKED_EQUIPMENT_NAME
             ,DECODE(JT_ORIGINATOR_TYPE_ID,1000,'PROJECT MOVE REQUEST'
                                          ,138834,'CUSTOMER INITIATED CORRECTION'
                                          ,138835,'CUSTOMER INITIATED REQUEST'
                                          ,138836,'CORRECTIVE MAINTENANCE'
                                          ,138837,'CONFERENCE ROOM BOOKING'
                                          ,138838,'PROJECT INITIATED REQUEST'
                                          ,138839,'PLANNED PREVENTIVE MAINTENANCE'
                                          ,138840,'SELF INITATED REQUEST',NULL,' ') AS ORIGINATOR_TYPE
    --         ,' ' AS PAYMENT_TERMS
             ,PRIORITY_TEXT AS PRIORITY_CODE
             ,SWOTY.SWORKTYPE_TEXT AS PROBLEM_TYPE
             ,PROP.PROPERTY_NAME_CC AS PROPERTY
             ,JT.JT_COST_QUOTE_TOTAL AS QUOTE_TOTAL
             ,PAR.LEVELS_NAME AS REGION
             ,DECODE(JT.JT_REPDEF_ID,141534,'ADJUSTED SETTING'
                                    ,141535,'TRAINING FOR END'
                                    ,141536,'NEW REQUEST'
                                    ,141537,'NO REPAIR REQUIR'
                                    ,141538,'REPLACED PARTS'
                                    ,141539,'REPLACE EQUIPMEN'
                                    ,1000699,'NEW REQUEST',NULL,' ') AS REPAIR_DEFINITIONS
             ,JT.JT_REPAIRDESC AS REPAIR_DESCRIPTION
             ,JT.JT_REQUESTOR AS REQUESTOR
    --         ,' ' AS REQUESTOR_COST_CENTER
             ,JT.JT_REQUESTOR_EMAIL AS REQUESTOR_EMAIL
             ,JT.JT_REQUESTOR_NAME_FIRST AS REQUESTOR_NAME
             ,JT.JT_REQUESTOR_PHONE AS REQUESTOR_PHONE
    --         ,' ' AS RESPONSE_TIME
             ,RM.ROOM_NAME_CC AS ROOM
             ,P1.PEO_PROVIDER_CODE1 AS SERVICE_PROVIDER
             ,P1.PEO_ADDRESS_1 AS SERVICE_PROVIDER_ADDRESS
             ,PEOCITY.CITY_TEXT SERVICE_PROVIDER_CITY
             ,P1.PEO_PROVIDER_CODE1 AS SERVICE_PROVIDER_CODE
             ,PEOCITY.CITY_COUNTRY_NAME AS SERVICE_PROVIDER_COUNTRY
             ,PEOCUR.CURRENCY_TEXT AS SERVICE_PROVIDER_CURRENCY
             ,P1.PEO_NAME AS SERVICE_PROVIDER_DESCRIPTION
             ,P1.PEO_DISPATCH_METHOD AS SERV_PROV_DISPATC_HMETHOD
             ,P1.PEO_RATE_DOUBLE AS SERV_PROV_DOUBLE_TIME_RATE
             ,P1.PEO_EMAIL AS SERVICE_PROVIDER_EMAIL
             ,P1.PEO_EMERGENCY_PHONE AS SERV_PROV_EMERGENCY_PHONE
             ,P1.PEO_FAX AS SERVICE_PROVIDER_FAX_NUMBER
             ,P1.PEO_HOME_PHONE AS SERVICE_PROVIDER_HOME_PHONE
             ,P1.PEO_RATE_HOURLY AS SERVICE_PROVIDER_HOURLY_RATE
             ,P1.PEO_TITLE AS SERVICE_PROVIDER_JOB_TITLE
             ,P1.PEO_METHOD_ID AS SERVICE_PROVIDER_METHOD
             ,P1.PEO_CELL_PHONE AS SERVICE_PROVIDER_MOBILE_PHONE
             ,P1.PEO_PAGER AS SERVICE_PROVIDER_PAGER
             ,P1.PEO_RATE_DIFFERENTIAL AS SERVICE_PROVIDER_RATES
             ,P1.PEO_RATE_DIFFERENTIAL AS SER_PROV_SHIFT_DIFFERENTIAL
             ,PEOCITY.CITY_STATE_PROV_TEXT AS SERV_PROV_STATE_PROVINCE
             ,DECODE(P1.PEO_ACTIVE, 'Y', 'ACTIVE', 'INACTIVE') AS SERVICE_PROVIDER_STATUS
             ,P1.PEO_URL AS SERV_PROV_WEB_SITE_ADDRESS
             ,P1.PEO_PHONE AS SERVICE_PROVIDER_WORK_PHONE
             ,P1.PEO_POSTAL_CODE AS SERV_PROV_ZIP_POSTAL_CODE
    --         ,' ' AS SHIFT
    --         ,' ' AS SKILL
             ,DECODE(JT.JT_BIGSTATUS_ID,138813,'NEW'
                                       ,138814,'PENDING'
                                       ,138815,'OPEN'
                                       ,138816,'COMPLETED'
                                       ,138817,'CLOSED'
                                       ,138818,'CANCELLED',NULL,' ') AS STATUS
             ,LEV.LEVELS_NAME AS SUBREGION
    --         ,' ' AS TRADE
             ,P1.PEO_LS_INTERFACE_CODE1 AS VENDOR_ID
             ,P1.PEO_FAX AS VENDOR_PURCHASING_FAX
             ,P1.PEO_VENDOR_SITE_CODE AS VENDOR_SITECODE
             ,JT.JT_ID AS VENDOR_TICKET
             ,P1.PEO_NAME AS VENDOR_COMPANYNAME
             ,JT.JT_REQUESTOR_VIP AS VIP
             ,WO.WO_ID AS WORK_ORDER_NO
             ,JT.JT_ID AS WORK_REQUEST
             ,JT.JT_CLASS_ID AS WORK_REQUEST_CLASS
             ,WOTY.WORKTYPE_TEXT AS WORK_TYPE
    --         ,' ' AS WR_COST
             ,JT.JT_DESCRIPTION AS WR_DESCRIPTION
    --         ,' ' AS WR_DISPATCH_METHOD
             ,DECODE(JT.JT_BIGSTATUS_ID,138813,'NEW'
                                       ,138814,'PENDING'
                                       ,138815,'OPEN'
                                       ,138816,'COMPLETED'
                                       ,138817,'CLOSED'
                                       ,138818,'CANCELLED',NULL,' ') AS WR_STATUS
             ,CTRY.COUNTRY_NAME AS COUNTRY
             ,SYSDATE --LD_CURR_TIME
         FROM CITI.JOBTICKET JT,
              CITI.PROPERTY PROP,
              CITI.BLDG BL,
              CITI.BLDG_LEVELS BLDGLVL,
              CITI.LEVELS LEV,
              CITI.LEVELS PAR,
              (SELECT CRSTOOLS.STRAGG(PEO_NAME) FACILITY_MANAGER,
                      BLDGCON_BLDG_ID
                 FROM CITI.BLDG_CONTACTS, CITI.PEOPLE
                WHERE BLDGCON_PEO_ID = PEO_ID
                  AND BLDGCON_CONTYPE_ID IN (40181, 10142)
                GROUP BY BLDGCON_BLDG_ID) FMG,
              CITI.FLOORS FL,
              CITI.ROOM RM,
              CITI.GENERAL_LEDGER GL,
              CITI.LEGAL_ENTITY LE,
              CITI.COST_CENTER_CODES CC,
              CITI.EQUIPMENT EQP,
              CITI.WORKTYPE WOTY,
              CITI.SUBWORKTYPE SWOTY,
              CITI.WORK_ORDER WO,
              CITI.JT_WORKERS JTWO,
              CITI.PRIORITY,
              CITI.COUNTRY CTRY,
              CITI.PEOPLE P1,
              CITI.PEOPLE PEO3,
              CITI.PEOPLE PEO1,
              CITI.CITY PEOCITY,
              CITI.CURRENCY PEOCUR
        WHERE JT.JT_BLDG_ID = BL.BLDG_ID
          AND BL.BLDG_ID = BLDGLVL.BLDG_LEVELS_BLDG_ID
          AND BLDGLVL.BLDG_LEVELS_LEVELS_ID = LEV.LEVELS_ID
          AND LEV.LEVELS_PARENT = PAR.LEVELS_ID(+)
          AND PROP.PROPERTY_ID = BL.BLDG_PROPERTY_ID
          AND BL.BLDG_ACTIVE_LS = 'N'
          AND JT.JT_FLOORS_ID = FL.FLOORS_ID(+)
          AND JT.JT_ROOM_ID = RM.ROOM_ID(+)
          AND JT.JT_BLDG_ID = FMG.BLDGCON_BLDG_ID(+)
          AND JT.JT_GENLED_ID = GL.GENLED_ID(+)
          AND GL.GENLED_LGLENT_ID = LE.LGLENT_ID(+)
          AND JT.JT_CSTCTRCD_ID = CC.CSTCTRCD_ID(+)
          AND JT.JT_EQUIP_ID = EQP.EQUIP_ID(+)
          AND JT.JT_ID = JTWO.JTW_JT_ID(+)
          AND JT.JT_WORKTYPE_ID = WOTY.WORKTYPE_ID(+)
          AND JT.JT_SWORKTYPE_ID = SWOTY.SWORKTYPE_ID(+)
          AND JT.JT_WO_ID = WO.WO_ID
          AND JT.JT_PRIORITY_ID = PRIORITY_ID(+)
             --AND jt.jt_date_requested >= ADD_MONTHS (SYSDATE, -12)
          AND JT.JT_LAST_UPDATE >= ADD_MONTHS(LD_CURR_TIME, -12)
          AND BL.BLDG_COUNTRY_ID = CTRY.COUNTRY_ID
          AND JTWO.JTW_PEO_ID = P1.PEO_ID(+)
          AND P1.PEO_CITY_ID = PEOCITY.CITY_ID(+)
          AND JT.JT_COMPLETED_BY_PEO_ID = PEO3.PEO_ID(+)
          AND P1.PEO_RATE_CURRENCY_ID = PEOCUR.CURRENCY_ID(+)
          AND JT.JT_AGENT_PEO_ID = PEO1.PEO_ID(+)
          );
    
       COMMIT;
    
    EXCEPTION
       WHEN OTHERS THEN
          ROLLBACK;
          DBMS_OUTPUT.PUT_LINE('SQLCODE :' || SQLCODE || ' Error :' || SQLERRM);
    
    END WORK_KIOSK_FULL;
    

    Here is the link for infor the [Oracle Direct - Path INSERT | http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c21dlins.htm#10778].

    Also, if you are really wanting to use a CURSOR for LOOP COLLECTION in BULK, I suggest you read the article by Steven Feuerstein [PL/SQL practices: GEM VRAC | http://www.oracle.com/technology/oramag/oracle/08-mar/o28plsql.html].

    I hope this helps.
    Craig...

    If my response or response from another person was helpful, please mark accordingly

  • A HP Officejet H470wl will work with the MacBook Air

    A HP Officejet H470wl will work with the MacBook Air? The driver is still supported? I'll buy an Air.

    Hello..

    New Mac come with v10.11.x El Capitan pre installed.

    I checked for compatible drivers (software) for pinter them HP > http://support.hp.com/us-en/product/HP-Officejet-H470-Mobile-Printer-series/3434 453/model/3434454/document/c04510394 /

    Fact on the Mac, you would use Software Update to install the drivers according to the HP website.

    Printer and scanner software available for download for your Mac

Maybe you are looking for