write a view with function in oracle

Hi all

I have a table named border, contains the borders of certain countries.

and then I did notice, for symmetric data, which means that if I have a folder {ch, OF} I {, ch}.

so I want another opinion, preferably with the help of functions, to show me that these results, the first view must be used, not the main table, to create this view.

en, 1

pl, 1

UK, 2

read, 2

read, 3

This means between these countries, we have these quantity of bordes, but we just want to see these up to 3 borders, not more.

Thanks for your reply.

IM using oracle 10 g and linux ubuntu 12.

First of all, I have a table illustrating the countries

{code}

-File created - Sunday-November-24-2013

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

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

-The DOF for Table BORDERS

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

CREATE TABLE 'borders' ('Country1' CHAR (2), 'countries2"TANK (2), the NUMBER of 'LENGTH')

INSERTION of REM in borders

TOGETHER TO DEFINE

Insert into borders (countries1, countries2, LENGTH) values ('from', 'fr', 381);

Insert into borders (countries1, countries2, LENGTH) values ('from', 'ch', 494);

Insert into borders (countries1, countries2, LENGTH) values ('from', 'pl', 148);

Insert in borders (countries1, countries2, LENGTH) values ('ch', 'fr', 608);

Insert in borders (countries1, countries2, LENGTH) values ('ch', 'it', 318);

Insert into borders (countries1, countries2, LENGTH) values ("ch", "li", 240);

Insert into borders (countries1, countries2, LENGTH) values ('he', 'if', 306);

Insert into borders (countries1, countries2, LENGTH) values ('he', 'DM', 584);

Insert into borders (countries1, countries2, LENGTH) values ('en', 'read', 549);

Insert into borders (countries1, countries2, LENGTH) values ('en', 'of', 1000);

Insert into borders (countries1, countries2, LENGTH) values ('pl', 'ru', 628);

Insert in borders (countries1, countries2, LENGTH) values ('pl', 'sk', 126);

Insert into borders (countries1, countries2, LENGTH) values ('UK', 'au', 1800);

{code}

and then I have a symmetrical data view:

{code}

SELECT B.COUNTRY1, B.COUNTRY2

BORDERS B

UNION

SELECT B.COUNTRY2, B.COUNTRY1

BORDERS B

{code}

Of course you can do it in a function. But why write a function where possible in SQL using the features of Oracle wrote to us ;-)

'min way' is the key here sentence. You said... for example, we do not want {en, 3, 1000}

Is it because that {en, a, 2} is already covering en-> of?

In, this case may be something like this... I am sure that other members may provide the most effective solution.

But please review these suggested solutions build further and learn SQL/capabilities in Oracle. After all, it's that you should maintain and build on this code. Play with this code and see what makes each step. You will be able to solve the problem that you encounter in yourself. Basically, it is the main objective of these forums.

> col A30 path format

> with t as)

Select the Country1, countries2, lvl level length, SYS_CONNECT_BY_PATH (countries2, ' /') 'Path' of borders

Start by Country1 = "of" connect by nocycle Country1 = countries2 prior)

t2 as)

Select t.*, min (lvl) on Pmin (partition by Country1, countries2) t where lvl<>

Select * from t2 where Pmin = lvl

Country1 countries2 LVL PMIN path LENGTH

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

ch       fr                2        608 /ch/fr                                  2

ch       it                2        318 /ch/it                                  2

ch       li                2        240 /ch/li                                  2

de       ch                1        494 /ch                                     1

de       fr                1        381 /fr                                     1

de       pl                1        148 /pl                                     1

fr       de                2       1000 /fr/de                                  2

fr       lu                2        549 /fr/lu                                  2

it       si                3        306 /ch/it/si                               3

it       sm                3        584 /ch/it/sm                               3

pl       ru                2        628 /pl/ru                                  2

pl       sk                2        126 /pl/sk                                  2

ru       ua                3       1800 /pl/ru/ua                               3

13 selected lines

Elapsed time: 00:00:00.018

I hope this helps.

VR,

Sudhakar

Tags: Database

Similar Questions

  • Hi, I'm developing a simple mobile app in DW CC 2015 using JQuery Mobile. LIKE I need the list view with description of the product, functionality and image, I would like to connect with database instead of "writing" all the tables in the bearings inside

    Hi, I'm developing a simple mobile app in DW CC 2015 using JQuery Mobile. LIKE I need the list view with description of the product, functionality and image, I would like to connect with database instead of "writing" all the tables in the bearings inside the Jquery page. In the future I would also be able to add, to remove the DB records. Any help, tutorial... Thanks TG

    I would like to connect with the database instead of "writing" all the tables in the bearings inside the Jquery page

    This is usually done with a CMS (content management system). There are commercial products CMS like WordPress, Joomla and perch. You create one or several layouts and then create pages of these page layouts using the CMS. In this way, it is possible to have hundreds of pages, each with unique content, but a page layout that can be managed in a place of sharing.

    CMSs on shelf don't require programming skills. Otherwise, some of us write our own CMS with custom functions, but this requires back-end, as with PHP programming.

  • View with a column that is derived from a function

    We can create a view with a column being filled using a pl/sql script, which uses 2 other columns on the same line as input?

    Example,
    Let's say I have a vision with

    Reg. Don't | Total | Customer account | Flag of billing. CodeFn
    $1234 45 2109 Y < value in this column would be what returns the expected script pl/sql, after using the Reg # (1234) and Total (45) as entries >
    $1236 15 2101 Y < input values would be 1236 & 15 >.

    Basically, I would like the script to generate a number that is returned in this column rather than do a simple Select stmt to extract columns from other tables/views.

    Edit: The point of view does not display right... Here is a picture
    view

    Thank you!

    Published by: jess_saunders on May 8, 2012 14:05

    Hello

    jess_saunders wrote:
    We can create a view with a column being filled using a pl/sql script, which uses 2 other columns on the same line as input?

    Example,
    Let's say I have a vision with

    Reg. Don't | Total | Customer account | Flag of billing. CodeFn
    $1234 45 2109 Y
    $1236 15 2101 Y .

    Of course, you can use a function that you created in the same way that you would use a built-in function:

    CREATE OR REPLACE VIEW     view_x
    AS
    SELECT  reg_no
    ,     total
    ,     customer_account
    ,     billing_flag
    ,     my_function (reg_no, total)     AS codefn
    FROM     table_x
    ;
    

    You cannot reference the procedures or anyonymous blocks in a CREATE VIEW statement (or any other SQL statement of stinks); only functions.

    Basically, I would like the script to generate a number that is returned in this column rather than do a simple Select stmt to extract columns from other tables/views.

    I don't know what you're saying here.
    As long as the function has no arguments, or make any kind of DML or DDL, then you can use it in the definition of the view, as stated above. The function failed to contain SELECT statements.
    Your notice must be based on other tables or views. If she does not really need anything from any other table, you can base your opinion on double. A CREATE VIEW statement must contain a query, and a query in Oracle must refer to a table or a view.

  • oracle.adfinternal.view.faces.util.ReportableImpl: oracle.jbo.domain.DataCreationException: Houston-25009

    Hello

    I get the same error, that so many times posted in this forum. But the case of the mine is little different from the others. I use JDeveloper 12 c

    I have download several files and commit in DB a. Files and downloaded a list here. I am facing problem when Blob respective data in connection parameter. I am trying to download the file doc.txt which contained karima.

    Code snippet:

    private list < UploadedFile > uploadedFile.

    List of files < UploadedFile > = this.getUploadedFile ();

    for (int i = 0; i < files.size (); i ++) {}

    AttributeBinding atrBlobDocContent = (AttributeBinding) bindings.getControlBinding ("DocContent");

    atrBlobDocContent.setInputValue (files.get (i)); Error happen here tried 1

    Below I tried 2

    blobFile = FileOperations.writeToBlobDomain (files.get (i));

    atrBlobDocContent.setInputValue (blobFile);

    How can I set blob value in list in link atrBlobDocContent.

    See detail below code

    Bean class

    public class FolderUploadBean {}

    public BindingContainer {} getBindings()

    back...

    Return BindingContext.getCurrent () .getCurrentBindingsEntry ();

    }

    BindingContainer links = getBindings();

    private list < UploadedFile > uploadedFile.

    private list < String > fileName;

    Private BlobDomain blobFile;

    {} public void setBlobFile (BlobDomain blobFile)

    this.blobFile = blobFile;

    }

    public BlobDomain getBlobFile() {}

    Return blobFile;

    }

    public FolderUploadBean() {}

    }

    {} public void setUploadedFile (list < UploadedFile > uploadedFile)

    this.uploadedFile = uploadedFile;

    }

    public list < UploadedFile > getUploadedFile() {}

    uploadedFile return;

    }

    public String saveFiles() {}

    List of files < UploadedFile > = this.getUploadedFile ();

    System.out.println ("save the files called");

    If (file! = null) {}

    System.out.println ("\n file size ==" + files.size ());

    for (int i = 0; i < files.size (); i ++) {}

    System.out.println ("\n File Name is" + files.get (i) .getFilename ());

    System.out.println ("\n the file length is" + files.get (i) .getLength ());

    OperationBinding dmsBlobBinding = bindings.getOperationBinding ("CreateInsert");

    OperationBinding dmsInfoBinding = bindings.getOperationBinding("CreateInsert1");

    OperationBinding dmsApplMapBinding = bindings.getOperationBinding("CreateInsert2");

    //-------------------

    AttributeBinding atrBlobDocId = (AttributeBinding) bindings.getControlBinding ("DocBlobId");

    AttributeBinding atrBlobSeqNo = (AttributeBinding) bindings.getControlBinding ("SeqNo");

    AttributeBinding atrBlobDocContent = (AttributeBinding) bindings.getControlBinding ("DocContent");

    Information attribute values

    AttributeBinding atrInfDocBlobId = (AttributeBinding) bindings.getControlBinding ("DocBlobId1");

    AttributeBinding atrInfoSeqNo = (AttributeBinding) bindings.getControlBinding ("SeqNo1");

    AttributeBinding atrInfoDocType = (AttributeBinding) bindings.getControlBinding ("DocType");

    AttributeBinding atrInfoDocName = (AttributeBinding) bindings.getControlBinding ("DocName");

    Card Attrib Valuess

    AttributeBinding atrDMSMapDocBlobId = (AttributeBinding) bindings.getControlBinding ("DocBlobId2");

    dmsBlobBinding.execute ();

    dmsInfoBinding.execute ();

    dmsApplMapBinding.execute ();

    OperationBinding opBindingSeql = bindings.getOperationBinding("generateDocBlobId");

    Map paramsMap = opBindingSeql.getParamsMap ();

    String strFirstDocBlobId = opBindingSeql.execute (m:System.NET.SocketAddress.ToString ());

    System.out.println ("returned seq impl =" + strFirstDocBlobId);

    int intFirstSeqNumber = Integer.parseInt (strFirstDocBlobId);

    atrBlobDocId.setInputValue (intFirstSeqNumber);

    atrBlobSeqNo.setInputValue (0);

    //----------------Blob Table-------------------------

    System.out.println ("value of the lob is" + files);

    files. Set (i, uploadedFile.get (i));

    BlobDomain blobDomain = createBlobDomain (files.get (i));

    System.out.println ("blobDomain is" + blobDomain);

    Byte [] dataContent = blobDomain.getStorageByteArray ();

    //----------------Info Table-------------------------

    atrInfDocBlobId.setInputValue (intFirstSeqNumber);

    atrInfoSeqNo.setInputValue (0);

    atrInfoDocName.setInputValue (files.get (i) .getFilename ());

    //--------------Map Table---------------------------

    atrDMSMapDocBlobId.setInputValue (intFirstSeqNumber);

    int intgetBlob = Integer.parseInt (atrBlobDocId.getInputValue () m:System.NET.SocketAddress.ToString ());

    atrBlobDocId.setInputValue (intFirstSeqNumber);

    atrInfDocBlobId.setInputValue (intFirstSeqNumber);

    try {}

    blobFile = FileOperations.writeToBlobDomain (files.get (i));

    atrBlobDocContent.setInputValue (blobFile);

    } catch (Exception e) {}

    e.printStackTrace ();

    }

    Abvoe all values are defined

    try {}

    OperationBinding operationBinding = bindings.getOperationBinding ("Commit");

    operationBinding.execute ();

    } catch (Exception ex) {}

    ex.printStackTrace ();

    }

    }

    }

    Returns a null value.

    }

    }

    FileOperation.java

    public class {FileOperations

    Public synchronized Shared BlobDomain writeToBlobDomain (UploadedFile imageFile)

    throws SQLException, IOException {}

    InputStream in = imageFile.getInputStream ();

    BlobDomain blobDomain = new BlobDomain();

    OutputStream out = blobDomain.getBinaryOutputStream ();

    ubyte [] buffer = new byte [8192];

    int bytesRead = 0;

    While ((bytesRead = in.read (buffer, 0, 8192))! = - 1) {}

    out. Write (buffer, 0, bytesRead);

    }

    in. Close();

    Return blobDomain;

    }

    }

    Error log

    oracle.adfinternal.view.faces.util.ReportableImpl: oracle.jbo.domain.DataCreationException: Houston-25009: failed to create an object of type: java.lang.Integer type: oracle.jbo.domain.BlobDomain with value: karima

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding._postSetValue(FacesCtrlAttrsBinding.java:183)

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.setInputValue(FacesCtrlAttrsBinding.java:146)

    at com.almulla.dms.view.beans.FolderUploadBean.saveFiles(FolderUploadBean.java:109)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:601)

    at com.sun.el.parser.AstValue.invoke(AstValue.java:254)

    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)

    at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)

    at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)

    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)

    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)

    to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:130)

    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)

    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)

    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:107)

    to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:130)

    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)

    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)

    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:101)

    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:123)

    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)

    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:1083)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:402)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:280)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:254)

    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)

    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)

    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:478)

    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:478)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:303)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:208)

    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:202)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:137)

    at java.security.AccessController.doPrivileged (Native Method)

    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)

    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)

    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:225)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3367)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3333)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)

    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)

    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)

    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)

    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)

    to weblogic.servlet.provider.ContainerSupportProviderImpl$ WlsRequestExecutor.run (ContainerSupportProviderImpl.java:254)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)

    Caused by: oracle.jbo.domain.DataCreationException: Houston-25009: failed to create an object of type: java.lang.Integer type: oracle.jbo.domain.BlobDomain with value: karima

    at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:933)

    at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:112)

    at oracle.jbo.server.AttributeDefImpl.convertToJava(AttributeDefImpl.java:2515)

    at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:1090)

    at oracle.adf.model.binding.DCDataControl.setAttributeInRow(DCDataControl.java:2388)

    at oracle.adf.model.bc4j.DCJboDataControl.setAttributeInRow(DCJboDataControl.java:2884)

    at oracle.jbo.uicli.binding.JUCtrlValueBinding.setAttributeInRow(JUCtrlValueBinding.java:1175)

    at oracle.jbo.uicli.binding.JUCtrlValueBinding.setInputValueInRow(JUCtrlValueBinding.java:3010)

    at oracle.jbo.uicli.binding.JUCtrlValueBinding.setInputValue(JUCtrlValueBinding.java:2985)

    at oracle.jbo.uicli.binding.JUCtrlValueBinding.setInputValue(JUCtrlValueBinding.java:2948)

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.setInputValue(FacesCtrlAttrsBinding.java:145)

    ... more than 68

    Caused by: java.lang.NumberFormatException: for input string: "Karima".

    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

    at java.lang.Integer.parseInt(Integer.java:492)

    in java.lang.Integer. < init > (Integer.java:677)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

    at oracle.jbo.domain.TypeConvMapEntry.convert(TypeConvMapEntry.java:101)

    at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:883)

    ... more than 78

    Maroof

    Hello

    This post related to my problem in my application have been resolved. I now use for creating data method below.

    Private BlobDomain createBlobDomain (file UploadedFile)

    {

    InputStream in = null;

    BlobDomain blobDomain = null;

    OutputStream out = null;

    Try

    {

    in = file.getInputStream ();

    blobDomain = new BlobDomain();

    out = blobDomain.getBinaryOutputStream ();

    IOUtils.copy (in, out);

    }

    catch (IOException e)

    {

    e.printStackTrace ();

    }

    catch (SQLException e)

    {

    e.fillInStackTrace ();

    }

    Return blobDomain;

    }

    and other issues as data binding attribute below list file parameter is correct.

    atrBlobDocContent.setInputValue (createBlobDomain (files.get (i)));

    In my case, it was a stupid mistake in pageDefnitionBinding, here atrBlobDocContent attribute referencing some long type with another VO.

    Thanks to Timo Hahn to propose and help debugging.

    Maroof

  • Discover with function as datasource returns only the first line.

    Hello

    I created the following function to get the status of all the rules for the instances of SQL Server.

    The data type of the function output has been configured as 'List of SQLInstanceRuleStatuss', where SQLInstanceRuleStatuss is the custom type, I created in the same module.

    When I tested the function, it returns all instances of SQL Server with two other columns.

    But when I try to create a view with the Rows property that is configured to use the feature, it returns only the first line:

    sqlRules = new ArrayList();

    queryStatement = server. QueryService.createStatement ("(DBSS_Instance)");

    queryResult = server. QueryService.executeStatement (queryStatement);

    for (it in queryResult.topologyObjects)

    {

    sqlRule is functionHelper.createDataObject ("westjet_mark_dev:SQLInstanceRuleStatus", "none", "test");.

    sqlRule.instance = it;

    sqlRule.ruleName = 'test rule name';

    sqlRule.status = false;

    sqlRules.add (sqlRule);

    }

    Return sqlRules;

    Did I miss something?

    Thank you

    Mark

    Mark,

    I think I forgot something

    sqlRule=functionHelper.createDataObject("westjet_mark_dev:SQLInstanceRuleStatus","none","test");

    you create the test id

    change your line of

    sqlRule=functionHelper.createDataObject("westjet_mark_dev:SQLInstanceRuleStatus","none",null);

    This should allow the creation of a single object in your loop for

  • With functions in the SQL query tuning

    Hello

    I'm trying to settle a query with functions in the select section. You wonder how to see the results of the plan to explain these features included. Will there be a qs to include when you run the explain plan command

    Thank you

    Hilton

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

    PL/SQL Release 11.2.0.3.0 - Production

    "CORE 11.2.0.3.0 Production."

    AMT for Linux: Version 11.2.0.3.0 - Production

    NLSRTL Version 11.2.0.3.0 - Production

    Thank you. The function is not in the where clause but in the query using some of the returned columns. I realized that using the trace gave me the plan explanation of each of the functions.

  • Why we need to create the package instead of procedure or function in Oracle

    Hello

    Recently, I attended an interview, they asked,
    why we must create the package instead of procedure or function in oracle. Is a specific advantage, if we create together.
    I'm not sure. can u tell me please someone.

    Thank you and best regards,
    Sanjeev.

    Hello

    A part of the oracle documentation.

    What is a PL/SQL Package?
    A package is a schema object which includes subroutines, variables, and logically related PL/SQL types. Packages have two parts: a specification (spec) and a body. Sometimes, the body is unnecessary. The specification is the interface to the package. It declares the types, variables, constants, exceptions, cursors, and subprograms that can be referenced from outside the package. The body defines queries for the sliders and the code for the subprogrammes.

    Benefits of the PL/SQL Packages
    Packages have a long history in software engineering, offering important characteristics for a reliable, maintainable, and reusable code, often in team for large systems development efforts.

    Modularity

    Packages allow you to logically encapsulate Associates types, elements, and subroutines in a module named PL/SQL. Each package is easy to understand, and the interfaces between packages are simple, clear and well defined. This facilitates the development of applications.

    Easier application design

    When you design an application, all you need initially is the interface information in the package specification. You can code and compile a spec without his body. Stored subprograms that reference the package can then be compiled as well. You should not set the package body entirely until you are ready to complete the application.

    Information masking

    With packages, you can specify which types, elements, and subprogrammes are (and accessible) public or private (hidden and inaccessible). For example, if a package contains four subprogrammes, three can be public and one private. The package hides the implementation of the subprogramme private so that only the package (not your application) is affected if the application changes. This simplifies maintenance and improvement. Also, by hiding the implementation details of the users, you protect the integrity of the packaging.

    Feature added

    Sliders and packed public variables persist for the lifetime of a session. They can be shared by all the subprogrammes that are running in the environment. They allow you to manage data in any of the transactions without storing in the database.

    Best performance

    When you call a subprogram packaged for the first time, the whole package is loaded into memory. Subsequent calls to related subprograms in package require no disk i/o.

    Packets stop cascading dependencies and avoid an unnecessary recompilation. For example, if you change the body of a packaged function, Oracle does not recompile other routines that call the function; These routines only depend on parameters and return value that are declared in the specification, so they are recompiled only if the specification changes.

  • Qtr2 calculation with function @PRIORS

    Hi all

    I'm figuring Qtr2 with function @PRIORS.

    Œuvres script to the following: @PRIORS (SKIPMISSING, "Jun");

    Here's my question:
    This logic fails if there is no data in April, may or June. He will continue to seek for the previous period with data that may Feb And it would be a bad value.

    So I would get to a rangelist, as suggested by the Tech Ref: http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/priors.html

    The following script will not work: @PRIORS (SKIPMISSING, "Jun", "April": "Jun");
    This does not work: @PRIORS (SKIPMISSING, "Jun", "Apr", "May", "Jun");

    Any ideas?

    Thank you
    Mehmet

    PS We are on version 11.1.2.1

    Hi Mehmet,

    If I understand you correctly, Jun data should be #mi if April and may are #MI, and may be #mi, but Apr is 100, prior jun should be 100.

    IF (Apr > 0)
    @PRIORS (SKIPMISSING, "Jun");
    ON THE OTHER
    @PRIORS (SKIPNONE, "Jun");
    ENDIF;

    Kind regards
    Robb Salzmann

  • How do the function of Oracle database in OBIEE Administration tool

    Hi all
    I want to use an Oracle database function as a column in OBIEE (BM, presentation model). Can someone made this inOBIEE. Pointers to this is much appreicated.

    Thank you

    Hi user7417334,

    You cannot use the formulas in the presentation layer (not that I know well). But you can certainly use functions of oracle database in MDB layer.

    You want to use the function EVALUATE. It works like this:

    can EVALUATE (' TO_DATE (%1, %2) "AS DATE, 31 December 2009", "MM/DD/YYYY" ")

    Generic version: EVALUATE ('' AS , value1, value2, etc.)

    FUNC) is the syntax for the function you are calling. All parameters must be replaced with %, where number refers to the order in which you specify your settings.
    DATATYPE) the type of data that will allow to evaluate the function. In this case, the DATE.
    Value1) the last part of the formula is a list separated by commas of all parameters used in the function. In this case, this is the date I want to ride
    Value2) is the second parameter. You need as many times as you have referenced in your function. In this case, it is the date format.

    Good luck and if you found this post useful, please give points!

    Best regards

    -Joe

  • Satellite S50T-B950 - can't dim / brighten screen with function key

    Hello

    So, I can't decrease or brighten my screen with function key. Although things like the volume and function key still works.

    Someone at - it suggestions that I could try? I can't see all the options on how to resolve this problem within the program of 5500 intel HD or in my AMD catalyst thing.

    Anyone ever had this before or have a fix for this?

    Thank you

    Can you please tell us which model of laptop and operating system do you use?
    Are you using the original operating system that you got with your machine or you have installed the clean version?

    Did you remove something from your system?

  • Installed new microcomputer, LibreOffice, but the "open with" function does not recognize it

    I recently downloaded suite desktop LibreOffice, but OPEN WITH function recognizes not all programs.  How can I fix it?

    Contact support LibreOffice.

  • Images disappear after loading another view with webview

    Okay, so at the beginning I had an old bar which was signed and I put that on the playbook to see what features it had. This bar has worked exactly how it was supposed to. I got the source and I had to change something, but first I had to update the sdk because I do not have the old sdk that it was built with, built when air 2.5 was outside. Everything I've done has been 3.1 the air version and the update includes the blackberry tablet sdk. He compiled and loaded on the perfectly good playbook, but after that I click on an image which acts as a button that goes to a view with a webview inside, and return to the original view, all the images in the initial view disappeared and I can't click on any one of them.

    It's weird, I remember what happens a long time ago and it has to do with something on the change of AIR/SDK, but I just do not remember what is the cause... If anyone knows what could cause the webview make the images disappear on a reload of a DIFFERENT opinion, let me know. BTW, webview was destroyed on the previous view.

    It was a problem with webview I suppose, very unstable object implementation...

  • How to write a region with white text?

    I working on the following JavaScript code to write the left in the header of the PDF documents, but after you run the code, the redacted area is black, how can I write the area with white rectagles? Thank you very much!

    for(var pg = 0; pg < this.numPages; pg++)
    {
      var rCrop = this.getPageBox("Crop",pg);
      this.addAnnot({
      type:"Redact", page:pg,
      quads:[[0, rCrop[1], rCrop[2] - 345, rCrop[1], 0, rCrop[1] - 14, rCrop[2] - 345, rCrop[1] - 14]],
      overlayText: "",
      alignment: 1,
      repeat:true });
    }
    this.applyRedactions({bKeepMarks: false, bShowConfirmation: false, cProgText: "Processing..." });
    
    

    Well done!

    You can get the most recent versions of the API from here: JavaScript for Acrobat. Adobe Developer Connection

    The API XI lie buried in the Acrobat SDK kit.

    You will find new features in the section "new features and changes".

  • Problem opening pdf files.  I have Acrobat Reader DC/Windows by default, but when I click on the file, a file conversion screen with all these codes. Must use the "open with" function which is a nuisance.  Why it will not default?

    Problem opening pdf files.  I have Acrobat DC/Windows by default, but when I click on the file, a file conversion screen now with all these language codes. Must use the "open with" function which is a nuisance.

    Why it will not open by default when I click on the file?

    Hello

    I guess that you are looking for this:

    Open drive

    Go in Edition > Preferences > General

    Uncheck the option, the online storage see the opening of the files

    Click OK and restart

    Thank you

    Abhishek

  • I have a viewer with a link button problem with vimeo

    I have a viewer with a vimeo link, so when the video plays the darkened background. The problem Im having is the button to launch the video is just Gray, I can't change it. I want her to be in the form of a graph not a thumbnail of the video if possible

    This isn't the Image that creates the gray line. Its the fill color of the relaxation.

    If you created it with LightBox view Composition so the following test

    1. Select the trigger in question

    2. Select None in the fill in the toolbar such as mentioned in the screesnshot below

    3. make sure to do this for all States of relaxation. Particularly active state.

    Let me know if you have it created with the help of the jQuery slideshow.

    Kind regards

    Vivek

Maybe you are looking for

  • Satellite - black screen and can't restart with the recovery disk

    I have a black screen and can not restart with the restore disc but it seems to be. I find this odd, I can't ask Toshiba direct on my problem, but I have to wait for one nature in the heart of my problem or give me a helping hand

  • How to reinstall the HDD on my Satellite A450?

    Hi guys. It's my first drive hard reinstall time. But there is a problem! My son broke a disc to reformat (no.2) and not told me. In any case, my computer completely crashed and I need to reinstall my hard drive. I have a version of windows XP home.

  • Installation of the HP envy j067cl with own OS ssd

    Hi all yesterday, I bought a new HP touchsmart j067cl want that came with windows pre-installed 8 64-bit. My specs are: I7 cpu 4700qm8 GB ddr3 1600 Mhz ram750HDDIntel GPU HD 4600 My first priority is the speed, that is why I bought this model so I wa

  • Auto saved emails sent folder.

    The system also does not save the mail I send, things have gotten worse since this "postmaster to hotmail" sends a message to my contacts and sent me an e-mail of "undeliverable mail".  Almost deleted 'ALL' of my past he sent emails.

  • my laptop went from landscape to portrait. How can I return to normal

    I have to turn the phone 90 degrees to the view and rear mouse movements to the front. How to restore it normal