Failed to get the results of a report from beep with a SQL with like ' %: Parameter.

Hello

I am trying to create a beep with sql like query report below:

Example:

Select usr_key from usr where usr_login like ' %: Parameter.

In above query parameter before the user.

The above query returns not all the results in the report.

If I hard top query below it returns the result-code:

Select usr_key from usr where usr_login like '% Test % '.

Please let me how can know we use % with a parameter in the NOSE?

Thank you

Hi I had the solution how to do this at RANDOM.

CONCAT function should be used for the same

Tags: Business Intelligence

Similar Questions

  • Failed to get the result set for Get_Search_Results CRMI

    Hi all

    Face with the Null pointer exception while showing the result of the RIDC "GET_SEARCH_RESULTS" Server

    So I can't get the real result of the Content server

    Here is my code:

    ClientManager IdcClientManager = new IdcClientManager();
    Customer IdcClient = clientManager.createClient ("idc://kcsezapp01:4444"); ")
    UserContext IdcContext = new IdcContext ("weblogic", "welcome1");
    HdaBinderSerializer serializer = new HdaBinderSerializer ("UTF-8", client.getDataFactory ());

    If (!) () userContext is nothing))
    {
    DataBinder binding = client.createBinder ();
    binder.putLocal ("IdcService", "GET_SEARCH_RESULTS");
    binder.putLocal ("QueryText", "dDocAuthor < start > 'pra'");

    client.sendRequest (binder, userContext);
    serializer.serializeBinder (System.out, binding);
    System.out.println ("userContext is:" + userContext);
    System.out.println ("dataBinder is:" + linking);
    Resp ServiceResponse = client.sendRequest (userContext, binder);
    System.out.println ("the answer is:" + RESP);
    DataBinder serverBinder = resp.getResponseAsBinder ();
    serializer.serializeBinder (System.out, serverBinder);
    ResultSet DataResultSet = serverBinder.getResultSet("GET_SEARCH_RESULTS");
    for (DataObject dataObject: resultSet.getRows ())
    {
    System.out.println ("" Content ID: "+ dataObject.get ("dDocName") +"\t"+" review: ' "+ dataObject.get ("dRevLabel") +"\t"+" title of the content item: "+ dataObject.get ("dDocTitle")");
    System.out.println ("author is:" + dataObject.get ("dDocAuthor"));
    }
    }

    }

    Prashant_AP wrote:

                   ResultSet DataResultSet = serverBinder.getResultSet("GET_SEARCH_RESULTS");

    Shouldn't this read "resultSet DataResultSet = serverBinder.getResultSet("SearchResults");"?

  • Failed to get the result correctly

    Hello
    Im running flex server that connects via java to mysql database.
    Flex im running a java class that runs properly [I know because I create a file in this method and after execution of this flex application file is being created]. This method returns a list that is not empty.

    When I try to treat data like this:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" width = "100%" >

    < mx:RemoteObject id = "srv" destination = 'availability' fault = "handleFault (event)" / >

    < mx:Panel = "336,5" x = "10" width = "331" height = "200" layout = "absolute" title = 'see stocks' id = "panel1" >
    < mx:Form x = "10" y = "10" width = "291" height = "100" >
    < mx:FormItem label = "PostalCode" required = "true" >
    < mx:TextInput id = 'postal code' / >
    < / mx:FormItem >
    < / mx:Form >
    < mx:Button x = "10" y = "118" label = "check availability" width = "291" height = "32" click = "srv.checkAvailabilityForPostcode (postcode.text)" / >
    < / mx:Panel >
    < mx:DataGrid "336,5" = x y = "218" dataProvider = "{srv.checkAvailabilityForPostcode.lastResult}" width = "331" / > "
    < / mx:Application >

    I don't get all the data to the Datagrid control.

    When im doing this:
    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" width = "100%" >
    < mx:Script >
    <! [CDATA]
    Import mx.rpc.events.AbstractEvent;
    Import mx.rpc.events.ResultEvent;
    Import mx.rpc.events.FaultEvent;
    Import mx.controls.Alert;
    Import mx.rpc.remoting.RemoteObject;
    Import mx.utils.ArrayUtil;

    private void handleResult(event:ResultEvent):void {}
    products of the var: Array;
    products = new Array (ArrayUtil.toArray (event.result));
    Alert.Show(Products[0].) ToString());
    }

    private void handleFault(event:FaultEvent):void {}
    mx.controls.Alert.show (event.fault.faultString, "ERRRRROORR!");
    }

    []] >
    < / mx:Script >

    < mx:RemoteObject id = "srv" = 'availability' result = destination "handleResult (event)" fault = "handleFault (event)" / > "
    < mx:Panel = "336,5" x = "10" width = "331" height = "200" layout = "absolute" title = 'see stocks' id = "panel1" >
    < mx:Form x = "10" y = "10" width = "291" height = "100" >
    < mx:FormItem label = "PostalCode" required = "true" >
    < mx:TextInput id = 'postal code' / >
    < / mx:FormItem >
    < / mx:Form >
    < mx:Button x = "10" y = "118" label = "check availability" width = "291" height = "32" click = "srv.checkAvailabilityForPostcode (postcode.text)" / >
    < / mx:Panel >
    < mx:DataGrid "336,5" = x y = "218" dataProvider = "{srv.checkAvailabilityForPostcode.lastResult}" width = "331" / > "
    < / mx:Application >

    also, I don't get all the data in the dataGrid control, but in the handleResult I get three objects. What should I do to treat these data?

    I think you should do something like:

    products = event.result.toArray (); Perhaps FlexBuilder doesn't recognize the toArray() method but FlexBuilder doesn't bother you: P
    or
    products = event.result as Array;

    The problem is that you create a new table and passing another table, then you make a list of lists, an array of arrays
    products = new Array (ArrayUtil.toArray (event.result)); Creates a new array, which first element is another array

    And Yes, you need the equivalent ActionScript classes for your Java classes, I suggest you read the developer's Guide, there is a section called mapping Java Classes to ActionScript classes (something like that: P).

    Hope this helps you

  • [LV-&gt; TS] How to run a SEQ file, get the result (PASS/FAIL) and the report file?

    Hello

    I'm looking for the most obvious and simple, LabVIEW:

    1. start the motor Teststand: FACT

    2. get a list of SEQ files to run: FACT

    3 - loop through the list to run each file follows:<- found="" some="" examples="" but="" i="" have="" some="" trouble="" with="" the="" uimessage="">

    http://zone.NI.com/reference/en-XX/help/370052N-01/tsexamples/infotopics/executing_sequences_using_a...

    4. get the result of the execution of the SEQ:<->

    5 retrieve the XML + name of the generated report file path:<- obviously="" not="">

    http://digital.NI.com/public.nsf/allkb/3D3B2358DF9B786B8625789500549A3B

    http://forums.NI.com/T5/NI-TestStand/getting-report-file-path-location-at-execution-in-TestStand-201...

    Here's my current implementation:

    David Koch


  • Can't mount NFS share - operation failed, diagnostics report: failed to get the path console for volume

    I'm trying to mount a NFS on ESXI 6 volume, but continue to operate in the error.  Googling everything nothing helped, so I'm here. Error:

    Call "HostDatastoreSystem.CreateNasDatastore" of object "ha-datastoresystem" on ESXi '192.168.xx.xx' failed.

    Operation failed, the diagnostic report: failed to get the path of the console for the volume, the name of the sample.

    The NFS share is located on a synology nas. I checked the permissions and configuration. Everything seems correct based on the various boards and KB articles.

    Ideas?

    Thank you.

    Find the esx.conf file in/etc/vmware.

    If you could also share a copy with me...

    Try to mount the NFS VMware KB: Volume fails with the error: could not resolve the host name

    Check the link as well below.

    http://www.Bussink.ch/?p=1640

  • Get the result of the sequence by programming

    Hi all

    in my custom operator interface to save the event EndExecution callback to accomplish several final operation.

    What I can't do is to retrieve the result of the sequence ('Success' or 'Failure', exactly the one that is displayed in the default report under the voice "Result USE") using methods or properties API.

    I've tried Execution.ResultStatus property and the SequenceContext.SequenceFailed property, but none of them works.

    How can I get the result of the sequence?

    Thank you

    Process templates are already generating a Message from the user interface "TestingComplete" you can register an event reminder on.  It also transmits the result as part of the parameter string State.  The attached excerpt from LV show what the VI recall may contain to handle the event.  If you need to deal with other UI event codes you can wire the event directly number in the structure box for the 34 decimal 'TestingComplete' event code.

    P.S., the event is the same that Norbert has pointed out, event UIMessageEvent...

  • com.sun.messaging.jmq.admin.apps.broker.BrokerCmd failed to get the exit code of the child.

    I use D:\MessageQueue4_5\mq\bin\imqcmd.exe to get heads of JMS queues. In most of the facilities, I can retrieve the results without problem.

    At a single facility, however, I get an error when you try to run this command. Called with no arguments, it should display a list of available commands. But that's what I get instead:

    D:\utilities\imqChk > d:\MessageQueue4_5\mq\bin\imqcmd.exe

    Boot process failed.

    Could not run

    Java

    -cp

    d:\MessageQueue4_5\mq\lib\imqadmin.jar;

    d:\MessageQueue4_5\mq\lib\fscontext.jar

    -Dimq.home=d:\MessageQueue4_5\mq

    -Dimq.etchome=d:\MessageQueue4_5\mq\... \etc\mq

    com.sun.messaging.jmq.admin.apps.broker.BrokerCmd failed to get the exit code of the child.

    Other info:

    • Java is installed (version 1.7.0_17).
    • QBrowser using, I can sign in successfully and retrieve information from queue.
    • All of the named files and jar files are where they are supposed to be within the meaning of the doce above.

    I was not able to locate the source of the problem. Any ideas would be greatly appreciated.

    Thank you.

    I had this same problem and solved by editing the file \glassfish3\mq\etc\imqenv.conf manually by setting IMQ_DEFAULT_JAVAHOME as follows:

    IMQ_DEFAULT_JAVAHOME = / Files/Java/jdk1.7.0_45 program

    Note the orientation of the slash. It's on Windows, and when I used with Windows style slash escape sequence, it does not solve this problem only when I used the mangled Unix style done.

    Hope this helps,

    -Noah

  • Failed to get the status of printer/bizhub Konica Minolta C654e

    Failed to get the status of printer/bizhub Konica Minolta C654e

    Cannot print from my Mac.

    With the limited information you supplied I would check the configuration of the print queue. If you open information system (located under Applications > utilities), you will see a column on the left and if you select printers the right pane displays the print queue information. Note If you have multiple printers, you can select in the right upper pane to view its information in the bottom right pane. Can you copy this information and paste it here.

  • How to get the results of the UK instead of the default USA?

    I live in the United Kingdom and would like to be able to search for UK results. for example, Amazon UK results when I search a product, etc.
    with the option of a search in the world so I don't get the results I want

    To add plugins to search for sites such as Amazon.co.UK and Google.co.uk to Firefox, open this page in Firefox and then search or click the sites that interest you: http://mycroft.mozdev.org/

    When you click on one of the listed search plugins, Firefox will ask you if you want to install it.

    After that, you can open the Firefox Add-ons Manager and click on disable one of the search engine integrated you want to use.

  • How to get the result of the test of CVI DLLs in teststand!

    I write a driver dll to test a source, I want to get the tension of world SERVERS (the instrument of the RS) and I used to call DLLs that written by CVI, teststand

    My question is what is the best way I can get the result of the test and show the user to teststand. the code below is fair? When I used to call this dll document, teststand

    "" I just get the result by setting in TS.this is a good meathod, and what should you do in teststand, I put the "outputVoltageV" point to an object?

    /*===========================================================================*/
    / * Function: read voltage/current output * /.
    / * End: this function returns the output and actual output voltage * /.
    / * current instrument.                                      */
    /*===========================================================================*/
    ViStatus _VI_FUNC rsngsm_datReadOutput (ViSession instrSession,
    ViPReal64 outputVoltageV, ViPReal64 outputCurrentA, ViPBoolean statusPeakCurrent)
    {
    ViStatus rsngsm_status = VI_SUCCESS;
    Bruno buf [BUFFER_SIZE];
    ViInt32 retCnt;
       
    FMT (buf, "%s<>
    If ((rsngsm_status = viWrite (instrSession, buf, NumFmtdBytes (), & retCnt))<>
    Return rsngsm_status;
           
    If ((rsngsm_status = viRead (instrSession, buf, 50, & retCnt))<>
    Return rsngsm_status;
    If (Scan (buf, "%s > %f [p2];")) %f [p2]; %i [b2] ", outputVoltageV, outputCurrentA, statusPeakCurrent). = 3)
    Return rsngsm_status;
           
    Return rsngsm_status;
    }

    sean_tan,

    Yes, you just pass a value of digital TestStand (e.g.; locals.number).

    If you use the adapter of the ICB, it might make more sense that you can use the Flexible DLL adapter for this type of function, that you do not use the standard settings of tTestData and tTestError. While TestStand will correctly recognize the function prototype, you want to make sure you that include the type library of your function Panel (you will need to create one if you have not already done so) in settings target of LabWindows / CVI-> type library.

    I hope this helps.

    -Jack

  • Get the result of the procedure

    Hi all

    I have a procedure using storeb from the collection in an object of type as:

    create or replace type calc_type as object
    (
    field1 number,
    field2 number,
    field3 varchar2);
    
    create or replace type calc_table as table of calc_type;
    
    procedure make_calc_sched(v_id in number, v_user_id in varchar2) is 
    
    table_calc calc_table;
    begin
      select s.id, s.price, s.desc
      bulk collect into table_calc
      from tableA s
      inner join tableB d on d.id = s.id
      --.....
      
    end;
    

    How can I get the result of the procedure?

    procedure make_calc_sched(v_id in number, v_user_id in varchar2, v_table in out ????) is
    

    I plan to put up-to-date and inserts using the FORALL sentence.

    Can I use slider?  Maybe is a better way to do it.

    With the help of Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0

    Thank you

    I think I got it:

    procedure make_calc_sched(v_id in number, v_user_id in varchar2, v_table out calc_table) is 
    
    begin
      select calc_type(s.id, s.price, s.desc)
      bulk collect into v_table
      from tableA s
      inner join tableB d on d.id = s.id
      --.....
    
    end;
    

    I'll look to materialize views more later. Someone at - it examples?

    Best,

  • Need to get the result of the required format

    Hi all

    I'll have the data in a table below:

    IDNUM1num2
    1555555
    2123345
    3456567
    4666666

    IDNUM1num2
    1555555
    2123345
    3456567
    4666666

    and they need to get the result as below:. Help, please...

    IDNUM
    1555
    2123
    2345
    3456
    3567
    4666

    Thanks in advance...

    Hello

    So, instead of having 2 columns on 1 row, you want to have 1 column on 2 rows.  It's just that UNPIVOT:

    SELECT DISTINCT

    ID, num

    D

    UNPIVOT (num

    FOR the label IN (num1, num2)

    )

    ORDER BY id, num

    ;

    It is more effective than the UNION, because it requires only 1 pass through the table.

  • Taking a lot of time to get the result of the query

    Hi all

    The query below takes a long time for results

    select vs.task_name, count(*) fallout_count  from provco.view_stage_history vs
     where record_type in ('TASK')
      and task_name like 'Op-%'
      and vs.line_of_business = 'OPTIONLESS'
    --  and vs.task_due_date > ((sysdate - 146)) and vs.task_due_date is not null
    --  and vs.order_due_date > ((sysdate - 146)) and vs.order_due_date is not null
      and vs.fallout_date > ((sysdate - 146)) and vs.fallout_date is not null
    --  and vs.assignment_date > ((sysdate - 146)) and vs.assignment_date is not null
    --  and upper(vs.install_country_code) like 'US%'
      and vs.ban is not null
    --  and vs.task_name not in ('ASR-Assignment', 'SOR-Assignment')
      group by vs.task_name order by fallout_count desc;
    

    Its takes an hour to get the result. You will find the description of the table and the index below

    CREATE TABLE "PROVCO"."VIEW_STAGE_HISTORY" 
       ( "TASK_ID" NUMBER NOT NULL ENABLE, 
      "ASSIGNMENT_DATE" TIMESTAMP (6) NOT NULL ENABLE, 
      "LINE_OF_BUSINESS" VARCHAR2(30 BYTE) NOT NULL ENABLE, 
      "ORDER_ID" NUMBER NOT NULL ENABLE, 
      "ORDER_NUMBER" VARCHAR2(128 BYTE) NOT NULL ENABLE, 
      "ORDER_VERSION" VARCHAR2(15 BYTE) NOT NULL ENABLE, 
      "ORDER_TYPE" VARCHAR2(25 BYTE), 
      "TASK_NAME" VARCHAR2(60 BYTE) NOT NULL ENABLE, 
      "FALLOUT_DATE" TIMESTAMP (6), 
      "JEOP_CODE" VARCHAR2(64 BYTE), 
      "ERROR_CODE" VARCHAR2(64 BYTE), 
      "ERROR_DESC" VARCHAR2(1000 BYTE), 
      "WORKGROUP" VARCHAR2(30 BYTE), 
      "WORKPOOL" VARCHAR2(50 BYTE), 
      "USER_ID" VARCHAR2(32 BYTE), 
      "RECORD_TYPE" VARCHAR2(40 BYTE) NOT NULL ENABLE, 
      "ASSIGNMENT_TYPE" VARCHAR2(40 BYTE), 
      "ORDER_DUE_DATE" TIMESTAMP (6), 
      "COMMIT_DATE" TIMESTAMP (6), 
      "TASK_DUE_DATE" TIMESTAMP (6), 
      "SEED" VARCHAR2(255 BYTE), 
      "BAN" VARCHAR2(100 BYTE), 
      "ORDER_STATUS" VARCHAR2(64 BYTE), 
      "PROJECT_ID" VARCHAR2(20 BYTE), 
      "CUSTOMER_NAME" VARCHAR2(128 BYTE), 
      "CIRCUIT_ID" VARCHAR2(53 BYTE), 
      "SENSITIVITY_LVL" VARCHAR2(10 BYTE), 
      "BANDWIDTH" VARCHAR2(8 BYTE), 
      "WORK_STEP" NUMBER, 
      "MARKETING_APPROVAL_DATE" TIMESTAMP (6), 
      "INSERTED" TIMESTAMP (6), 
      "UPDATED" TIMESTAMP (6), 
      "INSTALL_COUNTRY_CODE" VARCHAR2(3 BYTE), 
      "SOLD_COUNTRY_CODE" VARCHAR2(3 BYTE), 
      "UPSTREAM_ORDER_NUMBER" VARCHAR2(15 BYTE), 
      "SAR_ID" VARCHAR2(15 BYTE), 
      "DUE_DATE_TYPE" VARCHAR2(4 BYTE), 
      "HOTCUT_IND" VARCHAR2(3 BYTE), 
      "MARKET_SEGMENT" VARCHAR2(50 BYTE), 
      "CNTL_TERM" VARCHAR2(25 BYTE), 
      "SVC_ORD_TYPE" VARCHAR2(40 BYTE), 
      "BLENDED_IND" VARCHAR2(1 BYTE), 
      "RELATED_ORDERS" VARCHAR2(100 BYTE), 
      "TERM_ID" VARCHAR2(20 BYTE), 
      "SUB_SVC_ORD_TYPE" VARCHAR2(40 BYTE), 
      "LAST_TASK_NAME" VARCHAR2(40 BYTE), 
      "PRE_OA_STATUS" VARCHAR2(40 BYTE), 
      "TSP_CODE" VARCHAR2(12 BYTE), 
      "ORDER_CATEGORY" NUMBER, 
      "CHANGE_CATEGORY" NUMBER, 
      "COUNTRY_CODE" VARCHAR2(2 BYTE), 
      "RESELLER_ID" VARCHAR2(19 BYTE), 
      "STATUS_CODE" VARCHAR2(32 BYTE), 
      "STATUS_CATEGORY" VARCHAR2(32 BYTE), 
      "PROVISIONING_LOCATION" VARCHAR2(32 BYTE), 
      "INSTALLED_LOCATION" VARCHAR2(32 BYTE), 
      "DATE_ORDERED" TIMESTAMP (6), 
      "CUSTOMER_NAME_ABBR" VARCHAR2(8 BYTE), 
      "CPE_IND" VARCHAR2(1 BYTE), 
      "CUSTOMER_PON" VARCHAR2(20 BYTE), 
      "PRODUCT_ID" VARCHAR2(20 BYTE), 
      "ASR_PON" VARCHAR2(16 BYTE), 
      "ASR_PON_VER" VARCHAR2(3 BYTE), 
      "ASR_TYPE" VARCHAR2(3 BYTE), 
      "ASR_TRAN_TYPE" VARCHAR2(1 BYTE), 
      "PARTNER_CARRIER_ID" VARCHAR2(8 BYTE), 
      "PREMISE_SEQUENCE_NUMBER" VARCHAR2(3 BYTE), 
      "EXPEDITE_IND" VARCHAR2(6 BYTE), 
      "ORDER_SOURCE" VARCHAR2(40 BYTE), 
      "SERVICE_REQ_ID" VARCHAR2(40 BYTE), 
      "SUB_ORDER_VALUE" VARCHAR2(50 BYTE), 
      "SUB_ORDER_TYPE" VARCHAR2(15 BYTE), 
      "PROV_OWNER" VARCHAR2(32 BYTE), 
      "TASC_OWNER" VARCHAR2(32 BYTE), 
      "DM_OWNER" VARCHAR2(32 BYTE), 
      "ORDNBR_TYPE" VARCHAR2(128 BYTE), 
      "WORK_ID" NUMBER, 
      "GARM_TYPE" VARCHAR2(50 BYTE), 
      "USER_TASK_DUE_DATE" TIMESTAMP (6), 
      CONSTRAINT "VIEW_STAGE_HISTORY_PKY" PRIMARY KEY ("TASK_ID", "ASSIGNMENT_DATE")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
      STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "TBS_PROVCO_IDX"  ENABLE, 
      SUPPLEMENTAL LOG GROUP "GGS_211360" ("TASK_ID", "ASSIGNMENT_DATE") ALWAYS
       ) SEGMENT CREATION IMMEDIATE 
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
     NOCOMPRESS LOGGING
      STORAGE(INITIAL 524288 NEXT 524288 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "TBS_PROVCO_DAT" ;
    
    
      CREATE INDEX "PROVCO"."VIEW_STAGE_HISTORY_IDX5" ON "PROVCO"."VIEW_STAGE_HISTORY" ("ORDER_NUMBER", "TASK_NAME") 
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
      STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "TBS_PROVCO_IDX" ;
    
    
      CREATE INDEX "PROVCO"."VSH_INSERTED_IDX" ON "PROVCO"."VIEW_STAGE_HISTORY" ("INSERTED") 
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
      STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "TBS_PROVCO_IDX" ;
    
    
      CREATE INDEX "PROVCO"."VSH_LOB_OT_ON_IDX" ON "PROVCO"."VIEW_STAGE_HISTORY" ("LINE_OF_BUSINESS", "ORDER_TYPE", "ORDER_NUMBER") 
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
      STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "TBS_PROVCO_IDX" ;
    
    
      CREATE INDEX "PROVCO"."VSH_LOB_TN_IDX" ON "PROVCO"."VIEW_STAGE_HISTORY" ("LINE_OF_BUSINESS", "TASK_NAME") 
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
      STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "TBS_PROVCO_IDX" ;
    

    Explain the plan of the query is

    SQL> explain plan for
      2  select vs.task_name, count(*) fallout_count  from provco.view_stage_history vs
     where record_type in ('TASK')
      3    4    and task_name like 'Op-%'
      5    and vs.line_of_business = 'OPTIONLESS'
      6  --  and vs.task_due_date > ((sysdate - 146)) and vs.task_due_date is not null
      7  --  and vs.order_due_date > ((sysdate - 146)) and vs.order_due_date is not null
      8    and vs.fallout_date > ((sysdate - 146)) and vs.fallout_date is not null
      9  --  and vs.assignment_date > ((sysdate - 146)) and vs.assignment_date is not null
     10  --  and upper(vs.install_country_code) like 'US%'
     11    and vs.ban is not null
    --  and vs.task_name not in ('ASR-Assignment', 'SOR-Assignment')
     12   13    group by vs.task_name order by fallout_count desc;
    
    
    Explained.
    
    
    SQL> select plan_table_output from table(dbms_xplan.display('plan_table',null,'typical cost bytes'));
    
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Plan hash value: 3788003769
    
    
    ------------------------------------------------------------------------------------------------------------
    | Id  | Operation                     | Name               | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    ------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT              |                    |   191 | 10505 |       |   136K  (1)| 00:27:24 |
    |   1 |  SORT ORDER BY                |                    |   191 | 10505 |  1536K|   136K  (1)| 00:27:24 |
    |   2 |   SORT GROUP BY NOSORT        |                    |   191 | 10505 |       |   136K  (1)| 00:27:24 |
    |*  3 |    TABLE ACCESS BY INDEX ROWID| VIEW_STAGE_HISTORY | 21528 |  1156K|       |   136K  (1)| 00:27:21 |
    |*  4 |     INDEX RANGE SCAN          | VSH_LOB_TN_IDX     |   229K|       |       |  1474   (1)| 00:00:18 |
    ------------------------------------------------------------------------------------------------------------
    
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
    
       3 - filter("VS"."BAN" IS NOT NULL AND "RECORD_TYPE"='TASK' AND "VS"."FALLOUT_DATE">SYSDATE@!-146)
       4 - access("VS"."LINE_OF_BUSINESS"='OPTIONLESS' AND "TASK_NAME" LIKE 'Op-%')
           filter("TASK_NAME" LIKE 'Op-%')
    
    
    18 rows selected.
    

    the view_stage_history table has 19504509

    Please let me know somehow that we can speed up the query above.

    Thank you

    Mani

    How much time does it take if you suggest a full table scan?

  • Get the result of the REST call to a workflow VCO

    Hello

    I need to call a workflow of the REST API, it works very well as long as I expect 'simple' outputs like numbers or strings.

    I want to get an array of strings, and when I get the result I get the following:

    (...), "none": [{"name": "ResultArray", "type": "Array/string", "scope": "LOCAL"}], "startedBy": (...)

    I see my table of results, but how do I access the values?

    The ugly method would return a string that represents the table with a separator, but I would like to avoid this method.

    Clues?

    Thanks in advance!

    If the output is valid in a valid JSON file (you can find viewers JSON / online editors) then a myObject = JSON.parse (outputString); will transform the JSON string into a javascript object.

    Then, you'll be able to get properties with IE:

    for each (var outputParameter of in myObject.outputParameters)

    {OutputParameter.name System.log}

    Note: this is pseudocode so that you get the idea. To know the structure of the object check it in a JSON Viewer.

  • I have run this query to get the result as below, but, even if my query is running fine, that I do not get the expected result.

    I'm looking for only column compare to my same target table as a table source.

    My query:


    Select case when column_name_s is null and column_name_t is not null

    then "alter table GRADE_CONVERSION drop | column_name_t | ';'

    When column_name_s is not null and column_name_t is null

    then "alter table GRADE_CONVERSION add | column_name_s | ' ' || data_type_s | « ; »

    else 'alter table modify GRADE_CONVERSION | column_name_t | ' ' || data_type_t | « ; »

    alterations of the end

    from (select s.column_name column_name_s, t.column_name column_name_t,

    s.data_type data_type_s, t.data_type data_type_t

    (select column_name, column_id, data_type

    of all_tab_cols@database

    where owner = 'erhan.

    and table_name = "GRADE_CONVERSION."

    + 1

    full outer join

    (select column_name, column_id, data_type

    of all_tab_cols@database

    where owner = 'sarigul.

    and table_name = "GRADE_CONVERSION."

    + 6

    on s.column_name = t.column_name

    )




    Tables:



    Target table: table GRADE_CONVERSION in sarigul@database


    LETTER_GRADEVARCHAR2 (2)
    GRADE_POINTNUMBER (3.2)
    MAX_GRADENUMBER (3)
    MIN_GRADENUMBER (3)




    Table source: Table GRADE_CONVERSION in erhan@database

    LETTER_GRADEVARCHAR2 (2)
    GRADE_POINTNUMBER (3.2)
    MAX_GRADENUMBER (3)
    MIN_GRADENUMBER (3)
    CREATED_BYVARCHAR2 (30)
    CREATED_DATEDATE
    MODIFIED_BYVARCHAR2 (30)
    MODIFIED_DATEDATE



    want to see output that is similar to this * (please ignore the names of column here it's just a clear example :))


    ALTER table Target_table change BOOK_ID Varchar2 (4);

    ALTER table Target_table I addSBN_10 Varchar2(13), null;

    ALTER table drop TITLE Target_table;

    Erhan_toronto wrote:

    1.I used src.nullable src_nullable and tgt.nullable tgt_nullable but only show Yes as below: but want to see the result as not null or null

    ALTER table TEST_TARGET change the NUMBER of MAX_GRADE (3, 2) Yes

    Ok. So it's all about the Yes and the no decoding to Default Null or Not Null, isn't it?

    So, to test, change one of the table of sample for NOT NULL columns in the source table, and then run the following query:

    with src as
    (
      select src.table_name src_table_name, src.column_name src_col_name, src.data_type src_data_type, src.data_length src_data_len, src.data_precision src_data_precision, src.data_scale src_data_scale,
             src.nullable src_nullable
        from user_tab_columns src
       where table_name = 'TEST_SOURCE'
    ),
    tgt as
    (
      select tgt.table_name tgt_table_name, tgt.column_name tgt_col_name, tgt.data_type tgt_data_type, tgt.data_length tgt_data_len, tgt.data_precision tgt_data_precision, tgt.data_scale tgt_data_scale,
             tgt.nullable tgt_nullable
        from user_tab_columns tgt
       where table_name = 'TEST_TARGET'
    ),
    col_details as
    (
      select src.src_table_name, nvl(tgt.tgt_table_name, first_value(tgt_table_name) over(order by tgt_table_name nulls last)) tgt_table_name,
             src.src_col_name, src.src_data_type, src.src_data_len, src.src_data_precision, src.src_data_scale, src.src_nullable,
             tgt.tgt_col_name, tgt.tgt_data_type, tgt.tgt_data_len, tgt.tgt_data_precision, tgt.tgt_data_scale, tgt.tgt_nullable
        from src
        left outer join tgt
          on (
              src.src_col_name = tgt.tgt_col_name
             )
    )
    select *
      from (
            select case
                    when tgt_data_type != src_data_type or tgt_data_len != src_data_len or tgt_data_precision != src_data_precision or tgt_data_scale != src_data_scale or src_nullable != tgt_nullable
                      then 'alter table ' || tgt_table_name || ' modify ' || tgt_col_name || ' ' || src_data_type || ' (' ||
                      case when src_data_type in ('DATE') then null
                           else
                                case
                                  when src_data_type in ('VARCHAR', 'VARCHAR2')
                                    then nvl(to_char(src_data_len), ' ') || ') '
                                  else  decode(nvl(src_data_precision, -1), -1, null, nvl(to_char(src_data_precision), ' ') || ', ' || nvl(to_char(src_data_scale), ' ') || ')')
                                end
                      end
                      || decode(src_nullable, 'NO', ' NOT NULL', ' DEFAULT NULL')
                    when tgt_col_name is null
                      then 'alter table ' || tgt_table_name || ' add ' || src_col_name || ' ' || src_data_type ||
                      case when src_data_type in ('DATE') then null
                           else
                                case
                                  when src_data_type in ('VARCHAR', 'VARCHAR2')
                                    then nvl(to_char(src_data_len), ' ') || ') '
                                  else  decode(nvl(src_data_precision, -1), -1, null, nvl(to_char(src_data_precision), ' ') || ', ' || nvl(to_char(src_data_scale), ' ') || ')')
                                end
                      end
                      || decode(src_nullable, 'NO', ' NOT NULL', ' DEFAULT NULL')
                   end alter_statement
              from col_details
            )
    where alter_statement is not null;
    

    Erhan_toronto wrote:

    2. when I run below under user sarigul and erhan I get the result as OWNER, TABLE_NAME, COLUMN_NAME DATA_TYPE... I have a link between two users. They have access to two tables.

    • Select * from all_tab_columns

    where owner = 'erhan' and table_name = "TEST_SOURCE."

    • Select * from all_tab_columns

    where owner = 'sarigul' and table_name = "TEST_TARGET."

    Alright. This means that you both users are on the same database. Only change, you will have to do in the above query is so change user_tab_columns to all_tab_columns and add the OWNER predicate respectively with the clause.

Maybe you are looking for