Any Predefined Function in Oracle as 'ListAgg'

Hi All,
if we give input as '1,2,3,4,5'
to get output as,
1
2
3
4
5
but there is a function for vice versa, listagg, just as like that I want to find out, if it is there any?Thanks,

UNPIVOT
http://www.oracle.com/technology/pub/articles/oracle-database-11g-top-features/11g-pivot.html
Edited by: Sven W. on Jul 29, 2010 2:00 PM
After reading your post the third time I'm still not clear what you want.
Well there is a ListAgg function in Oracle. Do you want that?
http://www.oracle.com/technetwork/oramag/2009/09-nov/o69asktom-089919.html
Edited by: Sven W. on Jul 29, 2010 2:01 PM

Similar Messages

  • Any financial Functions in oracle?

    I need some statistical and financial formulas such as NPV, IRR etc and many more such functions to handle financial applications. Does oracle provide such builtin functions as in excel?????
    Plz help me .....

    Hi, Suman
    There are several statistical functions in Oracle (you can check the documentation), but not those you mention.
    You can create your own functions using PL/SQL (and Java, I believe), or you can invoke Excel from Oracle Forms using OLE2 methods or DDE conversation. You can find examples in the Forms Demos CD.
    Hope this helps,
    Pedro

  • Is there any predefined functions to get the current month info?

    Hi,
    I have a business rule which is used to calculate the budget of current month. Right now, I set the current month as a variable, which will need to be changed every month, I know it's stupid, I am new to this area, so I am thinking is there any better way to do this?
    Any inputs is appreciated.
    Thanks
    Tony

    Using substitution variables for current month is perfectly acceptable and widely used.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Hash function in Oracle

    Hi all,
    SELECT HashBytes( 'md5', '1234' )
    --returns 0x81DC9BDB52D04DC20036DBD8313ED055
    The above is in sqlserver do we have any such function in Oracle,
    I have to compare the data in sqlserver with Oracle, I know we have the above function
    in sqlserver would like to know, what is the equivalent function in Oracle.
    Else if any of u have better Idea for comparasion. plz let me know.
    Thanks in Advance.

    AAK 460425 wrote:
    Thanks, I was not knowing sys is the owner,
    Is there any more argument I need to pass
    select dbms_crypto.hash('HELOO') from dual;
    wrong number or type of argument in call to hashExample:
    SQL> select dbms_crypto.hash(utl_raw.cast_to_raw('HELLO'),3) from dual;
    DBMS_CRYPTO.HASH(UTL_RAW.CAST_TO_RAW('HELLO'),3)
    C65F99F8C5376ADADDDC46D5CBCF5762F9E55EB7
    SQL>http://www.morganslibrary.org/reference/dbms_crypto.html

  • Function in oracle to find number of occurances of a character in a string

    hi,
    is there any function in oracle to find the number of ocurrances of a character in a string ?
    or is there any simple way of doing the same, rather than writting many lines of code as my program is already very complex.
    Maria

    Hi Maria,
    I don't know of such a function in Oracle, but maybe you could use this:
    length(search_string) - length(replace(search_string, character_to_be_found))
    For example: select length('Hello') - length ( replace('Hello', 'l')) from dual;
    Hope this is what you're looking for
    Danny

  • T-SQL functions in ORACLE

    Use T-SQL functions in ORACLE too, so you can write one script version that works in SYBASE, SQLSERVER and ORACLE when need to use the following functions:
    ceiling, charindex, dateadd, datediff, datename, datepart, day, db_id, db_name, getdate, host_id, host_name, left, len, month, replicate, right, space, str, str_replace, stuff, substring, suser_id, suser_name, user_id, user_name and year.
    The file [comp_tsql_ORA_schema.txt|http://forums.databasejournal.com/attachment.php?attachmentid=564&d=1258547015] creates the tablespace and schema to put the objects, and the file [comp_tsql_ORA.txt|http://forums.databasejournal.com/attachment.php?attachmentid=569&d=1259256898] creates the functions into the new schema. They will be avaliable for any schema of the oracle instance.
    Hope this help!
    Any suggestion please contact.
    aklein2003
    Edited by: user1958693 on 26/11/2009 10:16

    jgarry wrote:
    J2EE beta released around 1999. Religious programming wars far preceded that. Here's but [one example|http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/1c50bc13e9302f00/34bb8f3ac77e2388?q=programming+language+religion#34bb8f3ac77e2388] from a quick google. I'm no longer convinced that elegance is a desirable trait for a language. So call me a heretic.
    Ever tried XLISP? :-)
    It's different. Back then it was simply the language itself. And it was not really a religious kind of battle, but more a mine-is-bigger-and-better-than-yours one.
    With Java, it is all about The Acrhitecture and the blessed language of Java. ;-)
    I wouldn't so much blame J2EE believers for that. I think there is a fundamental complexity to web type paradigms that hasn't been described in a precise and encompassing enough manner to enable correct project planning.The basic problem is that the database is treated as a persistent storage layer only. A bit bucket. And that is exactly what a database is not.
    But as it is used that, loads of database features now need to be duplicated in the application layer. Which is done. Very poorly.
    Heck, I've even been told that J2EE's 3-tier architecture is not client server. Such ignorance is really unbelievable. Or is it pure stupidity?Until you just made me look it up, I would have thought that too, I'm sure I saw client/server defined as two-tier in the last century. But I have much more stupid misdefinitions to deal with on a daily basis, simply from the multiplicity of paradigms. I tend to retreat into my shell. Hehehe. Know that feeling... These days I rather run away, or set shields to full power, than try to get in yet another frustrating, fruitless and futile discussion with a Java head about the wonders of the J2EE architecture. Or trying to explain that this "new" architecture is predated with what we used in the 80's on mainframe systems with transaction monitors, block devices (the 80's web browsers) and databases - which software layer for software layer was almost identical to "+The Great Architecture+" of today. (and we did it without buzzwords too) ;-)
    Client-server is a software architecture and in essence describes 3 basic software components. The User Interface (UI), the Application (APP) and the Database (DB). And there are various ways to put these components together in a client-server architecture. The mistake that the Java fanbois make is thinking that client-server means having the client as the UI and APP as a single component (so-called fat client) and then the DB component as the server.
    There are numerous versions of these - including the APP component being a server component (as we now these days more commonly used in over the web).
    My beef with the J2EE "+religion+" always has been that client-server is client-server. The fundamentals stay the same.

  • Import Functionality in Oracle ADF BC with Jdeveloper 11.1.1.2

    Hi all,
    I am using Jdeveloper 11.1.1.2 and I am trying to import functionality in my application.
    I am following the steps of: http://andrejusb.blogspot.com/2008/07/import-functionality-in-oracle-adf-bc.html
    I have 2 data model and I would like to import the functionality of one data model, in the other.
    My problem is when I tried: myModel2-->right click-->project properties-->deployment-->edit
    I don't see nothing to filter myModel2, I see only Library Dependencies, Connections, JAR Options ADF Validation.
    If I tried : myModel2-->right click-->project properties-->deployment-->new-->filters
    I see only the folders: Merged Contents of this file Group's contributor, .data, 00000000
    But I can't see the folders I have (mypackage.test.model.entities).
    Where I can found them? Is there a workaround?
    Any suggestions?
    Thanks
    Andrea

    Ok, but I taught that after importing myModel2 in myModel1, Jdeveloper realise a merge and it visualizes a unique package, even if it is splitted on two or more projects/models.
    So that, it seems to me this procedure is useful for importing jar file, but not for splitting a very big project in a lot of smaller projects, doesn't it?
    Thanks for your opinion
    Andrea

  • Find Menus & Function In oracle apps

    Hello Experts,
    I am searching for the menus and function in oracle apps to enable/disabled the functionality for a specific responsibility.
    Is there any way through which we can find a function or menus in a effective way.
    Thanks,
    Atul Ramteke

    I am searching for the menus and function in oracle apps to enable/disabled the functionality for a specific responsibility.
    Is there any way through which we can find a function or menus in a effective way.What do you mean? You can get the menu attached to the responsibility from query it from System Administrator responsibility and find all the functions/submenus which are attached to it.
    If you want to get the same from the backend, please see:
    Checking Functions Associated with a User Menu or a Responsibility [ID 948512.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Menu+AND+Tree+AND+Query&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Converting the iif function in MS Access97 to an user defined function in Oracle

    Hi ,
    I have a problem here we are working with Visual Basic 6.0(ADOs 2.5) with Oracle 8i release 2. we have some queries stored in the tables which contains the iif function of MS Access 97 do we have a similar built in function in Oracle which replaces this iif function of Ms Access 97.
    we cannot use decode (built in function) of oracle b'cos it cannot be used in a where clause and we cannot write a user defined function also because it cannot be generalized for use b'cos sometimes we use
    field names and sometimes values as expression in the iif functions
    If anybody could suggest me some idea
    please mail me at [email protected]
    with best regards
    Jai

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jai:
    Hi ,
    I have a problem here we are working with Visual Basic 6.0(ADOs 2.5) with
    Oracle 8i release 2. we have some queries stored in the tables which contains the iif function of MS Access 97 do we have a similar built in function in Oracle which replaces this iif function of Ms Access 97.we cannot use DECODE (built in function) of oracle b'cos it cannot be used in a where clause and we cannot write a user defined function also because it cannot be generalized for use b'cos sometimes we use field names and
    sometimes string values as expression in the iif functions. is there any other built in function ? can anybody suggest me some idea
    please mail me at [email protected]
    regards
    Jai<HR></BLOCKQUOTE>
    Hi,
    You still can use the seccond approach - with a udf IIF() that you place in a package and OVERLOAD it. See the documentation for limitations of Overloading
    Overloading permits you to declare several functions with the same name but havind different behaviours depending on the number and type of the parameters.
    George

  • Using a C function in Oracle

    Hi,
    I have a field in my table that stores an ID which is encoded using a C function. (third party database)
    I have also been provided the C function that decodes that field to display the actual value. I have compiled this code using Visual Studio .Net 2003 to a dll file, but do not know how to use it in Oracle. Or are there other ways to use this decode function in Oracle?
    I am on 9i database, Windows 2003 server.
    Any help is appreciated.
    Thank you.

    Hi, see:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9087161189226

  • Encode function in Oracle

    Hi,
    In MySQL while inserting data encode function can be used along with a user key to encode the data. Also decode function can be used to decode the data during selection. Is there any equivalent function available in Oracle for encoding and decoding.
    Please advice,
    Thanks,
    Smitha

    Only for your information. DECODE is not a function to encript or decrypt data. Decode is a comparation function. It is a other way to evaluate IF-THEN-ELSE condition.
    Bye, Aron

  • TO_CHAR FUNCTION IN ORACLE FORM

    HI,
    Table called A has column name col1
    col1
    12563.563
    52685.563
    05263.540
    I would like to use SUBSTR(col1,2,6) for insert values from A table to B table by Oracle form and following values are inserted in B table
    2563.5
    2685.5
    263.4
    If I use SQLPLUS it is inserting as my requirement like
    2563.5
    2685.5
    5263.4
    Third row should be 5263.5 instead of 263.4. In Oracle form may have internal coversion function to convert character value to number values, I do not want to convert the value to number. Both table columns are varchar2 column.
    What is the equal to_char function in Oracle form. If it is NLS_NUMERIC_CHARACTERS, please what are the parameters to be passed along with column.
    Thanks in advance
    Saravanan.

    Hello,
    If you don't want to take account any calculation on the decimal part, you could consider the Trunc() function instead of the To_Char():
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> select to_char(52685.563,'00000000.0'), trunc(52685.563,1) from dual
      2  /
    TO_CHAR(526 TRUNC(52685.563,1)
    00052685.6            52685.5
    SQL> Francois

  • DB2 DIGIT  FUNCTION IN ORACLE

    What is the DB2 DIGIT FUNCTION equivalent in ORACLE database. We have done a migration from db2 to oracle and many programs just fails where I encounters digit function. Is there any workaroud or function present in oracle database which makes the program working.
    Just share your knowledge .
    [email protected]

    Addendum ...
    OK I found what the DIGIT function does.
    I am not sure if there is a function in Oracle that maps directly to DIGIT function in DB2
    but you can do something like this:
    select lpad(replace(to_char(abs(n)),'.'),
    (select to_number(data_precision) from user_tab_columns where table_name = 'A' and column_name = 'N'),'0')
    from a
    In the SQL above n is the column in table A. Data_precision column gets the size of the column.
    Option 2:
    You could write your own function in Oracle to do what the SQL above does
    create or replace function digit (col_val in number, col_name IN varchar2, tab_name IN varchar2) return varchar2
    as
    v_val varchar2(100);
    v_prec number;
    begin
    select to_number(data_precision) into v_prec from user_tab_columns where table_name = upper(tab_name) and column_name = upper(col_name);
    v_val := lpad(replace(to_char(abs(col_val)),'.'),v_prec,'0');
    return v_val;
    end;
    Then use the function as follows:
    select digit(n,'N','A') from a
    Shakti
    http://www.impact-sol.com
    Developers of Guggi Oracle - Tool for DBAs and Developers
    Message was edited by:
    skgoel

  • NPV Function in oracle

    Hi guys
    I am using the below code For NPV ,But i dont see any result,could you guys help me out.....
    DEFINE RPT DIMENSION TEXT
    MAINTAIN TLGT_RPT ADD 'APRV_AMT' 'CAP_APRV_AMT' 'EXP_APRV_AMT'
    DEFINE cflow VARIABLE DECIMAL <RPT RPT_ID>
    declare
    value number;
    begin
    value:= @NPV(cflow, .08, RPT_ID);
    dbms_output.put_line(value);
    end;
    Am i missing any thing Pls rectify.
    Thanks
    Robert

    This appears to have nothing to do with APEX and is therefore off-topic for this forum.
    Robertsondas wrote:
    DEFINE RPT DIMENSION TEXT
    MAINTAIN TLGT_RPT ADD 'APRV_AMT' 'CAP_APRV_AMT' 'EXP_APRV_AMT'
    DEFINE cflow VARIABLE DECIMAL <RPT RPT_ID>
    This is not any Oracle syntax that I recognise. Where does this come from?
    declare
    value number;
    begin
    value:= @NPV(cflow, .08, RPT_ID);
    @NPV is an Excel function and is not available as a built-in function in Oracle. It would have to be created as a user-defined PL/SQL subprogram using the requisite algorithm.
    dbms_output.put_line(value);
    end;
    DBMS_OUTPUT is generally not a suitable method for returning or presenting information in a production system, particularly not in APEX.

  • How to execute a function in oracle plsql object, when object dies

    I have a plsql object with a member function as exec_last.
    I want this procedure to be called when plsql object is cleaned or when the session hosting this object dies.
    In C, we have a system call as atexit(). Is there any such feature in Oracle 10g or any workaround using embedded java.
    This feature is required to flush the contents stored in plsql table in the object to the database, when program exits.
    Thank you,
    Warm Regards,
    Navin Srivastava

    navsriva wrote:
    Is there any better way to implement this in memory caching. What is the buffer cache of Oracle? It is exactly that - a memory cache for data blocks. Both new blocks (created by inserting new rows) and existing blocks (used by selects, updates and deletes, and re-used (freespace) by inserts).
    The Oracle buffer cache is a very mature and sophisticated cache. Attempting to do it "+better+" than the db buffer cache in another software layer (like PL/SQL) is mostly a waste of time and resources.. and invariable introduces another s/w layer that simply increases the number of moving parts. This in turn usually means increased complexity and slower performance.
    Why use bulk processing in PL/SQL? The basic and fundamental answer to that is to decrease the context switching between the PL engine and SQL engine.
    When running PL code to insert data into SQL, that data needs to be passed to the SQL engine, the PL engine needs to perform a context switch to the SQL engine to allow it to process that data and perform the SQL instruction.
    If there are a 1000 rows to inserts, it means a 1000 context switches.
    Bulk processing makes the "+communication/data pipe+" between the two bigger. Instead of passing a single row's data to the SQL engine via a context switch, a bulk collection/array of a 100 rows is passed. There is now a mere 10 context switches required to push that 1000 rows from the PL engine to the SQL engine.
    You can do the same from any other SQL client... (remember, that PL itself is also a SQL client). You can, using C/C++ for example, do the exact same thing. When passing row data to the SQL engine to insert, pass a collection of a 100 rows instead of the data for a single row.
    The exact same benefits result as in PL/SQL. A bigger communication pipe, allowing more data to be transferred to/from the SQL engine, resulting in less context switching.
    Of course, a context switch ito C/C++ is a lot more expensive than in PL/SQL - as the PL engine sits in the very same physical process as the SQL engine. Using C/C++, this will usually be a separate process communicating with the SQL engine process across the network.
    The same applies to other languages, like Java, C#, Delphi, Visual Basic and so on.
    It does not make sense to introduce another s/w layer, the PL/SQL engine, and have the client "+insert+" rows into its memory structures... and then use the PL engine to "+flush"+ that to the SQL engine via a bulk process command.
    It will be faster, and more scalable, having the client language using bulk processing directly and dealing with the SQL engine directly.
    Simple example. What does the SQL*Loader program (written in C) use? It does not use PL as a proxy for moving data from a CSV file into a SQL table. It calls SQL directly. It uses bulk processing. It is very fast at loading data.
    There is an exception to this. When PL is used as a business processing and validation layer. Instead of the client code implementing that logic, it is done using PL. The client then no longer will manually add an invoice to the INVOICES table for example. It instead calls the AddNewInvoice PL/SQL procedure - and this procedure does all. It checks the customer code as valid. Ensures that there's stock available of the products being ordered on the invoice. Etc.
    But in this scenario, PL is not used a secondhand "buffer cache". It is used for what it has been designed for - a proper application layer inside the database.

Maybe you are looking for

  • Report to send a List via mail

    Hi everybody, at the moment we hava a report which we have to start every day to generate a customer List. Via SAP Office we can send this list via email to a specific person. Now I like to automate this report and start it as a job which automativly

  • Using Transient Property as display-property

    Hi, is transient property should not be used as display-property in item descriptor? we were using it in ATG 9.2 somehow it is not working in ATG 10.2. if we use transient property as display property in BCC we are getting exception that java.lang.Cl

  • The event library and multiple users in the classroom

    Is there any way I can stop the event library loading old footage or footage from another project in imovie. Is there any way i can have 3 or 4 movies on the go in separate files. I have ten macbooks for my class of thrity kids. We have two users on

  • ADF Create Form - will compensate

    I figured in as much as I am willing to learn and transition to ADF, I am not going to waste any more time on this create form. I am not sure if this is the right forum for this, but I am willing to compensate somebody who's willing to develop someth

  • LOG_ARCHIVE_MAX_PROCESS

    Hii, 1) What should LOG_ARCHIVE_MAX_PROCESS be set when setting up DG(11.2.0.2)? 2) Does increasing LOG_ARCHIVE_MAX_PROCESS fasten up the apply process? 3) Logs at standby db are being made by LGWR not by ARCH. Would it still help us increasing the n