Return type of dataframe string identifier

Hello

If I have to return a dataframe of rqScript which contains the string, how am I suppose to mention it in the return type of rqTableEval.

For example, if the return value of rqScript is
data.frame (c (1), c("Name"))
, which is a number and the other string
Then in the rqTableEval, identify the return values
'select ID, 1 '1' chain of double'
1 works as an identifier for the numbers but '1' doesn't work, '1' as an invalid identifier for the return string

I tried with the host of permutations "-* ','. '. "\ *", "a" etc., none seems not to work

Can I please get help on which must be specified as an identifier for the string type?

Published by: Kedar Gupte on May 21, 2013 01:52

Kedar,

The string must be long enough to accommodate the output. For example, for a maximum length of 10 characters, you can do "Lucy" or cast ('a' as varchar2 (10)). You must also use single quotes instead of double quotes. In SQL double quotes are used to specify the identifiers (such as table names, column names, etc.). In your example, '1' is an unknown identifier. What you need is a string literal.

Denis

Tags: Business Intelligence

Similar Questions

  • Create object of type integer error String

    Hi all

    I use JDev 12.1.2.0.0

    I created a selectManyChoice based on a data control that I did a view with a single column (which is a string).

    I set the properties of the component to be immediate = true and autosubmit = true and I have a method that I have already tried with other components like that and I know it works, but the method runs. It gives the following error:

    < 21 February 2014 10:04:41 AM GMT > < error > < oracle.adfinternal.controller.application.AdfcExceptionHandler > < ADFC-50016 > < ADFc: when Manager application exception exception handling threw a new exception.

    oracle.jbo.domain.DataCreationException: Houston-25009: failed to create an object of type: java.lang.Integer type: java.lang.String with value: General BI seller

    ....

    Caused by: java.lang.NumberFormatException: for input string: "General BI vendor.

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

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

    at java.lang.Integer.valueOf(Integer.java:582)

    .....

    I think that his is a normal behavior of the component, it tries to convert the full text but I've not specified for this component and I have other elements (selectManyChoices) that return string values where this doesn't happen.

    How can I fix?

    Here is the code for my component:

    < af:selectManyChoice value = "#{bindings." TypeSellerList1.inputValue}.

    label = "#{bindings." TypeSellerList1.label}"id ="smc3.

    autoSubmit = 'true' immediate = "true".

    valueChangeListener = "#{OBIEE_managed_bean.» TypeSellerListSelection} ">"

    < f: selectItems value = "#{bindings." TypeSellerList1.items}"id ="si6"/ >

    < f: validator binding = "#{bindings." TypeSellerList1.validator} "/ >"

    < / af:selectManyChoice >

    Any idea on how to solve this problem?

    Respect and thanks for the help,

    Frederico.

    I'm very well thank you Frederico. Hope you are fine as well.

    I just saw that you have a validators on your component. Try commenting on this line and test again.

    Thank you for your congratulations

    Antonis

  • Property Finder have table as return type

    Hi all

    Is it possible to return the finders of vco table types?

    If I give the property name in the property-bean attribute then it gives [Ljava.lang.String;@4981086 as value (as expected).

    < bean-PROPERTY = display name "testProp" = "Property of Test" hidden = "false" name = "testProp" show in the column = see "real" description = "true" / >

    But is it possible to specify bean-property attribute of tag finder so that we can wrap up the property value according to a static utility method. Maybe something like below (I know that the threshold is not correct, but it's just a wild guess)

    < bean-property = "StringUtils.joinArray (testProp) property' display name ="Test well"hidden ="false"name ="testProp"show in the column = see"real"description ="true"/ >"

    Or any other means by which I can manage property array return types.

    Thank you for your help.

    Best regards

    Sumit Tyagi.

    Hi Sergio,

    Get it now, we can specify any OGNL expression in property accessor of property tag attribute. Read a little on the OGNL expressions and had it work.

    The below xml tag property works for me now.


    Best regards

    Sumit Tyagi

  • DatabaseProcedure with the return type preceded of the schema name

    Salvation (Paco)

    I have a question on the DatabaseProcedure class. We use proxy Oracle users to our database connections.
    Everything is accessible via a role of database that are granted to the user. All of our database objects, tables, etc. are protected by this database role.
    When I want to call a function/procedure of database, I need to add the name of the schema as a prefix to the custom database object that uses us for parameters and return types.

    So far so good. I can also define a parameter prefixed by the name of schema via the DatabaseProcedure.registerArrayType...
    But when I try to set a function call that uses this parameter I get an error saying "the statement is not valid.
    The problem is the regular pattern of PROCEDURE_DEFINITION:
    private static final Pattern PROCEDURE_DEFINITION = Pattern.compile("\\s* (FUNCTION|PROCEDURE) \\s+ ([\\w.$]+) \\s* (?:\\((.*?)\\))? \\s* (?:RETURN\\s+(\\w+))? \\s* ;? \\s*", CASE_INSENSITIVE | COMMENTS | DOTALL);
    The return type cannot be prefixed by the name of schema.

    Any good suggestions or workarounds?

    I have actually change the duration of reflection model to make it work-, but I really don't like this solution over the long term.

    / Torben

    Published by: Zonic 2013-05-07 10:52

    Hi Torben,

    I think that I have a work around for the problem which might work for you. If you look at the source of DatabaseProcedure.registerArrayType you will find that it is actually called DatabaseProcedure.registerCustomParamType.

    public static void registerArrayType(String name)
    {
      registerCustomParamType(name, Types.ARRAY, Array.getORADataFactory(), name);
    }
    

    A solution you can replace calls to DatabaseProcedure.registerArrayType with calls to DatabaseProcedure.registerCustomParamType as follows.

    // Instead of DatabaseProcedure.registerArrayType("NAME.WITH.DOTS") call:
    DatabaseProcedure.registerCustomParamType("anyNameWithoutDots", Types.ARRAY, Array.getORADataFactory(), "NAME.WITH.DOTS"); // Don't forget to use uppercase here.
    
    DatabaseProcedure dp = DatabaseProcedure.define("procedure my.procedure(param1 in out anyNameWithoutDots)");
    
    DatabaseProcedure.ParamType type = dp.getParamDef(0).getType();
    System.out.println(type.getName() + " is " + type.getTypeName()); // ANYNAMEWITHOUTDOTS is NAME.WITH.DOTS
    

    In this way, that you don't have to use the 'illegal' name in the definition of DatabaseProcedure.

    Kind regards
    Paco van der Linden

  • Return an array of strings of call library function node

    Hello

    I'm having a few problems getting the following work.

    I have a camera from a manufacturer that came with its own .dll and header files. I'm calling the LabVIEW .dll file (2011). In total, there are about 50 functions, and there is a rest that I can't go to work (probably because I understand enough about the topic to interface with an external code).

    The description of .dll is delivered with the following text:

    #define length

    #define MAX_CONFIGURATIONS

    Prototype: int ConfigListGet (char (& sConfigurations) [MAX_CONFIGURATIONS] [length]);

    and the header file with:

    extern "C" __declspec (dllexport) int RepRateConfigurationListGet (char (& sConfigurations) [MAX_CONFIGURATIONS] [length]);

    The function should return an array of strings to the list of configurations.

    The problem I have is that I can not understand how to return the array of strings for the node of the library function call to LabVIEW. I looked a little on the web and the examples in LabVIEW and I can't find anything specific to return an array of strings in this way, so if anyone can point me in the right direction I would really appreciate it.

    Also, if I click with the right button on the node library function call and click on "File Create.c", I would be able to create the prototype of function even that above? I tried this but no luck. Was the closest I came:

    int32_t RepRateConfigurationListGet (char sConfigurations [], uint8_t MAX_CONFIGURATIONS, uint8_t MAX_LEN);

    Thank you very much in advance for any help!

    D

    Hello!

    I tried once using an array of U8, converting it to a string and then split into an array.

    Here is my old piece of code (the split part can be cleaner ;=))

    Kind regards

    Marco

  • REP-0737: must be a function of return type 'ref cursor.

    Hi all

    I have create a ref cursor query in reports 10 g. But it is giving error REP-0737: must be a function of return type 'ref cursor.

    Here is my code

    function QR_1RefCurDS return sys_refcursor is
    
     My_Cur Sys_Refcursor;
    begin
      Open My_Cur for select * from scott.emp order by deptno;
      return My_Cur
    end;
    

    fate of the screen.

    Ref_Cursor_in_reports10g.jpg

    Oracle Forms/Reports has a complete PL/SQL engine and (only) the SQL parser.

    However, the engine of forms/States PL / SQL and SQL Analyzer are at a level that was in the Oracle 8.0 database.

    So, in the forms/States functions/procedures and forms/States triggers, you can not use SQL commands that did not exist in the 8.0 database.

    The predefined SYS_REFCURSOR type is introduced in Oracle 9i.

    Use this:

    PACKAGE test_rc IS

    TYPE of rc_type IS REF CURSOR RETURN emp % ROWTYPE;

    END;

    FUNCTION RETURN QR_1RefCurDS Test_rc.rc_type IS

    test_rc.rc_type RC;

    BEGIN

    OPEN the RC to SELECT * FROM emp;

    RETURN rc;

    END;

    Kind regards

    Zlatko

  • Houston-25009: failed to create an object of type: java.sql.Timestamp type: java.lang.String

    System.out.println ("New Record");

    BindingContext exDup13 = BindingContext.getCurrent ();

    System.out.println ("kjjk45345323245");

    DCBindingContainer dbDup13 = (DCBindingContainer) exDup13.getCurrentBindingsEntry ();

    System.out.println ("kjjk45345345");

    DCIteratorBinding iterDup13 = dbDup13.findIteratorBinding("XYZIterator");

    System.out.println ("kjjk45345345");

    ViewObject voDup13 = iterDup13.getViewObject ();

    System.out.println("bipin:"+voDup13);

    voDup13.setWhereClause ("ID_NO ='" + idNoBnd.getValue () m:System.NET.SocketAddress.ToString () + "'");

    System.out.println("bipin1:");

    voDup13.executeQuery ();

    System.out.println ("bipin2:");

    voDup13.next ();

    System.out.println("kjjre:"+voDup13.GetRowCount());)

    When I am trying to run this code, I get error at last line.

    Error is:

    Houston-25009: failed to create an object of type: java.sql.Timestamp type: java.lang.String with value: 890089

    You can try using getEstimatedRowCount() instead of getRowCount() as:

    System.out.println ("16:"+voDup13.getEstimatedRowCount());

    If you still get error try to getEstimatedRowCount() before defining where clause and see if the error will come up again or not

  • CallFunction return type of the object instead of boolean

    Hello

    I used getScript("Somescriptname").callFunction to call a function in another script which has a boolean as a return type.

    The call above always returns type object, I tried an explicit cast to a boolean, but his throw syntax error.

    Please suggest

    Thanks and greetings

    Madoux

    Hello Suresh,

    getScript (.callFunction) always returns an object.  Initially, it should be stored in an object and then analyze Boolean value as shown below:

    Object Val = getScript("ScriptName").callFunction ("FunctionName", past of the arguments for the function, if any);

    Analyze as below

    Giveme Boolean = Boolean.parseBoolean (val.toString ());

    System.out.println ("return val:" + giveme);

    This should solve your problem.  Please let me know if this isn't...

    A happy test...

    Kind regards

    Plot of Sri

  • RETURN type of function table

    Hello

    I read conflicting information about the return type that has a table function must or may use.

    First, I am a student of a book that says:

    Function in pipeline returns the data types:

    The main constraint for the pipeline functions, it is the return type must be a collection type autonomous which can be used in SQL - i.e. a VARRAY or table nested.

    and then in the next sentence...

    More precisely a pipeline function can return the following:

    A stand-alone nested table or VARRAY, defined at the schema level.

    A nested table or VARRAY that has been declared in a package type.

    This seems to go against the first quoted sentence.

    Now, before reading the above text I had done just my own test to see if a packed type would work because I thought I had read somewhere that it would not, and he does not (the test code and this output is at the end of this question). When I arrived in the text above, after my test, so I was naturally confused.

    So, I'm going to PL/SQL reference that says:

    RETURN data type

    The data type of the value returned by a function table in pipeline must be a type collection defined either at the level of schema or within a package (therefore, it cannot be a type of associative array).

    I tried to call a function that returns a collection of VARRAY type packaged in both SQL and PL/SQL (of course below is SQL all in any case) and no work.

    Now I'm wondering what is a TABLE function must use a schema type and a function table in pipeline can use a packaged type?  I see that I created and called a function table but examples of Oracle see the creation and use of a function table in pipeline.

    Edit: I should add that I read the following sentence in the SF book on p609 in * table functions: "this type of nested table must be defined as an element of level diagram, because the SQL engine must be able to resolve a reference to a collection of this kind."

    So that it begins to resemble table functions should return a schema type and pipelined table functions, perhaps because that they don't in fact return a collection, rather they return (RowSource) content, can use the schema types or types of packages. Is this correct?

    Can someone clarify this for me please?

    Thank you in advance,

    J

    CREATE OR REPLACE PACKAGE PKGP28M

    VAT-type is varray (5) number;

    END;

    /

    DISPLAY ERRORS

    create or replace type VAT is varray (5) number;

    /

    display errors

    create or replace function tabfunc1 return pkgp28m.vat as

    numtab pkgp28m.vat:=pkgp28m.vat();

    Start

    numtab.extend (5);

    because loop me in 1.5

    numtab (i): = trunc (dbms_random. Value (1.5));

    end loop;

    Return numtab;

    end;

    /

    display errors

    create or replace function tabfunc2 as return VAT

    numtab vat:=vat().

    Start

    numtab.extend (5);

    because loop me in 1.5

    numtab (i): = trunc (dbms_random. Value (1.5));

    end loop;

    Return numtab;

    end;

    /

    display errors

    exec dbms_output.put_line (' call tabfunc1 (returns the packaged type) :');)

    Select * from table (tabfunc1)

    /

    exec dbms_output.put_line (' call tabfunc2 (returns the type of schema) :');)

    Select * from table (tabfunc2)

    /

    declare

    RC sys_refcursor;

    number of v;

    Start

    dbms_output.put_line (' in anonymous block1 - open rc to select in the table (tabfunc1) (returns the packaged type) :');)

    Open rc to select table column_value (tabfunc1);

    loop

    extract the rc in v;

    When the output rc % notfound;

    dbms_output.put_line (' > ' | to_char (v));

    end loop;

    close the rc;

    end;

    /

    declare

    RC sys_refcursor;

    number of v;

    Start

    dbms_output.put_line (' in anonymous block2 - open rc to select in the table (tabfunc2) (returns the type of schema) :');)

    Open rc to select table column_value (tabfunc2);

    loop

    extract the rc in v;

    When the output rc % notfound;

    dbms_output.put_line (' > ' | to_char (v));

    end loop;

    close the rc;

    end;

    /

    Scott@ORCL > @C:\Users\J\Documents\SQL\test29.sql

    Package created.

    No errors.

    Type of creation.

    No errors.

    The function is created.

    No errors.

    The function is created.

    No errors.

    the call of tabfunc1 (returns the packaged type):

    PL/SQL procedure successfully completed.

    Select * from table (tabfunc1)

    *

    ERROR on line 1:

    ORA-00902: invalid data type

    the call of tabfunc2 (returns the type of schema):

    PL/SQL procedure successfully completed.

    COLUMN_VALUE

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

    1

    4

    1

    1

    3

    In anonymous block1 - open rc to select in the table (tabfunc1) (returns the packaged type):

    declare

    *

    ERROR on line 1:

    ORA-00902: invalid data type

    ORA-06512: at line 6

    In anonymous block2 - open rc to select in the table (tabfunc2) (returns the type of schema):

    > 1

    > 2

    > 4

    > 2

    > 3

    PL/SQL procedure successfully completed.

    Post edited by: Jason_942375

    But the compilation of the PIPELINED WILL CREATE the schematic function types automatically. And the TABLE function, applied to the PIPELINED function, use these types of hidden patterns.

  • PLS-00362: Invalid cursor return type; 'NUMBER' must be a record type

    Hello

    Having a little trouble with the following code example provided to http://www.dba-oracle.com/plsql/t_plsql_cursor_variables.htm:
      1  DECLARE
      2    TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
      3    c_cursor  t_ref_cursor;
      4    l_row   NUMBER;
      5  BEGIN
      6    DBMS_OUTPUT.put_line('Strongly typed REF CURSOR using SCALAR type. Expect an error!');
      7    OPEN c_cursor FOR
      8      SELECT COUNT(*) cnt
      9      FROM   cursor_variable_test;
     10    LOOP
     11      FETCH c_cursor
     12      INTO  l_row;
     13      EXIT WHEN c_cursor%NOTFOUND;
     14      DBMS_OUTPUT.put_line(l_row);
     15    END LOOP;
     16    CLOSE c_cursor;
     17* END;
     18  /
      TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
                           *
    ERROR at line 2:
    ORA-06550: line 2, column 24:
    PLS-00362: invalid cursor return type; 'NUMBER' must be a record type
    ORA-06550: line 2, column 3:
    PL/SQL: Item ignored
    In the code above, SELECT COUNT (*)... returns a NUMBER. I know it's an aggregation function, but it returns a single value.
    Why can't return a value in a column of a row in a NUMBER?
    How can I change the SQL code so that I can do this?

    Furthermore, I wonder about the use of FETCH with a count (*)... FETCH is supposed to fetch the next row... How it works when you select an aggregate as County?

    Thank you very much
    Jason

    >
    TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
    *
    ERROR on line 2:
    ORA-06550: line 2, column 24:
    PLS-00362: Invalid cursor return type; 'NUMBER' must be a record type
    ORA-06550: line 2, column 3:
    PL/SQL: Ignored Element

    In the code above, SELECT COUNT (*)... returns a NUMBER. I know it's an aggregation function, but it returns a single value.
    Why can't return a value in a column of a row in a NUMBER?
    How can I change the SQL code so that I can do this?
    >
    The exception is in line 2: your cursor statement. And the answer is in the text that you access
    >
    The return value of a strongly typed REF CURSOR must be a folder that can be defined using % TYPE % ROWTYPE attributes or record structure.
    >
    You said the CURSOR to return a NUMBER. And as the text says, he must be a 'record '.
    >
    Furthermore, I wonder about the use of FETCH with a count (*)... FETCH is supposed to fetch the next row... How it works when you select an aggregate as County?
    >
    As you said already FETCH retrieves the next line, if any. A query is a request is a request. It returns a result set. A query that uses aggregates returns a result set. A query that does not aggregate returns a result set.

    Your simple COUNT (*) SELECT query returns a result set that consists of a LINE and a line a ONE COLUMN of type NUMBER. Although there is only one column in the result set, what is returned is a RECORD or a LINE. That's why you have to report your data cursor return type a document using the % ROWTYPE or % TYPE attributes or a record structure.

  • Before then, the shift functions return type?

    I can not stress which is the return type of these functions? numeric value or Member?

    And if they come back that a member would be this fomula be valid (I have to take the average of March and June):
    avgppl = @avgrange ("HRsummary"-> "territory", @list (@currmbr ("YearTotal"), @shift (@currmbr ("YearTotal"),-3)))

    Thanks in advance!

    Hello

    All the mentioned functions (Prior, Next, and shift) returns the values and non-members.

    Concerning
    -SM

  • In interfaces covariant return types

    Hello
    I tried this little to understand code snippet covariant returns but when I tried to compile I get errors saying that I need to implement interfaces. I'm in a bit of a puzzle because I think I have them implemented correctly. Can someone help me please this problem...

    interface I1 {number f() ;}
    interface I2 {f(Number i) ;} number
    the interface I3 {int f() ;}

    class C {}
    public number f() {return 1 ;}}
    }

    class C2 implements I1, I2 {}
    public Integer f() {return 1 ;}}
    public Integer f (Float i) {return 1 ;}}
    }

    Class C3 extends C implements I2 {}
    Public Float f (Integer i) {return (float) 1 ;}}
    }

    class C4 extends C implements I3 {}
    public int f() {return 1 ;}}
    }
    Any help is greatly appreciated.

    Here are the error messages:

    The problem here is that you do more to vary the return types. You are also vary the types of parameters . You can't do during the substitution.

  • Why host interface create() method return type is only return RMI types?

    Why host interface create() method return type is only return RMI types? Why not other primitive data types?

    Because the bean home interface an EJB specifies methods that allow the client to create, delete, and find items of the same type as self. The EJB itself must be an RMI type, and it could certainly not be a primitive type.

  • Updating of the Data Services loses configured enter/return types

    v 4.0.1

    I have several configured data services (all PHP services).  I have about 20-25 functions defined in all 6 services, but 4 functions will surely lose the enter/return types configured each time a manual refresh or auto data occurs.  For example, I have a function:

    saveOrder(OrderHeader:Object,_LineItems:Object):Object

    When I right click and 'configure the Types of entry... '. ", and then"configure return Type... ". "I can set the appropriate without any error types.  I get so I expect the function definition:

    saveOrder(OrderHeader:OrderHeaderFlex,_LineItems:LineItemFlex[]):Boolean

    My ACE and PHP code seem to have errors, I've tested successfully this function repeatedly.  However, if I right-click and choose "Refresh" on my name of service or the service itself, the function returns the definition of the unknown.  He will go even after the automatic update, which produces from time to time.  I can configure the types of data and then immediately, click Refresh and this function will return to the unknown, even if there has been absolutely no code changes.  I have other services and functions in the same project (some that use the same types of data involved above) who do not have this behavior.

    Even when these functions "lose" data type configuration, my project will still compile and affected functions will work as expected.

    This occurs because of a bug in Zend. See the bug related to FB and the bug of zend.

    FB-27016

    ZF-10365

    -blandine

  • Doubt about the return type of function

    Hello

    Can a function returns a Boolean value in a select query.

    Suppose m creating a function... so can we have a return type of Boolean as...?

    If so... THN please give an example

    Can a function returns a Boolean value in a select query

    The answer is no. a Boolean is not a SQL data type and may not be used in the SELECT query.
    For the user-defined function to be called in a SQL statement, see http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10471/adfns_packages.htm#ADFNS00908
    Note especially these lines

    "Its formal parameters and its return value (if any) must have built-in data types (for example, CHAR, DATE or NUMBER) Oracle, not types (such as BOOLEAN, RECORD or TABLE) PL/SQL data.

    "There is an exception to this rule: a formal parameter can have a PL/SQL data type, if the corresponding actual parameter is implicitly converted to the data type of the formal parameter" >

    Published by: Johan August 3, 2010 03:48

Maybe you are looking for

  • In Safari, the links are inactive after update to iOS 9.3

    iPad 2 air. Updated to iOS 9.3 yesterday and found that most of the time links in Safari browser are inactive, i.e. it will not go to his content stated. For example, my search engine is set to Google. After a search, all the links in Safari are dead

  • HP G62: I have hp g62 laptop that I need to replace the hard disk but I don't have a lap desk

    I have hp g62 laptop comes with windows 7 Home premium and Microsoft last year offered 10 edition windows Home premium.Suddenly the windows closed was a message "hard drive does not exist" or "boot device not found", said another time.I need to repla

  • T6i does not appear when connected to Windows 10 PC

    I plugged my T6i camera to my PC with the supplied cord, but the camera is not displayed on the PC. I'm on Windows 10 with the camera 1.0.0 firmware version (I don't know if there is a newer version of the firmware) Device Manager does not display ba

  • M475 MFP HP LaserJet Pro 400

    I just put a laptop for windows 7 64 bit. After you have installed the software package for a M475 MFP HP LaserJet Pro 400 via USB it analyzes not the sheet feeder. The scans are empty. Any ideas as to the cause.

  • PowerVault MD3000i - HDD Guasto [DS]

    Buongiorno, If line gentilmente sostituzione di a guasto 600Go SAS 6Gbps 15 k 3.5 "HDD PowerVault MD3000i NAS - disco fans parte di a RAID 5 for the fault. Macchina fuori co. 5s information by intervento fuori co. Grazie.