Predefined VectorLayer do not return data

Hello world

I'm completely stumped. I'm trying to restore a theme preset using the HTML5 API of Oracle cards, and it is simply not appear as it is not all the data. I have a table defined as such, which traces the outline of a store manager:

STORE_FLOOR_DATA

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

NUMBER OF STOREID,

NUMBER OF FLOOR,

FUNCTION VARCHAR2 (50 BYTE),

GEOM SDO_GEOMETRY

Samples (note that I am using a 0-1.0 X / coordinate system, 0,0 in the bottom left of the blueprint and 1.1 top right.) I use-1 as an SRID:

STOREID FLOOR FEATURE GEOM

1 1 UP TO 5 SDO_GEOMETRY (2003, NULL, NULL, SDO_ELEM_INFO_ARRAY (1,1003,3), SDO_ORDINATE_ARRAY (0.25,0.25,0.5,0.5))

I've added an entry in USER_SDO_GEOM_METADATA and created a spatial index on geom

I've implemented my data source, in MapViewer and set the config as well:

< name map_data_source = "nosql".

jdbc_host = "localhost".

jdbc_sid = "orcl".

jdbc_port = "1521".

jdbc_user = "nosqluser".

jdbc_password = "ZoXpqdRt1hfmn/fISARJxgX2DXOQDn6r".

jdbc_mode = 'thin '.

number_of_mappers = '3 '.

allow_jdbc_theme_based_foi = 'true '.

Editable = "false".

/ >

< mds_config >

< name data_source = "nosql" >

< allow_predefined_themes > true < / allow_predefined_themes >

< allow_dynamic_themes > true < / allow_dynamic_themes >

allow <>

< subject > STORE_FLOOR_THEME < / theme >

< / allow >

< / data_source >

< name data_source = "nosql" >

< allow_predefined_themes > true < / allow_predefined_themes >

< allow_dynamic_themes > true < / allow_dynamic_themes >

< / data_source >

< / mds_config >

I then used mapbuilder to create the STORE_FLOOR_THEME theme, using the XML below:

<? XML version = "1.0" standalone = "yes"? >

< styling_rules >

< hidden_info >

< column field = "STOREID" name = "STOREID" / >

< column field = 'FLOOR' name = 'FLOOR' / >

< column field = "FEATURE" name = "FEATURE" / >

< / hidden_info >

< rule >

< has style = "L.STORE_LINE" > < / feature > ""

< / rule >

< / styling_rules >

The geometry column is, of course, the GEOM column.

When previewing the theme in mapbuilder, it seems, all the rectangles are drawn as expected.

I wrote a narrative view, and I've used the below some code to add the topic of the current map:

var storeplan = new OM.layer.VectorLayer ("storeplan",

{

def:

{

type: OM.layer.VectorLayer.TYPE_PREDEFINED,.

dataSource: "nosql"

Theme: "store_floor_theme."

URL: baseURL

loadOnDemand: false

}

});

Map1.addLayer (storeplan);

I dragged on the STOREID, FLOOR and FEATURE columns in the analysis criteria.

My problem is that the theme is not rendered in the view. When I look at firebug at the request of mapviewer, I see the following:

{"type": "FeatureCollection",}

"CollectionName": "store_floor_theme",

"srs":-1,.

'geodesics': false,

"attr_names": [],.

"attr_types": [],.

"Features":]

]}

Notice how, no data is retrieved in the theme (attr_names, attr_types, and features are all empty)? That is why it is not rendered, I guess. I have no active filter, and if I add a table view I see all rows returned as expected. For some reason, the theme itself thinks there is no geometry data to draw.

Can someone explain to me why this is happening? I would be very grateful.

Kind regards

Richard

Hi Renan,

Sorry for the delay in response, I've been away.

I managed to solve the problem in the end, it seems that he did not use-1 as an SRID, at the time when I changed it to something else like 8307, suddenly it worked. Since I am not a map of the world or making of distance calculations at the present time, it is not a major problem if viewing thinks that my clients are somewhere off the West coast of Africa. I need to understand what SRID in use thereafter however.

Tags: Fusion Middleware

Similar Questions

  • Between the operator on systimestamp do not return data

    create the table test_ts1 (timestamp);

    insert into test_ts1 values (systimestamp);

    insert into test_ts1 values (systimestamp-interval '1' time);

    commit;

    Select * from test_ts1 where one between systimestamp - interval '1' time and systimestamp;

    do not return data, could you please help? I would if necessary the param values.

    --

    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    PL/SQL Release 11.2.0.2.0 - Production

    "CORE 11.2.0.2.0 Production."

    AMT for Linux: Version 11.2.0.2.0 - Production

    NLSRTL Version 11.2.0.2.0 - Production

    Thank you

    Mahesh

    2 options.

    1 convert your datatype of the column of TIMESTAMP WITH time ZONE SCHEDULE

    SQL > create table test_ts1 (a timestamp with time zone);

    Table created.

    SQL > insert into test_ts1 values (systimestamp);

    1 line of creation.

    SQL > insert into test_ts1 values (systimestamp-interval '1' time);

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > select *.
    2 of test_ts1
    3 where one between systimestamp - interval '1' time and systimestamp;

    A
    ---------------------------------------------------------------------------
    MAY 19, 14 09.06.01.135799 AM - 04:00

    2 convert SYSTIMESTAMP TIMESTAMP.

    SQL > DROP TABLE TEST_TS1 IS SERVING;

    Deleted table.

    SQL > create table test_ts1 (timestamp);

    Table created.

    SQL > insert into test_ts1 values (systimestamp);

    1 line of creation.

    SQL > insert into test_ts1 values (systimestamp-interval '1' time);

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > select *.
    2 of test_ts1
    3 where one between systimestamp - interval '1' time and systimestamp;

    no selected line

    SQL > select *.
    2 of test_ts1
    3 where one between Mount (systimestamp timestamp) - interval '1' time and cast (systimestamp timestamp);

    A
    ---------------------------------------------------------------------------
    MAY 19, 14 09.04.09.132503 AM

  • Why between date is not return data for this query?

    Hello
    I have a table with this structure and I write this query to retrieve a few lines based on certain conditions, but this query returns no data. Can you please tell why?
    ID     DT
    
    003     11/8/2011
    002     10/8/2011
    001     9/8/2011
    And the execution of the query:
    SELECT * FROM TABLE_NAME WHERE DT BETWEEN TO_DATE('08/08/2011','dd/mm/yyyy') AND TO_DATE('12/08/2011','dd/mm/yyyy');
    Published by: starting August 13, 2011 07:10

    >

    >

    But what is the problem with that, why this date does not match when I'm providing the date format?

    What part don't you understand? You have not used TO_DATE when inserting data and default date format is dd/mm/yyyy, right? Same default date format is used if you are running:

    SELECT * FROM TABLE_NAME

    Original of your post States select returns above:

    ID     DT
    
    003     11/8/2011
    002     10/8/2011
    001     9/8/2011
    

    So the dates that you inserted are November 8, 2011, October 8, 2011-September 8, 2011. TO_DATE('08/08/2011','dd/mm/yyyy') is now August 8, 2011 and TO_DATE('12/08/2011','dd/mm/yyyy') is August 12, 2011. Then of course:

    SELECT * FROM TABLE_NAME WHERE DT BETWEEN TO_DATE('08/08/2011','dd/mm/yyyy') AND TO_DATE('12/08/2011','dd/mm/yyyy').

    will return all the lines. Bottome line - never write code that uses the implicit conversions date since your code becomes dependent on the NLS client settings and maybe working for a client and fail or produce erroneous results for other customers.

    SY.

  • apfg_ap_invoices does not return data @ R12

    Hello

    Anyone faced this problem? When you run select * apfg_ap_invoices on R12 Toad he get no data
    It is a display associated discoverer.

    Any idea?

    Thank you
    KP

    Hello
    Your suggestion makes sense, just do not overwrite the original code as this is not advisable. More than likely Oracle have some security on the view that is not applied to the underlying table.

    I would never rewrite one of the views of the Oracle. I would always use a new name prefixed by XX. In this way, this code will never be overwritten by Oracle.

    Best wishes
    Michael

  • CFCS in ColdFusion do not return data

    Ok. I was pulling my hair out on this for about two weeks. I have
    has generated a master page and a detail page using the ColdFusion
    Wizard creating applications in FB3 beta 2. (The following behavior also happens
    in FB2.01)

    The details of the page has nine comboboxes, five date fields, a text box,
    and a checkbox. When I select a master record of the data grid and
    Click the button Edit (or just double-click on the folder of the Master
    (grid), slightly more than half of the time only the information contained in the
    Comboboxes appears. All other fields are the default fields for a
    new record.

    I know that it is reading the data because the comboboxes are put to the
    correct selections for the selected folder. It seems to happen more
    often, when there are a lot of text in the text box.

    It's driving me crazy! And it's very frustrating for end users
    Anyone who test the app has seen this behavior before?

    I am running CF 8 Standard with the Update Rollup 1. The database is
    SQL 2005.

    TIA,
    Randy

    I solved this by rearranging some of the statements in the code. I don't think I would have had to do so because the code was generated by the Coldfusion application wizard, but I had to change anyway.

    I changed this code:

    public function set {key(key:Object):void}
    This ._key = key;
    getItem();
    }

    private function initComponent (): void {}
    this.detailObject = new DetailComplaint();
    this.referenceManager.infoIDLookup ();
    this.referenceManager.statIDLookup ();
    this.referenceManager.dispIDLookup ();
    this.referenceManager.ctIDLookup ();
    this.referenceManager.refIDLookup ();
    this.referenceManager.unitIDLookup ();
    this.referenceManager.resIDLookup ();
    this.referenceManager.iaIDLookup ();
    this.referenceManager.investIDLookup ();
    }

    to do this:

    public function set {key(key:Object):void}
    This ._key = key;
    }

    private function initComponent (): void {}
    this.detailObject = new DetailComplaint();
    this.referenceManager.infoIDLookup ();
    this.referenceManager.statIDLookup ();
    this.referenceManager.dispIDLookup ();
    this.referenceManager.ctIDLookup ();
    this.referenceManager.refIDLookup ();
    this.referenceManager.unitIDLookup ();
    this.referenceManager.resIDLookup ();
    this.referenceManager.iaIDLookup ();
    this.referenceManager.investIDLookup ();
    getItem();
    }

    Move the call to the initComponent() function getItem() resolved the problem of synchronization between making the items on display and retrieve the data from the remote object.

    ~ randy

  • Web service JSON data do not return does not

    I created an application with a test sample local (active forlder) json file called "contacts.json" as below, just to test if I have any return data. The data returned in a listview without problem.

    [{ "id":1, "firstname": "Mike", "lastname": "Chepesky", "title": "Sr. Editor",
      "image": "images/data/mike_chepesky.png", "active": true, "gender": "m" },
    { "id":2, "firstname": "Westlee", "lastname": "Barichak", "title": "Talent Scout",
      "image": "images/data/westlee_barichak.png", "active": true, "gender": "m" }]
    

    I then changed the source for 'http://... '. "a link is valid and I checked, and it returns the data in a classic web browser (firefox). But he won't be in my application.

    What I noticed, is that the difference between the local json file and the return of web service, the web service does not return the square brackets "[...]" the json... I suspect that maybe that's the problem? If so, how do I manipulate the data source in my application to incorporate media? Is the returned data (without brackets) real...

    {"status":"successful","current_version":"1.1.1","latest_version":"1.2.0.0","details":"1. Item A 2. Item B 3. Item C","type":"Force update"}
    

    Thank you.

    If I'm not wrong, your local file json contains an array of objects, and that you load from your server contains a single object.
    If so, you can not call insertList (data), use insert (data)

  • On the forms send us and receive in return, data in the form of fields will be not print.  We can view the data, but the fields to print Virgin.  How can I fix it?

    On the forms send us and receive in return, data in the form of fields will be not print.  We can view the data, but the fields to print Virgin.  How can I fix it?

    OK, it's different. These text boxes are (at least engineering point of view) not considered form data, they are annotations (or markup). On your print dialogue box, you will see a group of "Comments & Form". Make sure that the first control is set to "Document and annotations:

    After this change, you should see the markup of your impressions.

  • IOM, API - getData() - no data is not returned by the user account

    Hi all

    I have a question for the AD account data. The problem is when I try to get the account data from any account (account status: enabled, the account Type: primary), the API GetData returns a blank card and I don't know why. I see this account in the accounts of the user to the IOM. This account has been created through reconciliation of AD and this account is only one (primary and active).

    In the test environment my code works very well, but production only.

    Here is part of my code where I get some details of account.

    ...

    accounts = provServ.getAccountsProvisionedToUser (take);

    Logger.Finest ("getUsersToTheLookupTask-> user Details - take:" + take + ", DisplayName:" + userDisplayName);

    Iterator it = accounts.iterator ();

    {while (IT.hasNext ())}

    Account ad_account = (Account) it.next ();

    If (ad_account.getAppInstance () .getApplicationInstanceName () .equalsIgnoreCase (appInstName) & & ad_account.getAccountType () .equals (Account.ACCOUNT_TYPE.) (Primary)) {}

    Logger.Finest ("getUsersToTheLookupTask-> AppInstance ApplicationInstanceName:" + ad_account.getAppInstance () .getApplicationInstanceName ());

    Logger.Finest ("getUsersToTheLookupTask-> AppInstance DisplayName:" + ad_account.getAppInstance () .getDisplayName ());

    Logger.Finest ("getUsersToTheLookupTask-> AccountDescriptiveField:" + ad_account.getAccountDescriptiveField ());

    Logger.Finest ("getUsersToTheLookupTask-> getAccountID:" + ad_account.getAccountID ());

    String UtilisateurDN = getADUserDN (appInstName, take);

    AccountData accountdata = ad_account.getAccountData ();

    Map < String, Object > accdata = accountdata.getData ();                         //THIS RETURN EMPTY map < String, Object >! And I don't know why!

    Logger.Finest ("--> account data:" + accdata);

    String userOrg = accdata.get("UD_ADUSER_ORGNAME").toString ();

    String userCN = accdata.get("UD_ADUSER_COMMONNAME").toString ();

    Logger.Finest ("-> CN an ORG:" + userOrg + "-" + userCN);

    userOrg = userOrg.substring (userOrg.indexOf ("OR ="));

    String UtilisateurDN = "CN =" + userCN + "," + userOrg;

    Logger.Finest ("getUsersToTheLookupTask-> pair key / value:" + UtilisateurDN + ":" + userDisplayName);

    userMap.put (UtilisateurDN, userDisplayName);

    }

    }

    ...

    You have an idea why I'm not able to get user account data?

    Thank you!

    Milan

    Fact.

    The following API does not return the AccountData in the AccountVO. Old API IOM at 11.1.2.0 in 11.1.2.1 IOM Yes.

    accounts = provServ.getAccountsProvisionedToUser (take);

    If you need obtain account data, use:

    Acccriteria SearchCriteria = new SearchCriteria (ProvisioningConstants.AccountSearchAttribute.APPINST_KEY.getId (), "*", SearchCriteria.Operator.EQUAL);

    accounts = provServ.getAccountsProvisionedToUser (take, acccriteria, null, true);

    ...

    AccountData accountdata = ad_account.getAccountData ();

    Card accdata = accountdata.getData ();

    GetData returns then map of attributes as I expected.

  • FDMEE check do not return report data

    Hi all,

    The audit report is not all data.  I've recreated the FDM FDMEE classic validation rule in the section monitoring rule group.  He must give me the same results as the classical FDM, but it's not.  I don't see that the value for all to 0 lines.

    Thanks for your help.

    Daniel

    We found the error, in FDMEE, he needed more dimension in the POV in the classical FDM.   For example, I had to add the motto of the entity and for a YEAR.

    It's working now,

    Thanks to you all

    Daniel

  • % ROWCOUNT SQL does not return the expected result

    I have the following function within a package:

    --Update APPERY_JTI_deleted_USERS table:
    FUNCTION fn_updt_app_jti_dlt_usr(
        p_update_co      IN VARCHAR2,
        p_appery_user_id IN APPERY_JTI_deleted_USERS.appery_user_id%TYPE,
        p_outlet_code    IN APPERY_JTI_deleted_USERS.outlet_code%TYPE)
      RETURN NUMBER
    AS
    lv_sql       VARCHAR2(4000);
    lv_rowcount  NUMBER := 0;
    BEGIN
    
    lv_sql := 'UPDATE APPERY_JTI_deleted_USERS SET '||p_update_co||' = 1 WHERE '||p_update_co||' = 0 AND OUTLET_CODE = '''||p_outlet_code||''' AND APPERY_USER_ID = '''||p_appery_user_id||'''';
    
    --EXECUTE IMMEDIATE lv_sql;
    EXECUTE IMMEDIATE 'BEGIN ' || lv_sql || '; :z := sql%rowcount; END; ' USING OUT lv_rowcount ;
    
    RETURN lv_rowcount;
      
    EXCEPTION
    WHEN OTHERS THEN
      RETURN -1;  
    END fn_updt_app_jti_dlt_usr;
    
    

    The function called several times as part of a job. Basically, the main function (Say M), call a few functions (for example A1... A9). Each of these functions is to do something and updated the application using the above function. Therefore, each of the nine functions will call the above function with different parameters.

    The problem that I am facing is:

    First run, invoke only first of all for the above function will return the positive result ($sql rowcount > 0). When I run M the second time, only first and second calls for the above function will be to return positive results and so on.

    How odd, it's that if I change the values again and run a function M, it will start from the beginning. And what strange more, the dynamic update statement is executed correctly and data are updated successfully. It's just sql rowcount % do not return is not the expected results.

    I tried to run execute immediately without (begin, end). I also tried to run it without HELP ON. It's always the same. I'm really confused, what Miss me here.

    I don't know if this is relevant. But for what it's worth, invoking the function above updates the SAME lines in the table appery_jti_deleted_users that the columns are different. So for all the work, the same lines need to be updated. Each function (A1... A9) will call the above function to update a different column of these lines.

    If you REALLY want to help you having US SHOW, not tell us:

    1. WHAT you do

    2. HOW to

    3. WHAT results you get

    4. WHAT results you expect to get

    First run, invoke only first of all for the above function will return the positive result ($sql rowcount > 0). When I run M the second time, only first and second calls for the above function will be to return positive results and so on.

    How odd, it's that if I change the values again and run a function M, it will start from the beginning. And what strange more, the dynamic update statement is executed correctly and data are updated successfully. It's just sql rowcount % do not return is not the expected results.

    Perhaps that the foregoing is true and maybe he's not. We have NO WAY of knowing because you don't SHOW US anything.

    I tried to run execute immediately without (begin, end). I also tried to run it without HELP ON. It's always the same.

    Yet once you showed us NOTHING >

    You do NOT FOLLOW best practices when you use dynamic sql statements: the sql statement real so that you can print:

    1 SEE what's running - make sure there are no syntax errors, and it seems to be what you wanted

    2 EXECUTE/TEST manually - to see if he really runs without error and see what results it really give.

    3. FIX any syntax or other problems and retest it

    Instrument properly your code and you won't have the problems you are having.

    You should know by now what are the parameters are transmitted when you run the function. So, there are at least three sets of these parameters.

    So you should be able to:

    1 run the instrumented manually function three times

    2. see that all three SQL statements are

    3 manually run these instructions

    4. see that the number of lines is after each execution

    We have no idea of what the output of the function is every time you call it. Apparently, you have, if you save the results of the function somewhere, but you didn't post any of this info.

    We need real details to help you - just listen to your story is not enough.

  • Data tab returns data differently in different instances of SQL Developer

    On my instance of SQL Developer, when I click on the data tab, the data is returned immediately via a select * table query, but on one of the machines of my developer, when she clicks on the data tab, Developer SQL executes a select query * table... order in...

    The column it is order by is NOT indexed and the query takes a long time to return data.   We cannot understand where SQL Developer's store this particular query and associating it with the data on its instance SQL Developer tab.

    Anyone can shed some light?

    Right click on the grid, and then select "remove persisted settings...". »

  • Procedure do not return my exception

    Hello

    I try to my test procedure, but it is not returning my exception.

    My procedure:

    Header 1

    create or replace PACKAGE BODY PKG_UNIDADE_EMP_ODS

    AS

    PROCEDURE BUSCAR_UNIDADES)

    VI_COD_EMPRESA IN UNIDADE.ID_INSTITUICAO%TYPE,

    VO_DADOSUNIDADE ON TP_EMPREGABILIDADE_UNI_ODS. TC_DADOSUNIDADE,

    VO_CDERROR NUMBER,

    VO_DSERROR OUT VARCHAR2

    )

    IS

    BEGIN

    VO_CDERROR: = 0;

    VO_DSERROR: = 'success ';

    IF (VI_COD_EMPRESA IS NOT NULL AND LENGTH (VI_COD_EMPRESA) > 1) THEN

    OPEN FOR VO_DADOSUNIDADE

    SELECT

    A SEPARATE. CD_UNIDADE AS CD_UNIDADE,

    UNITED NATIONS. NM_UNIDADE AS NM_UNIDADE,

    UNITED NATIONS. DS_UNIDADE AS DS_UNIDADE,

    UNITED NATIONS. UNIDADE_PORTAL AS UNIDADE_PORTAL

    OF UNIDADE UN

    INNER JOIN INSTITUIÇÃO INS ON (UN.ID_INSTITUICAO = INS.ID_INSTITUICAO)

    WHERE UN.ID_INSTITUICAO = DECODE (VI_COD_EMPRESA, NULL, UN.ID_INSTITUICAO), VI_COD_EMPRESA;

    END IF;

    IF (VI_COD_EMPRESA IS NOTHING) THEN

    OPEN FOR VO_DADOSUNIDADE

    SELECT

    A SEPARATE. CD_UNIDADE AS CD_UNIDADE,

    UNITED NATIONS. NM_UNIDADE AS NM_UNIDADE,

    UNITED NATIONS. DS_UNIDADE AS DS_UNIDADE,

    UNITED NATIONS. UNIDADE_PORTAL AS UNIDADE_PORTAL

    OF UNIDADE UNITED NATIONS;

    END IF;

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    VO_CDERROR: = 2;

    VO_DSERROR: = "no record not found";

    WHILE OTHERS THEN

    VO_CDERROR: = 999;

    VO_DSERROR: = 'unknown error ' | SQLERRM;

    END BUSCAR_UNIDADES;

    END PKG_UNIDADE_EMP_ODS;

    But when I put the parameter that do not exist in the database, do not return my exception:

    VO_CDERRO = 2

    VO_DSERRO = No records were found

    Can someone help me

    Opening of a ref cursor will never give an exception no_data_found. If you want to know that there is no data in the ref cursor, you will need to pick up. But if you look in the procedure as the row won't be available for the application. If you need to know if the cursor has all the data without pick up you will need to do something like this:

    create or replace PACKAGE BODY PKG_UNIDADE_EMP_ODS

    AS

    PROCEDURE BUSCAR_UNIDADES)

    VI_COD_EMPRESA IN UNIDADE.ID_INSTITUICAO%TYPE,

    VO_DADOSUNIDADE ON TP_EMPREGABILIDADE_UNI_ODS. TC_DADOSUNIDADE,

    VO_CDERROR NUMBER,

    VO_DSERROR OUT VARCHAR2

    )

    IS

    v_count pls_integer;

    BEGIN

    VO_CDERROR: = 0;

    VO_DSERROR: = 'success ';

    IF (VI_COD_EMPRESA IS NOT NULL AND LENGTH (VI_COD_EMPRESA) > 1) THEN

    OPEN FOR VO_DADOSUNIDADE

    SELECT

    A SEPARATE. CD_UNIDADE AS CD_UNIDADE,

    UNITED NATIONS. NM_UNIDADE AS NM_UNIDADE,

    UNITED NATIONS. DS_UNIDADE AS DS_UNIDADE,

    UNITED NATIONS. UNIDADE_PORTAL AS UNIDADE_PORTAL

    OF UNIDADE UN

    INNER JOIN INSTITUIÇÃO INS ON (UN.ID_INSTITUICAO = INS.ID_INSTITUICAO)

    WHERE UN.ID_INSTITUICAO = DECODE (VI_COD_EMPRESA, NULL, UN.ID_INSTITUICAO), VI_COD_EMPRESA;

    Select count (*) from v_count

    OF UNIDADE UN

    INNER JOIN INSTITUIÇÃO INS ON (UN.ID_INSTITUICAO = INS.ID_INSTITUICAO)

    WHERE UN.ID_INSTITUICAO = DECODE (VI_COD_EMPRESA, NULL, UN.ID_INSTITUICAO), VI_COD_EMPRESA;

    END IF;

    IF (VI_COD_EMPRESA IS NOTHING) THEN

    OPEN FOR VO_DADOSUNIDADE

    SELECT

    A SEPARATE. CD_UNIDADE AS CD_UNIDADE,

    UNITED NATIONS. NM_UNIDADE AS NM_UNIDADE,

    UNITED NATIONS. DS_UNIDADE AS DS_UNIDADE,

    UNITED NATIONS. UNIDADE_PORTAL AS UNIDADE_PORTAL

    OF UNIDADE UNITED NATIONS;

    Select count (*) from v_count

    OF UNIDADE.

    END IF;

    If v_count = 0 then

    vo_cderror: = 2;

    vo_dserror: not = "no record found where";

    end if;

    EXCEPTION

    WHILE OTHERS THEN

    VO_CDERROR: = 999;

    VO_DSERROR: = 'unknown error ' | SQLERRM;

    END BUSCAR_UNIDADES;

    END PKG_UNIDADE_EMP_ODS;

  • Channel number SELECT dataset not return

    Hi, I have a problem with the following code:

    PROCEDURE create_so (p_import_batch IN VARCHAR2) 
     IS
    
    
     v_import_batch VARCHAR2(1000);
      
     CURSOR sales_c (x_import_batch IN VARCHAR2)
     IS
     SELECT pbo.*
     ,      msib.inventory_item_id
     FROM XXMEL_PVS_BSH_ORDER pbo
     ,    mtl_system_items_b msib
     WHERE 1=1
     AND msib.segment1 = pbo.material
     AND msib.organization_id = 26
     AND  to_char(pbo.import_batch_id) IN ( x_import_batch);
    
     BEGIN
    
      select '('''||replace(p_import_batch,':',''',''')||''')' 
      INTO v_import_batch
      from dual;
       
      FOR sales_r IN sales_c (v_import_batch)
       LOOP
       
        raise_application_error(-20001,v_import_batch);--Program should raise this error as the cursor should return rows
    
      END LOOP;
    
    END;
    

    I'm passing in the procedure a 1:2:3 as a VARCHAR2 parameter.  The value should be passed as a VARCHAR2 because we use a part of the shuttle from one page of the APEX.

    I want to extract all records in the table of pbo which have an import_import_batch_id (which is a number data type) as v_import_batch who, at the minute ('1', ' 2', 3').

    The import_batch_id is a numeric field, so I got to to_char to try to work with the VARCHAR2 parameter I am by the way.

    The

     select '('''||replace(p_import_batch,':',''',''')||''')' 
      INTO v_import_batch
      from dual;
    
    

    code works well and is back ('1 ', '2', 3') which is what I want.  If I then run the select with this hard coded that value

    SELECT pbo.*
           ,msib.inventory_item_id
     FROM XXMEL_PVS_BSH_ORDER pbo
     ,    mtl_system_items_b msib
     WHERE 1=1
     AND msib.segment1 = pbo.material
     AND msib.organization_id = 26
     AND to_char(pbo.import_batch_id) IN ('1','2','3')
    

    It works OK and return lines that I expect returned.  If I try to use the variable rather than the hard-coded value, the SELECT statement does not return anything.

    Any advice would be great.

    Thank you

    Chris

    You must convert your of as '1 ', '2',' 3' can be considered to be 3 ranks.

    Try the following question

    SELECT pbo.*
           ,msib.inventory_item_id
     FROM XXMEL_PVS_BSH_ORDER pbo
     ,    mtl_system_items_b msib
     WHERE 1=1
     AND msib.segment1 = pbo.material
     AND msib.organization_id = 26
     AND to_char(pbo.import_batch_id) IN (
     select regexp_substr ( txt, '[^,]+', 1, level) data from (select '1,2,3' txt from dual) t CONNECT BY level <= length (txt) - length (replace (txt, ',')) + 1
     )
    
  • ctxrule - match does not return a result

    v.11.1.07 - I created a ctxrule index as described below. However, although a query must match on the given document, it does not return. Any ideas?
    begin
    ctx_ddl.create_preference('ot_lexer', 'basic_lexer');
    ctx_ddl.set_attribute('ot_lexer', 'index_stems', 'ENGLOSH');
    end;
     
    begin
    ctx_ddl.create_section_group('ot_sec_group', 'auto_section_group');
    end;
     
    create table ot_profile_test
    (profile_id number,
    query clob);
     
    create index ot_profile_rule_ndx on ot_profile_test(query)
    indextype is ctxsys.ctxrule parameters
    ('stoplist ctxsys.empty_stoplist
    section group ot_sec_group
    lexer ot_lexer');
     
    insert into ot_profile_test values(1, '($apple and $pear) and (1 within food)');
    commit;
     
    exec ctxsys.ctx_adm.set_parameter('log_directory', '/yourdir');
    exec ctx_output.start_log('ot');
    exec ctx_output.add_event(ctx_output.event_index_print_rowid);
    exec ctx_output.add_event(ctx_output.event_index_print_token);
    exec ctx_ddl.sync_index('ot_profile_rule_ndx', '2040M', null, 1, null, ctx_ddl.lock_nowait_error);
    exec ctx_output.end_log;
    Then, run a query:
    declare
    a clob := 'apple orange pears banana
    <metadata>
     <indicators>
       <food>1</food>
     </indicators>
    </metadata>
    ';
    vn_profile_id number;
     
    begin
     
    select profile_id into vn_profile_id
    from ot_profile_test
    where matches(query, a) > 0;
     
    dbms_output.put_line(vn_profile_id);
     
    end;
     
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 8
    Profile_id = 1 should not be returned?


    In addition, the log file should not have 2 lines written in $I?
    WRITING APPLE: ((PEAR) TOKEN = (PEARS)) * ((1) IN FOOD), 0
    WRITING APPLES: ((PEAR) TOKEN = (PEARS)) * ((1) IN FOOD), 0

    As noted earlier, you must use a list of words, not a lexer to control, like the two conflicts between them. All what you need to do is remove the following line from your code:

    ctx_ddl.set_attribute ('ot_lexer', 'index_stems', 'ENGLISH');

    You can still have a lexer with other attributes; Just do not set the attribute index_stems to the lexer. Set the attribute generator of forms derived from the list of words only.

  • sys_context procedure does not return an ip address

    Hello


    DB 11 GR 1 material

    What would be the reason for which this query does not return an IPAddress?

    Select sys_context ('userenv', 'IPAddress') of double;

    Thank you

    What would be the reason for which this query does not return an IPAddress?

    USERENV does not know what the IP # is.

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> select sys_context('userenv', 'ip_address') from dual;
    
    SYS_CONTEXT('USERENV','IP_ADDRESS')
    --------------------------------------------------------------------------------
    

    Maybe it's because you are connected locally & not via SQL * Net

    Published by: sb92075 on October 27, 2010 12:53

Maybe you are looking for

  • Qosmio G10-133: I have random crashes - graphic driver problem

    Hello the screen of my computer turns off randomly and I get the error message suggesting I mean I have the latest version of the graphics driver below. Uninstall the driver of Nividea of my machine which seems to fix the problem, but my graphics hav

  • WINDOW OF 8 AND LASER JET M1319F MFP

    CAN'T GET MY LASER JET M1319F MFP TO INSTALL WITH WINDOWS 8. PLEASE NOTIFY.

  • Ehshell.exe producing too much CPU, not even under WMC

    I've never run WMC (Windows Media Center), and again, I see this name in the Manager of tasks (ehshell.exe) and produced at least 45% + cpu and eating all my memory. My pc; Manufacturer: Micro-Star International Co., LTD.. Processor: Intel (r) Core (

  • custom 2015.2 export presets do not appear on 2015.3

    all my custom export presets to not wear on the upgrade.It didn't happen with previous updates.any ideas on where they are located and how to reinstall them? I have backups and time machine.Thank you!

  • LOV based on a transitional view object

    Hi allOur scenario is as below.We have two display objects of each with an attribute. First a (VO1) is based on the sql query and second view (VO2) object will fill up with pragmatism.We have the third view (VO3) object which has two transient attrib