Compiling WM_CONCAT function in Oracle database

There is something that I wanted to know about Wm_concat. I read it one of the posts across the forum, that wm_concat, being a non-documented function, isn't installed in a particular database and user can possibly install it later(wm_concat fucntion not wrking in 11g...
I came across another post that had some source code for doing the same(wm_concat fucntion not wrking in 11g...
code:
SQL> CREATE OR REPLACE
type WM_CONCAT_IMPL wrapped
a000000
1
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
d
270 160
bg9hz+fBwa888VEZGViHFs/oOP0wg433f64df3QCWE7VehmhTFcUe3y+JrsniV3cSuvmnE3g
Y93dtR+cCsU1N+UQDGbtzhCf2HIdr8lPzfgF2bmCTvmGlHQbTAjTftNrDq3p093ncwb32OyX
3ZFDTeH2jpjm3uWYyT8kZBfJIYxRwgLfRApoW32cpy0eRnvDBt2XfTAMXKCSNnqSoTiGA83W
6deKW+rWyBu9L/EPyFkmQZeBncNsiNDF8fa1Sm6vdQiEanlCQnaPJ11a0na8hK6psDSaey+x
fdMupCwSvg6gMrSV4QCguhOCqW2AmxRVMqpXJootPpTBxBFZc7hORGbriUI=
Type created.
SQL> CREATE OR REPLACE function wm_concat wrapped
a000000
1
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
8
58 96
CuW1MAfZPVR6NOnXKVmXY2o9pswg8eZgcfLCNLXhZy8K7/cgzcVrPnfMPnx3TAM7h0ZSXD
j57Asr2ym9ZtFldFmFu+RdpAU8VGORKSvtVG+DmAOR4C+NTa+Pit2kDbEpI5zhZUgqameSkE
DQ==
Function created.
I wanted to know, if this solution of compiling the above code works well. Also, iis wm_concat not supported in 11g?

WM_CONCAT is still an undocumented function and shouldn't be used. If you're on 11g then you can use the new (and supported) LISTAGG function which works better anyway.
DO NOT USE undocumented functionality, even if you've obtained the wrapped source code for it (how do you know that's not some fake code someone's wrapped that could cause malicious damage?)
Even Tom Kyte tells you not to use undocumented functions such as WM_CONCAT
Re: DISTINCT not working with  wmsys.wm_concat

Similar Messages

  • Mail function in oracle database ?

    To activate mail function in oracle database what all procedures or steps needed to be done ?
    Regards,
    Amit

    In oracle 10g you can configure database with EM using dbca, where you can specify SMTP server to enable email notifications.
    Check out documentation(Management options while creating database with dbca):
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14196/install003.htm#BABJHIFI

  • ODSI service using function from oracle database

    Hi ,
    I need to create a ODSI service using function from oracle database.
    I am not sure how to create a Physical Layer and Logical Layer using the function fron db.
    Kindly provide a sample . I need It ASAP. Thanks in advance.
    Regards,
    Tara

    Here's what you do.
    Create New Physical Data Service -> Relational -> MyDataSource -> Table -> SomeTable ... finish the wizard.
    So now you have a Physical Data Service that represents a database table.
    Create New Physcial Data Service -> Relational -> MyDataSource (the same one as above) -> Database Function -> Enter UPPER for the Function name, enter MyUpper fro the XQuery Function. Finish the Wizard (use something like MyUpperDs for the ds name).
    Open MyUpperDs. Right-click -> Edit Signature on MyUpper. Change the ReturnType to string, change the Occurrence to Zero or One.
    Add a parameter, change the Type to string, change the Occurrence to Zero or One.
    Save.
    Now, open the first ds you made SomeTable.ds (whatever). Run it in the test view.
    Go to the Overview tab. Create New Operation. Give it the name SOMETABLE_UPPER. Save it.
    Go to the Query Map tab, open SOMETABLE_UPPER. Drag and drop SOMETABLE (the system-generated function into the mapper. It will show a dotted line from SOMETABLE to the Return. Now drag-and-drop the SOMETABLE to the top-level element of the return type, it will show solid lines from each element in SOMETABLE to each element in the return type.
    Now, drag-and-drop MyUpperDs.MyUpper into the Query Mapper. Edit the source, find where it added the line "for $x in myd:MyUpper()" and delete that line.
    Change a line that simply returns a value to use your function, for example, change
    <FIRST_NAME>{fn:data($CUSTOMER/FIRST_NAME)}</FIRST_NAME>
    to
    <FIRST_NAME>{myd:MyUpper(fn:data($CUSTOMER/FIRST_NAME))}</FIRST_NAME>
    Click on the Plan tab and Show Query Plan. You will see that in the query plan, it is using the database UPPER function where you specified MyUpper.
    Go to the Test View and run it.
    I used the RTLCUSTOMER table in cgDataSource
    xquery version "1.0" encoding "UTF-8";
    (::pragma xds <x:xds xmlns:x="urn:annotations.ld.bea.com" targetType="t:CUSTOMER" xmlns:t="ld:physical/CUSTOMER">
    <creationDate>2010-10-14T13:09:54</creationDate>
    <relationalDB name="cgDataSource" providerId="Pointbase"/>
    <field xpath="CUSTOMER_ID" type="xs:string">
    <extension nativeXpath="CUSTOMER_ID" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="32" nativeFractionalDigits="0" nativeKey="true"/>
    <properties nullable="false"/>
    </field>
    <field xpath="FIRST_NAME" type="xs:string">
    <extension nativeXpath="FIRST_NAME" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="64" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="LAST_NAME" type="xs:string">
    <extension nativeXpath="LAST_NAME" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="64" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="CUSTOMER_SINCE" type="xs:date">
    <extension nativeXpath="CUSTOMER_SINCE" nativeTypeCode="91" nativeType="DATE" nativeSize="10" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="EMAIL_ADDRESS" type="xs:string">
    <extension nativeXpath="EMAIL_ADDRESS" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="32" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="TELEPHONE_NUMBER" type="xs:string">
    <extension nativeXpath="TELEPHONE_NUMBER" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="32" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="SSN" type="xs:string">
    <extension nativeXpath="SSN" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="16" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="BIRTH_DAY" type="xs:date">
    <extension nativeXpath="BIRTH_DAY" nativeTypeCode="91" nativeType="DATE" nativeSize="10" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="DEFAULT_SHIP_METHOD" type="xs:string">
    <extension nativeXpath="DEFAULT_SHIP_METHOD" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="16" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="EMAIL_NOTIFICATION" type="xs:short">
    <extension nativeXpath="EMAIL_NOTIFICATION" nativeTypeCode="5" nativeType="SMALLINT" nativeSize="5" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="NEWS_LETTTER" type="xs:short">
    <extension nativeXpath="NEWS_LETTTER" nativeTypeCode="5" nativeType="SMALLINT" nativeSize="5" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="ONLINE_STATEMENT" type="xs:short">
    <extension nativeXpath="ONLINE_STATEMENT" nativeTypeCode="5" nativeType="SMALLINT" nativeSize="5" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="LOGIN_ID" type="xs:string">
    <extension nativeXpath="LOGIN_ID" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="50" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <key name="CUSTOMER_0_SYSTEMNAMEDCONSTRAINT__PRIMARYKEY" type="cus:CUSTOMER_KEY" inferredSchema="true" xmlns:cus="ld:physical/CUSTOMER"/>
    </x:xds>::)
    declare namespace myd= "ld:physical/MyDs";
    declare namespace f1 = "ld:physical/CUSTOMER";
    import schema namespace t1 = "ld:physical/CUSTOMER" at "ld:physical/schemas/CUSTOMER.xsd";
    import schema "ld:physical/CUSTOMER" at "ld:physical/schemas/CUSTOMER_KEY.xsd";
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="read" isPrimary="false" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare function f1:CUSTOMER() as schema-element(t1:CUSTOMER)* external;
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="create" isPrimary="true" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare procedure f1:createCUSTOMER($p as element(t1:CUSTOMER)*)as schema-element(t1:CUSTOMER_KEY)* external;
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="update" isPrimary="true" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare procedure f1:updateCUSTOMER($p as changed-element(t1:CUSTOMER)*) as empty() external;
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="delete" isPrimary="true" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare procedure f1:deleteCUSTOMER($p as element(t1:CUSTOMER)*) as empty() external;
    (::pragma function <f:function kind="read" visibility="public" isPrimary="false" xmlns:f="urn:annotations.ld.bea.com"/>::)
    declare function f1:CUSTOMER_UPPER() as element(f1:CUSTOMER)*{
    for $CUSTOMER in f1:CUSTOMER()
    return
    <t1:CUSTOMER>
    <CUSTOMER_ID>{fn:data($CUSTOMER/CUSTOMER_ID)}</CUSTOMER_ID>
    <FIRST_NAME>{myd:MyUpper(fn:data($CUSTOMER/FIRST_NAME))}</FIRST_NAME>
    <LAST_NAME>{fn:data($CUSTOMER/LAST_NAME)}</LAST_NAME>
    <CUSTOMER_SINCE>{fn:data($CUSTOMER/CUSTOMER_SINCE)}</CUSTOMER_SINCE>
    <EMAIL_ADDRESS>{fn:data($CUSTOMER/EMAIL_ADDRESS)}</EMAIL_ADDRESS>
    <TELEPHONE_NUMBER>{fn:data($CUSTOMER/TELEPHONE_NUMBER)}</TELEPHONE_NUMBER>
    <SSN?>{fn:data($CUSTOMER/SSN)}</SSN>
    <BIRTH_DAY?>{fn:data($CUSTOMER/BIRTH_DAY)}</BIRTH_DAY>
    <DEFAULT_SHIP_METHOD?>{fn:data($CUSTOMER/DEFAULT_SHIP_METHOD)}</DEFAULT_SHIP_METHOD>
    <EMAIL_NOTIFICATION?>{fn:data($CUSTOMER/EMAIL_NOTIFICATION)}</EMAIL_NOTIFICATION>
    <NEWS_LETTTER?>{fn:data($CUSTOMER/NEWS_LETTTER)}</NEWS_LETTTER>
    <ONLINE_STATEMENT?>{fn:data($CUSTOMER/ONLINE_STATEMENT)}</ONLINE_STATEMENT>
    <LOGIN_ID?>{fn:data($CUSTOMER/LOGIN_ID)}</LOGIN_ID>
    </t1:CUSTOMER>
    xquery version "1.0" encoding "UTF-8";
    (::pragma xfl <x:xfl xmlns:x="urn:annotations.ld.bea.com">
    <creationDate>2010-10-14T13:10:45</creationDate>
    <customNativeFunctions>
    <relational>
    <dataSource>cgDataSource</dataSource>
    </relational>
    </customNativeFunctions>
    </x:xfl>::)
    declare namespace f1 = "ld:physical/MyDs";
    (::pragma function <f:function visibility="protected" kind="library" isPrimary="false" nativeName="UPPER" xmlns:f="urn:annotations.ld.bea.com">
    <nonCacheable/>
    </f:function>::)
    declare function f1:MyUpper($arg0 as xs:string?) as xs:string? external;
    <cus:CUSTOMER xmlns:cus="ld:physical/CUSTOMER">
    <CUSTOMER_ID>CUSTOMER1</CUSTOMER_ID>
    <FIRST_NAME>JACK</FIRST_NAME>
    <LAST_NAME>Black</LAST_NAME>
    <CUSTOMER_SINCE>2001-10-01</CUSTOMER_SINCE>
    <EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
    <TELEPHONE_NUMBER>2145134119</TELEPHONE_NUMBER>
    <SSN>295-13-4119</SSN>
    <BIRTH_DAY>1970-01-01</BIRTH_DAY>
    <DEFAULT_SHIP_METHOD>AIR</DEFAULT_SHIP_METHOD>
    <EMAIL_NOTIFICATION>1</EMAIL_NOTIFICATION>
    <NEWS_LETTTER>0</NEWS_LETTTER>
    <ONLINE_STATEMENT>1</ONLINE_STATEMENT>
    </cus:CUSTOMER>
    .

  • Calling SQL Server Function from Oracle Database link

    Hi ,
    i have some data from a old SQL server i would i can access with a database link but i cant call function from my database link.
    i would like to do something like
    @SPAN_PROD = Database link
    _EnerttObtApReelBassSys is a Table function from my SQL server
    SELECT *
    FROM "_EnerttObtApReelBassSys('20120504',4,1)"@SPAN_PROD
    WHERE DateEffectiveDebut <= GetDate()
    AND DateEffectiveFin > GetDate()
    any help ?
    Thnx

    951879 wrote:
    I have a SP in SQL Server which will return a Result Set.
    My requirement is to call that procedure in ORACLE using DB Link and insert that resultset(Data) in the temp table.First you need to setup Oracle to SQL Server connectivity. To do that you can either use HS - heterogeneous connectivity which comes for free or use Oracle Transparent Gateway which is not free. HS uses ODBC, so if your Oracle database in not on windows, you'll have to get ODBC SQL Server driver for Unix/Linux (e.g. from EasySoft). Since SQL Server selecting from table function syntax is different from Oracle's you will have to, if you use HS, to use DBMS_HS_PASSTHROUGH package. I never worked with Oracle Transparent Gateway to SQL Server, so I don't know if and how it supports selecting from SQL Server table function.
    SY.

  • Availability of stdnormal_inv  PL/SQL function in Oracle Database

    I am in need of stdnormal_inv statistical function to calculate the Quantile of Standard Normal Distribution for safety stock computation in MRP module.
    If anyone knows whether any pl/sql code exists to compute stdnormal_inv, please help me with the information. We are using Oracle 7.3.3 database.
    Many Thanks,
    Ravi.

    You can use the UTL_FILE package.
    In order to access directories on your database server you must
    enable the access in the INIT.ORA file with one or more utl_file_dir entries.
    HTH, Robert

  • Raw to date function in oracle

    Hi..
    I would like to know the details and usage of Raw to date function in oracle database.Could some one let me know the function details?

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> set serveroutput on
    SQL> DECLARE
      2   rv RAW(32) := '786B060818023A';
      3   dt DATE := NULL;
      4  BEGIN
      5    dbms_stats.convert_raw_value(rv, dt);
      6    dbms_output.put_line(TO_CHAR(dt, 'DD-MON-YYYY'));
      7  END;
      8  /
    08-JUN-2007
    PL/SQL procedure successfully completed.
    SQL>Regards,
    Jo
    PS: This is not my own example. I don't recollect the link I got this example from. Will post the link if I come across it again. I think its www.psoug.org (not sure)

  • Trying to compile a function

    Hi,
    I'm trying to compile a function using Oracle Enterprise Manager but I can't. It's possible to do it? If so, how? Or if it's no possible, how can I do it?
    I created the function with Enterprise Manager and was OK. But now the problem is to execute the function if it's correctly compiled.
    Thanks.

    You should use paranthesis for your function if you have parameters.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function temp_function
      2  return number
      3  as
      4  begin
      5    return 1;
      6* end;
    SQL> /
    Function created.
    SQL> select temp_function from dual
      2  /
    TEMP_FUNCTION
                1
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function temp_function1(val_1 varchar)
      2  return number
      3  as
      4  begin
      5     if val_1 = 'A' then
      6        return 0;
      7     else
      8        return 1;
      9     end if;
    10* end;
    SQL> /
    Function created.
    SQL> select temp_function1('K') from dual
      2  /
    TEMP_FUNCTION1('K')
                      1
    SQL> Cheers
    Sarma.

  • VB6 source code cannot connect to Oracle database after compile to file.exe

    Hi All,
    I have a problem about VB6 connect with Oracle database. It can connect as normal when run on VB program. After compiled to file.exe and execute, it cannot connect to Oracle database. What's going on ? Please advise? Thank you.
    Here is sample of my code connection.
    Option Explicit
    Private wsData As New ADODB.Connection
    wsData.ConnectionString = _
    "Provider=MSDAORA.1;User ID=lsp;Password=lsp2007;Data Source=prd01;Persist Security Info=False"
    wsData.Open
    End sub
    Rgads,
    Ats.

    Hi,
    I believe you're in the wrong forum, this forum is for Oracle Application Express.

  • How to Oracle Database Function in OBIEE Administration Tool

    Hi All,
    I want to use a Oracle Database Function in as a column in OBIEE (BM, Presentation Model). Can anybody has done this inOBIEE. Any pointers to this is much appreicated.
    Thanks,

    Hi user7417334,
    You cannot use any formulas in the presentation layer (not that I know of). But you can definitely use oracle database functions in the BMM layer.
    You want to use the EVALUATE function. It works like this:
    e.x. EVALUATE( 'TO_DATE(%1,%2)' AS DATE, '12/31/2009', 'MM/DD/YYYY')
    Generic Version: EVALUATE( '<FUNC>' AS <DATATYPE>, VALUE1,VALUE2,etc)
    FUNC) Is the syntax for the function you are calling. Any parameters have to be replaced by %<number>, where number refers to the order in which you specify your parameters.
    DATATYPE) The datatype that the function will evaluate to. In this case, DATE.
    VALUE1) The latter part of the formula is a comma separated list of all the parameters used in the function. In this case, it's the date I want to cast
    VALUE2) This is the second parameter. You need as many as you referenced in your function. In this case, it's the date format.
    Good luck and if you found this post useful, please award points!
    best regards,
    -Joe

  • Execute Function in external ORACLE Database

    Hi Gurus,
    I'm working with Native SQL, trying to execute a function (NOT a procedure) present in an Oracle Database.
    I have the DBCO table ready and the conection is working fine, but when I want to execute the function I get the following error (with short dump):
    Database error text: "ORA-00900: invalid SQL statement"
    Database error code: 900
    Triggering SQL statement:
    :VALIDO := cai_valido_i   ? , ? , ? , ? , ? , ? )"
    Looks like this is a syntax error when i'm trying to use the function. I try to call the function with EXECUTE PROCEDURE, but another error appear, saying that the procedure doesn't exist.
    This is the function that I need to call in Oracle:
    cai_valido_i
       (ccai in number,
        ccuit in number,
        cfecha in date,
        ccod_tc in number,
        cpto_vta in number,
        cnro in number)   return number
    I Hope somebody can help me with this.
    Kind regards,
    Roberto.-

    Not sure how to call Functions but I executed procedures as below:
      EXEC SQL PERFORMING <SAP_SUBROUTINE>.
        SELECT <PROCEDURE>(
               :<IN_PAR1>,
               :<IN_PAR2>,
               :<IN_PAR3>)
          INTO :<OUT_PAR1>
          FROM DUAL
      ENDEXEC.
    Thnaks,
    Shashi Reddy

  • Database Aggregate Functions and Oracle Discoverer

    Hello Guys.
    There are a lot of aggregate function inside the database, unfortunatelly some of them are not directly accesible from Oracle Discoverer.
    For example :
    STATS_BINOMIAL_TEST
    STATS_CROSSTAB
    STATS_F_TEST
    STATS_KS_TEST
    STATS_MODE
    STATS_MW_TEST
    STATS_ONE_WAY_ANOVA
    STATS_T_TEST_*
    STATS_WSR_TEST
    What is the best way to incorporate this kind of function in Oracle Discoverer ?
    Thanks
    Ramiro Ortiz Rios

    While Discoverer today is unable to recognize these Oracle Database functions, we are looking at adding this capability into the product. If you think this is important, please take the poll at http://oraclebi.blogspot.com/2006/04/must-have-in-discoverer.html
    Also, if you can spare a few minutes, do send me a mail at abhinav.oracle at gmail.com with a brief description of a use case that describes where and how these functions would be used.
    Thanks
    Abhinav
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    Documentation: http://docs.oracle.com/
    Oracle BI Suite EE: http://www.oracle.com/technology/products/bi/enterprise-edition.html
    Oracle BI Suite SE: http://www.oracle.com/technology/products/bi/standard-edition.html
    Oracle BI Suite SE One: http://www.oracle.com/technology/products/bi/standard-edition-one.html
    Discoverer: http://www.oracle.com/technology/products/discoverer/
    BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
    BI Blog: http://oraclebi.blogspot.com/
    Blogs: http://blogs.oracle.com/

  • Does ORACLE functions work with Oracle Database 10G

    Hi,
    I am wondering if ORACLE functions work with Oracle Database 10G or is it mandatory to use OCI functions?
    Thanks in advance!

    I was able to run a simple query with ora_* functions using 10g on Windows.
    The Oracle OCI calls used by PHP's ora extension still exist in the Oracle 10g libraries
    But I cannot recommend this obsolete extension.
    -- cj

  • DATEDIFF function work in Oracle database or not ?

    Hai all,
    I like to know whether DATEDIFF function work in Oracle database or not.

    And to add to what Stew and Ranit have said... if you need the months between two dates, there's a special function for that...
    SQL> select months_between(sysdate, date '2011-04-18') from dual;
    MONTHS_BETWEEN(SYSDATE,DATE'2011-04-18')
                                    18.37051So, number of years between two dates can also be achieved with the same function and dividing by 12...
    SQL> select months_between(sysdate, date '2011-04-18')/12 from dual;
    MONTHS_BETWEEN(SYSDATE,DATE'2011-04-18')/12
                                     1.53087867

  • Oracle Database Express Edition PROMPT function

    Is it possible to use the PROMPT function on oracle express edition? I cant get mine to work as it says invalid SQL statement
    PROMPT Enter required project code
    Accept projectcode PROMPT "Enter a projectcode...:"
    SELECT projectcode, description, clientno
    FROM project
    WHERE projectcode = &projectcode

    Hi,
    Please convert the following oracle code into Teradata...
    SET HEAD OFF;
    SET FEEDBACK OFF;
    SET LINESIZE 32767;
    SET PAGESIZE 50000;
    PROMPT CAMPAIGN NM,CAMPAIGN CD,FLOWCHART NM,CELL CD,COUNT
    SELECT
    '"'||campaign_nm||'","'||
    campaign_cd||'","'||
    flowchart_nm||'","'||
    cell_cd||'",'||
    COUNT(*)
    FROM cop_unica_stage_adm
    WHERE campaign_cd ='&campaign_cd'
    AND flowchart_nm ='&flowchart_nm'
    GROUP BY '"'||campaign_nm||'","'||
    campaign_cd||'","'||
    flowchart_nm||'","'||
    cell_cd;
    Thanks in advance...

  • Oracle jpublisher bug or bug in Oracle database 10g ?

    Hello,
    i`m trying to call web service from pl/sql in oracle database 10g v10.1.0.2.0.
    I`ve used this tutorial:
    http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
    used oracle as 10.1.3 web service callout pack for 10g v10.1
    and jpublisher 10.2, which has generated pl/sql wrapper package and proxy classes.
    I`ve imported with loadjava dbwsclientws.jar and dbwsclientdb101.jar into my user called wscallout.
    Also imported proxy classes.
    When i`ve tried to call pl/sql function, i`ve got this error:
    java.lang.VerifyError: (class: oracle/j2ee/ws/saaj/soap/SOAPDoc, method: getDocumentBuilder signature: ()Loracle/xml/parser/v2/DocumentBuilder;) Wrong return type in function
         at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:47)
         at oracle.j2ee.ws.saaj.soap.soap11.SOAPPart11.<init>(SOAPPart11.java:17)
         at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createSOAPPart(SOAPImplementation11.java:209)
         at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPPart(MessageImpl.java:415)
         at oracle.j2ee.ws.client.StreamingSender._writeRequest(StreamingSender.java:649)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:142)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
         at genproxy.runtime.ProductSynchroService_Stub.endProductConversation(ProductSynchroService_Stub:137)
         at genproxy.ProductSynchroServiceClient.endProductConversation(ProductSynchroServiceClient.java:64)
         at genproxy.ProductSynchroServiceClientJPub.endProductConversation(ProductSynchroServiceClientJPub.java:243)
    Error -29532: ORA-29532: volanie Java ukonèené nezachytenou výnimkou Java: java.lang.VerifyError: (class: oracle/j2ee/ws/saaj/soap/SOAPDoc, method: getDocumentBuilder signature: ()Loracle/xml/parser/v2/DocumentBuilder;) Wrong return type in function
    14:27:34 Execution failed: ORA-29532: volanie Java ukonèené nezachytenou výnimkou Java: java.lang.VerifyError: (class: oracle/j2ee/ws/saaj/soap/SOAPDoc, method: getDocumentBuilder signature: ()Loracle/xml/parser/v2/DocumentBuilder;) Wrong return type in function
    14:27:34 ORA-06512: na line 10
    I haven`t found anything about this issue in oracle metalink, regarding to ORA-29532.

    dude if you are using jdeveloper 10.1.3.x for development of web service the library you have loadded into database dwwsclinet etc or sopa.jar or mail .jar will not work
    for getting the output for the web services developed on jdeveloper you need following file to upload on database
    wsclient_extended for 10.1.3.x.0 where x stands for your version
    wsclient_extended.jar which can be downloaded from
    http://download.oracle.com/otn/java/oc4j/1013x0/wsclient_extended_1013x0.zip the stands for subversion
    xstands for your version
    after downloading above file upload it
    open up the socket by command
    on SYS schema
    SQL>call dms_java.grant_permission('YOUR_SCHEMA','SYS:java.net.SocketPermission','<IPaddress ofcomputer>:<portnumber>(eg 10.8.11.98:8888)','connect,resolve');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.util.PropertyPermission','*','read,write');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','createClassLoader','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','getClassLoader','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','setContextClassLoader','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','setFactory','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','setIO','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','shutdownHooks','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','accessClassInPackage.sun.util.calender','');
    Now make a jar file which contain all your class files of proxy put that jar file on database an compile that jar file on database it should work than convert it into java stored procedure and invoke that procedure
    Vishal Rijhwani
    JAVA DEVELOPER
    Message was edited by:
    user635429

Maybe you are looking for

  • PSCS3 Extended - a let down

    I purchased PSCS3 Extended because it looked like it would really be great. I'm an architect and I was really looking forward to the measurement tool... I have to measure things off of job site pics all the time. I have to say the measurement tool in

  • Can I use an external hard drive to install boot camp?

    What the question said also it'll be Windows 8.1 because that's the only one you can download from the M-soft store now.

  • Isolation level in OBIEE

    Hi Team, In RPD connection pool propertie isolation levels there will be 5 levels we can see default,dirty read,commited read,repeatable read,serializable in which cases which level we have to use.Is there is any detailed document or link please post

  • Sap batch process

    may i know what is SAP BATCH PROCESS in BW, thank you.

  • MM02 - MRP view - III

    Hi, I am  changing some of the fields in MRP view of MM02 transaction using a BDC program, while doing recording, the MRP view is of VIEW number 06 in the list of views. perform bdc_dynpro      using 'SAPLMGMM' '0070'. perform bdc_field       using '