Xcelsius with XMLA or XML Query Result Set

Hi Experts,
I want a direct connection from Xcelsius to my BW-Data. Because the new connection, coming with Fix Pack 2.1 is only avaiable for EHP 1 for NW 7.0 I tried to configure with XMLA and XML Query Result Set.
This Document tells the necessary steps: How to integrate Xcelsius 2008 with SAP NetWeaver BI without Integration Kit.pdf.
When I test my XML connection over http://<host>:<port>/TXmla/srvlet/TestXmla my Cubes will display.
So I do a Webservice-Connection with WSDL-URL. At Input-Values there are some entries like CUBE_NAME, CATALOG_NAME...
Output values arent avalible. How do I use these elements to show my Data in Xcelsius?
My Problem with the XML Query Result Set Connection is, that when I Log On to VC the following error appears:
You are not authorized to view the requested resource.
So I get the authorisationobjects: S_DEVELOP and S_RS_COMP as describe in 'How To... Resolve Visual Composer Issues'.
What values have I to enter by S_RS_COMP? And how can I enter my External Service in S_SERVICE. At the type WS the service isnt't avaiable.
Regards,
Jan

To use XMLA web service you need a wrapper function build to convert the XMLA output to the Xcelsius format. There are some documents available in SDN on how to do this.
You can use Live Office or Query as a Web service option to connect from Xcelsius to BW.
S_RS_COMP is the query ID which you are trying to access, S_SERVICE you can either give * or try to set up authorization log and see the expected value.

Similar Messages

  • Error in testing XML query result set web service

    Hi
    I was trying to test a <b>XML query result set web service</b> in BW system with tcode wsadmin but getting error like
    <b>Cannot download WSDL from http://ibmbtsb02.megacenter.de.ibm.com:8070/sap/bw/xml/soap/queyview?sap-client=001&wsdl=1.1&mode=sap_wsdl: F:\usr\sap\W70\DVEBMGS70\j2ee\cluster\server0\apps\sap.com\com.sap.engine.services.webservices.tool\servlet_jsp\wsnavigator\root\WEB-INF\temp\ws1139464945296\wsdls\wsdlroot.wsdl (The system cannot find the path specified)</b>
    I had tried it first time few days ago and was able to test it successfully with the same configuration settings.
    Could any one of you please provide any suggestion on this?
    Thanks in advance
    Sudip

    hi
    check this links it may help u.
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/e3072e65f04445a010847aa970b68b/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d8/3bfc3f8fc2c542e10000000a1550b0/frameset.htm
    Regards,
    Manoseelan

  • Create a CF Query Result Set in Java

    I'd like to programatically build a ColdFusion query resultset inside of a Java class and return it to the calling application.  See the Java psudocode below to see what I'm talking about:
    public class MyClass {
         public coldfusion.sql.QueryTable getQuery() {
              // Create a query table object
              QueryTable myTable = ..?
              // Loop through some set of instance data for my class
              for(int c = 0; c < this.myWigets.length; c++) {
                   int row = c+1;
                   myTable.setField(row, nameCol, this.myWigets[c].name);
                   myTable.setField(row, colorCol, this.myWigets[c].color);
              return myTable;
    I've had stuff like this partially working in the past but had issues with things like query of queries and such probably due to the hacks used to create the QueryTable object.  I'm mainly just checking in to see if there has been any progress made in this area.  To me this seems like such an obvious thing for a Java developer working within CF to want to do.  I'm surprised Adobe doesn't have an officially supported API for doing this sort of thing (or maybe I'm just too dumb to find it.)    A few other notes... I'm not using CFX, and I'm not starting with a java.sql.ResultSet otherwise I would use the QueryTable(java.sql.ResultSet) constructor.  I need to build this thing from scratch programatically.
    Thanks for your time.  I hope this question makes sense to someone out there.
    - Mike

    I appologize.  I wasn't very clear with my original question.
    I'm creating an instance of my Java class from within CF using createObject("java", "com.example.MyClass").  So based on the sample code in my original post on the CF side I'd like to do something like this:
    <cfscript>
         myObj = createObject("java", "com.example.MyClass");
         myObj.doSomeStuff();
         myCFQuery = myObj.getQuery();  // Return a CF query from my java class
    </cfscript>
    ... then do stuff like ...
    <cfquery name="mySortedQuery" dbtype="query">
         select     *
         from       myCFQuery
         order      by color
    </cfquery>
    I appriciate your suggestions so far.  I have other solutions working already but they are not ideal.  I was just hoping someone had a clean and as-hack-free-as-possible way of creating a ColdFusion query result set in Java and passing it back to CF.
    Thanks again,
    Mike

  • Limit on Query result set

    Limit on Query result set
    Is there anyway in Oracle9i to limit query result
    I.e.: we can limit query result in MySQL
    SELECT * FROM EMP LIMIT 2;
    Will return only top 2 records
    Thanks in advance

    SELECT * FROM EMP WHERE ROWNUM <= 2;

  • Converting Oracle XML Query Result in Java String by using XSU

    Hi,
    I have a problem by converting Oracle XML Query Result in Java
    String by using XSU. I use XSU for Java.
    For example:
    String datum=new OracleXMLQuery(conn,"Select max(ps.datum) from
    preise ps where match='"+args[0]+"'");
    String datum1=datum;
    I become the following error:
    Prototyp.java:47: Incompatible type for declaration. Can't
    convert oracle.xml.sql.query.OracleXMLQuery to java.lang.String.
    Can somebody tell me a method() for converting to solve my
    problem??????
    Thanks

    Hmmm.. Pretty basic just look at the example:
    OracleXMLQuery qry = new OracleXMLQuery(conn,"Select max(ps.datum) from preise ps where match='"+args[0]+"'");
    String xmlString = qry.getXMLString();
    Hi,
    I have a problem by converting Oracle XML Query Result in Java
    String by using XSU. I use XSU for Java.
    For example:
    String datum=new OracleXMLQuery(conn,"Select max(ps.datum) from
    preise ps where match='"+args[0]+"'");
    String datum1=datum;
    I become the following error:
    Prototyp.java:47: Incompatible type for declaration. Can't
    convert oracle.xml.sql.query.OracleXMLQuery to java.lang.String.
    Can somebody tell me a method() for converting to solve my
    problem??????
    Thanks

  • Downloading Query result set

    Hi forum,
    We have a requirement to download query result set and distribute it as a periodic job. Can open hub be used for this purpose?
    Thanks in advance.
    Regards,

    Hai i beleive your using BI 7 you can meet your objective by using broadcast and schedule the same hope you have the right EP access too .
    Goodday

  • HOWTO: Writing Out XML Query Results of Any Size in Java with XML SQL Utility

    A customer mailed me asking for an example of how to use our XML SQL Utility to write out query results for tons of query result rows.
    With tons of data, the getXMLDOM() and getXMLString() methods are not really appropriate due to the size.
    The XML SQL Utility offers a getXMLSAX() method that streams SAX2 events to report the data being queried. This is the approach we can use to handle data of any size.
    It dawned on me today that by putting together the XML SQL Utilities getXMLSAX() routine, and the oracle.xml.parser.v2.XSLSAXPrintDriver SAX2 ContentHandler, we can effectively stream out data of any length to an appropriate writer.
    Here's a code example to get the point across:
    package test;
    import java.io.BufferedOutputStream;
    import java.io.PrintWriter;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.Properties;
    import javax.xml.transform.OutputKeys;
    import oracle.jdbc.OracleDriver;
    import oracle.xml.parser.v2.XSLException;
    import oracle.xml.parser.v2.XSLOutput;
    import oracle.xml.parser.v2.XSLSAXPrintDriver;
    import oracle.xml.sql.query.OracleXMLQuery;
    public class Example  {
      private static final String QUERY = "select * from emp";
      public static void main(String[] args) throws Throwable  {
          Connection conn = getConnection();
          OracleXMLQuery q = new OracleXMLQuery(getConnection(),QUERY);
          // Any printwriter will do. Here's we're output to standard out.
          PrintWriter output = new PrintWriter(new BufferedOutputStream(System.out));
          // This is a SAX2 Content Handler used by the Oracle XSLT Engine
          // to serialize a stream of sax2 events as an XML document
          // We'll use it to serialize the sax2 events from the XML SQL Utility
          // out as an XML document.
          XSLSAXPrintDriver ch = new XSLSAXPrintDriver(output, outputOptions());  
          // This asks XML SQL Utility to fire sax events for the data
          // being fetched instead of creating DOM nodes or returning text.
          // By using the XSLSAXPrintDriver content handler, these events
          // get handled by writing them directly to the output stream
          q.getXMLSAX(ch);
          ch.flush();
          q.close();
          conn.close();     
      private static XSLOutput outputOptions() throws XSLException {
        XSLOutput x = new XSLOutput();
        Properties props = new Properties();
        props.put(OutputKeys.METHOD,"xml");
        props.put(OutputKeys.INDENT,"yes");  // Set to "no" for non-indented
        x.setProps(props);
        return x;
      public static Connection getConnection() throws SQLException {
        String username = "scott";
        String password = "tiger";
        String thinConn = "jdbc:oracle:thin:@localhost:1521:ORCL";
        Driver d = new OracleDriver();
        return DriverManager.getConnection(thinConn,username,password);
    }

    Hi Uber,
    This is a known issue that error occurs when running report "Count of instances of specific software registered with Add or Remove Programs" due to non-printable characters for XML. Based on internal research, the hotfix for this issue will be
    included in the System Center 2012 Configuration Manager Service Pack 1.
    As a workaround, you can remove the nonprintable character populated into the report parameter by referring to the following KB article:
    http://support.microsoft.com/KB/914159
    Hope this helps.
    Regards,
    Mike Yin
    Mike Yin
    TechNet Community Support

  • Stepping through a query result set, replacing one string with another.

    I want to write a function that replaces the occurance of a string with another different string.  I need it to be a CF fuction that is callable from another CF function.  I want to "hand" this function an SQL statement (a string) like this:   (Please note, don't bother commenting that "there are eaiser ways to write this SQL..., I've made this simple example to get to the point where I need help.  I have to use a "sub_optimal" SQL syntax just to demonstrate the situation)
    Here is the string I want to pass to the function:
    SELECT
      [VERYLONGTABLENAME].FIRST_NAME,
      [VERYLONGTABLENAME].LAST_NAME,
      [VERYLONGTABLENAME].ADDRESSS
    FROM
      LONGTABLENAME [VERYLONGTABLENAME]
    Here is the contents of the ABRV table:
    TBL_NM,  ABRV    <!--- Header row--->
    VERYLONGTABLENAME, VLTN
    SOMEWHATLONGTALBENAME, SLTN
    MYTABLENAME, MTN
    ATABLENAME, ATN
    The function will return the original string, but with the abreviations in place of the long table names, example:
    SELECT
      VLTN.FIRST_NAME,
      VLTN.LAST_NAME,
      VLTN.ADDRESSS
    FROM
      LONGTABLENAME VLTN
    Notice that only the table names surrounded by brackets and that match a value in the ABRV table have been replaced.  The LONGTABLENAME immediately following the FROM is left as is.
    Now, here is my dum amatuer attempt at writing said function:  Please look at the comment lines for where I need help.
          <cffunction name="AbrvTblNms" output="false" access="remote" returntype="string" >
            <cfargument name="txt" type="string" required="true" />
            <cfset var qAbrvs="">  <!--- variable to hold the query results --->
            <cfset var output_str="#txt#">  <!--- I'm creating a local variable so I can manipulate the data handed in by the TXT parameter.  Is this necessary or can I just use the txt parameter? --->
            <cfquery name="qAbrvs" datasource="cfBAA_odbc" result="rsltAbrvs">
                SELECT TBL_NM, ABRV FROM BAA_TBL_ABRV ORDER BY 1
            </cfquery>
         <!--- I'm assuming that at this point the query has run and there are records in the result set --->
        <cfloop index="idx_str" list="#qAbrvs#">      <!--- Is this correct?  I think not. --->
        <cfset output_str = Replace(output_str, "#idx_str#", )  <!--- Is this correct?  I think not. --->
        </cfloop>               <!--- What am I looping on?  What is the index? How do I do the string replacement? --->
            <!--- The chunck below is a parital listing from my Delphi Object Pascal function that does the same thing
                   I need to know how to write this part in CF9
          while not Eof do
            begin
              s := StringReplace(s, '[' +FieldByName('TBL_NM').AsString + ']', FieldByName('ABRV').AsString, [rfReplaceAll]);
              Next;
            end;
            --->
        <cfreturn output_txt>
        </cffunction>
    I'm mainly struggling with syntax here.  I know what I want to happen, I know how to make it happen in another programming language, just not CF9.  Thanks for any help you can provide.

    RedOctober57 wrote:...
    Thanks for any help you can provide.
    One:
    <cfset var output_str="#txt#">  <!--- I'm creating a local
    variable so I can manipulate the data handed in by the TXT parameter.
    Is this necessary or can I just use the txt parameter? --->
    No you do not need to create a local variable that is a copy of the arguments variable as the arguments scope is already local to the function, but you do not properly reference the arguments scope, so you leave yourself open to using a 'txt' variable in another scope.  Thus the better practice would be to reference "arguments.txt" where you need to.
    Two:
    I know what I want to happen, I know how to make it happen in another programming language, just not CF9.
    Then a better start would be to descirbe what you want to happen and give a simple example in the other programming language.  Most of us are muti-lingual and can parse out clear and clean code in just about any syntax.
    Three:
    <cfloop index="idx_str" list="#qAbrvs#">      <!--- Is this correct?  I think not. --->
    I think you want to be looping over your "qAbrvs" record set returned by your earlier query, maybe.
    <cfloop query="qAbrvs">
    Four:
    <cfset output_str = Replace(output_str, "#idx_str#", )  <!--- Is this correct?  I think not. --->
    Continuing on that assumption I would guess you want to replace each instance of the long string with the short string form that record set.
    <cfset output_str = Replace(output_str,qAbrs.TBLNM,qAbrs.ABRV,"ALL")>
    Five:
    </cfloop>               <!--- What am I looping on?  What is the index? How do I do the string replacement? --->
    If this is true, then you are looping over the record set of tablenames and abreviations that you want to replace in the string.

  • ORA-19036: Invalid query result set in newContextFromHierarchy()

    Hi,
    I'm getting this error occasionally when using a CONNECT BY query to generate a hierarchical XML. Using Oracle 10g. The action suggested is "Make sure the query used in newContextFromHierarchy() is a CONNECT BY query or the query returns the result set have the same property as the result set generated by a CONNECT BY query." Not very helpful since I am using a CONNECT BY query which works fine 99% of the time. Appreciate any help.
    Thanks!

    Strange, never got notified that anyone replied. Oracle version is:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    Volume of data is not large.
    DBMS_XMLGEN.NEWCONTEXTFROMHIERARCHY('SELECT plevel,
                    XMLELEMENT("PORTFOLIO",
                               XMLELEMENT("MPFL_ID", MPFL_ID),
                               XMLELEMENT("MPFL_NAME", MPFL_NAME),
                               XMLELEMENT("MPFL_DESC", MPFL_DESC),
                               XMLELEMENT("PFL_ID", PFL_ID),
                               XMLELEMENT("PFL_NAME", PFL_NAME),
                               XMLELEMENT("PFL_DESC", PFL_DESC),
                               XMLELEMENT ("PFTYP_NAME", PFTYP_NAME),
                               XMLELEMENT("HIDE", HIDE),
                               XMLELEMENT("REF_MGR", REF_MGR))
                FROM (WITH TEST_TREE AS..
    Can't share the exact query but it's using a WITH clause which contains a query using a CONNECT BY NOCYCLE. There are several UNION ALLs of the result set generated by the WITH clause.
    Thanks for your help!
    Message was edited by: user12110856

  • Large query result set

    Hi all,
    At the moment we have some java classes (not ejb - cmp/bmp) for search in
    our ejb application.
    Now we have a problem i.e. records have grown too high( millions ) and
    sometimes query results in retrieval of millions of records. It results in
    too much memory consumtion in our ejb application. What is the best way to
    address this issue.
    Any help will be highly appreciated.
    Thanks & regards,
    Parvez

    you can think of following options
    1) paging: read only few thousands at a time and maintain a index to page
    through complete dataset
    2) caching!
    a) you can create a serialized data file in server to cache the result set
    and can use that to browse through. you may do on the fly
    compression/uncompression while sending data to client.
    b) applet based solution where caching could be in client side. Look in
    http://www.sitraka.com/software/jclass/cs_ims.html
    thanks,
    Srinivas
    "chauhan" <[email protected]> wrote in message
    news:[email protected]...
    Thanks Slava Imeshev,
    We already have search criteria and a limit. When records exceeds thatlimit
    then we prompt user that it may take sometime, do you want to proceed? If
    he clicks yes then we retrieve those records. This results in lot ofmemory
    consumtion.
    I was thinking if there is some way that from database I can retrieve some
    block of records at a time rather the all records of a query. I wander how
    internet search sites work, where thousnds of sites/pages match criteriaand
    client can move back & front on any page.
    Regards,
    Parvez
    "Slava Imeshev" <[email protected]> wrote in message
    news:[email protected]...
    Hi chauhan,
    You may want to narrow search criteria along with processing a
    limited number of resulting records. I.e. if the size of the result
    is bigger than a limit, you stop fetching results and notify the client
    that search criteria should be narrowed.
    HTH.
    Regards,
    Slava Imeshev
    "chauhan" <[email protected]> wrote in message
    news:[email protected]...
    Hi all,
    At the moment we have some java classes (not ejb - cmp/bmp) for
    search
    in
    our ejb application.
    Now we have a problem i.e. records have grown too high( millions ) and
    sometimes query results in retrieval of millions of records. It
    results
    in
    too much memory consumtion in our ejb application. What is the best
    way
    to
    address this issue.
    Any help will be highly appreciated.
    Thanks & regards,
    Parvez

  • Query result set...

    I'm having trouble determining a good way to word my question. So, I believe my pseudo code below will be sufficient in doing so.
    Oracle version: 11.2g
    Data set
    WITH temp AS
    SELECT 1 col1, 1 day FROM dual UNION ALL
    SELECT 2 col1, 1 day FROM dual UNION ALL
    SELECT 3 col1, 1 day FROM dual UNION ALL
    SELECT 4 col1, 1 day FROM dual UNION ALL
    SELECT 5 col1, 1 day FROM dual UNION ALL
    SELECT 6 col1, 1 day FROM dual UNION ALL
    SELECT 7 col1, 2 day FROM dual UNION ALL
    SELECT 8 col1, 2 day FROM dual UNION ALL
    SELECT 9 col1, 2 day FROM dual UNION ALL
    SELECT 10 col1,2 day FROM dual
    SELECT *
      FROM temp
    Result of the query above:
    COL1     DAY
    1     1
    2     1
    3     1
    4     1
    5     1
    6     1
    7     2
    8     2
    9     2
    10     2
    DESIRED result set:
    DAY COL_TOTAL
    1   21 
    2   55   -- 21 + 33 (the sum of day 1 + the sum of day 2)I realize that I can get the desired result set from above with the code below. However, for my actual issue I have several other data points and 100 of distinct days that I need to do this for. So doing a 100 UNION statement isn't exactly going to work.
    WITH temp AS
    SELECT 1 col1, 1 day FROM dual UNION ALL
    SELECT 2 col1, 1 day FROM dual UNION ALL
    SELECT 3 col1, 1 day FROM dual UNION ALL
    SELECT 4 col1, 1 day FROM dual UNION ALL
    SELECT 5 col1, 1 day FROM dual UNION ALL
    SELECT 6 col1, 1 day FROM dual UNION ALL
    SELECT 7 col1, 2 day FROM dual UNION ALL
    SELECT 8 col1, 2 day FROM dual UNION ALL
    SELECT 9 col1, 2 day FROM dual UNION ALL
    SELECT 10 col1,2 day FROM dual
    SELECT SUM(col1) AS col_total
      FROM temp
    WHERE day <= 1
    UNION ALL
    SELECT SUM(col1) AS col_total
      FROM temp
    WHERE day <= 2Edited by: user652714 on Aug 13, 2012 9:55 PM

    Hi,
    I see now what you want . You can use this:
    select *
    from tt
    order by col_1;
         COL_1        DAY
             1          1
             2          1
             3          1
             4          1
             5          1
             6          1
             7          2
             8          2
             9          2
            10          2
    10 rows selected.
    select day, sum(total) over  (order by  day) COL_TOTAL
    from
    (select day, sum(col_1) TOTAL
    from tt
    group by day
        DAY  COL_TOTAL
             1         21
             2         55
    2 rows selected.

  • Query result set ordered incorrectly

    Hallo,
    I have this problem.
    I have a table (lisitab) with a list of codes, for example:
    A0001
    A0002
    AD063
    AY064
    In my java class I run a query (select lisi_codi from lisitab order by lisi_codi) and I expect the following order:
    A0001
    A0002
    AD063
    AY064
    but I have this result:
    AD063
    AD064
    A0001
    A0002
    What is strange it's that if I execute the query in SQL*Plus or other tools (PLSQLDeveloper for example) it works fine! When run my JDeveloper application I have the bad ordered result set.
    My DB is Oracle 8.1.7 on Windows2000(SP2). The DB language is set as AMERICAN_AMERICA.WE8DEC.
    The client is set with NLS_LANG AMERICAN_AMERICA.WE8DEC and I'm using Oracle OCI JDBC Drivers 8.1.7 deployed with JDeveloper 3.2.
    I presume there's a bug (a BIG BUG!!!) into JDBC Drivers.
    How can I work without trusting in order by ?
    Could anyone help me?
    Thanks
    G.Grimoldi
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Joaquin Sanchez Jimenez ([email protected]):
    Hi:
    Could you send table description and complete query?. What version of JDBC and database ...
    J.<HR></BLOCKQUOTE>
    The table (lisitab) is very simple:
    lisi_codi varchar2(16) not null (PK)
    lisi_desc varchar2(40)
    The select is:
    select lisi_codi from lisitab order by lisi_codi
    I'm working on Oracle 8.1.7 on Windows 2000 and JDBC drivers are Oracle JDBC 8.1.7 deployed with Jdeveloper 3.2.
    I also tried with an Oracle 8.1.7 DB with charset WE8ISO8859P1 and a client with the same charset, but the result is same: bad ordered result set!
    Is there anybody at Oracle who could tell me why and how to resolve (or workaround) this tedious and dangerous problem?
    Thanks
    null

  • Exporting query result set into CSV file using Forms

    Hi ,
    My requirement is
    -> I need to create a form where I have a Multi line text box and two button.
    -> When I enter a query in text box and click on Execute button, It should execute a select query.
    -> After execution, Result set needs to be exported into an Excel file.
    Please give a hint how to do this????
    Thanks,
    maddy

    as you are using text item to write SQL query by the user
    so for that you need to use the exec_sql package to parse the text items query and get definitions and values of the columns being
    resulted in the result set of the query.
    once your query is execute to the desired connection then you need to use fetch the result to the CSV file by use of the TEXT_io package
    which will open the text file with .csv extension and you have to pass the each line to that text file with comma separated values as "ss","rr" etc.
    or you can use the ole2 package to call the excel application and then fetch the data of exe_sql query to that.

  • XML query results in HTML form parameter

    Hi,
    I would like insert records from a query result (raw XML) into HTML form tags, using the XSL stylesheet. Here is the code I am trying to use, but obviously it is not working.
    <INPUT TYPE="hidden" NAME="te_hb_strdEntryId"
    VALUE="<xsl:value-of select="ID"/>">
    Are there any other options to put a result of a query in a hidden tag, using XSL?
    Any help will be appriciated.

    <INPUT TYPE="hidden" NAME="te_hb_strdEntryId"
    VALUE="<xsl:value-of select="ID"/>">
    The correct syntax would be:
    <INPUT TYPE="hidden" NAME="xxx">
    <xsl:attribute name="VALUE">
    <xsl:value-of select="ID"/>
    </xsl:attribute>
    however, there is a shortcut syntax
    when you are using XPath expressions
    in literal attribute values:
    XSLT attribute value templates. They are
    XPath expressions inside curly braces.
    So, you can achieve your desired result
    with the shorter form:
    <INPUT TYPE="hidden" NAME="xxx" VALUE="{ID}">
    as well.

  • Help assigning a   calculated arbitrary  ID to a query result set

    Given the sample query result..
    (sorry about the formatting of the output)
    GROUPID LAST_NAME FIRST_NAME INITIALS EMAIL PHONE count(PHONE)
    GP2001 Troy Diana s [email protected] 123-456-7890 2
    GP2001 Troy Diana s [email protected] 123-456-7890 2
    GP2006 Thomas Carl p [email protected] 789-100-1112 1
    GP2007 Riker William T [email protected] 866-908-6654 1
    GP3001 Laforge Jody m jlaforge@enterprisenet 456-789-9000 3
    GP3001 Laforge Jody m [email protected] 456-789-9000 3
    GP3001 Laforge Jody m [email protected] 456-789-9000 3
    GROUP_ID is a calculated field from a select statement.
    Individuals with one phone number (ph_cnt = 1)
    is assigned an arbitrary unique GROUP_ID.
    Individuals, appearing more than once, with more than one phone (ph_cnt > 1)
    are giving the same GROUP_ID.
    I was thinking of using a case statement in this case...but got stuck on generating the GROUP_ID based
    on the phone count.
    select case
    when ph_cnt = 1 then select 'GP'||to_char(sysdate,'hhmisssss') from dual)
    when ph_cnt > 2 then <assign a unique group_id to each set of duplicates/triplicate...etc>
    end GROUP_ID,
    last_name,
    first_name,
    initials,
    email,
    phone
    (select last_name,
    first_name,
    initials,
    email,
    phone,
    count(phone) ph_cnt
    from my tab
    group by
    last_name,first_name,initials,email,phone)
    Edited by: ch**** on Apr 25, 2011 7:20 AM

    Try this,
    SELECT 'GP' || 1000 + DENSE_RANK () OVER (ORDER BY phone ASC) groupid,
           last_name,
           first_name,
           initials,
           email,
           phone,
           COUNT (1) OVER (PARTITION BY phone) ph_cnt
      FROM my tab;G.

Maybe you are looking for

  • Imac and cintiq 21"

    I hooked up my Cintiq 21" display to my brand new imac 17" intel imac. got the higher end version with the ATI Radeon X1600 graphics. I used the mini DVI to DVI adapter from apple and the 18SX DVI-D to DVI-I adapter that came with my Cintiq. Works we

  • Payment means

    Hi all, Is there a workaround or a patch that corrects the behaviour below: When we are adding an invoice in SAP, the payment means screen comes up automatically when the payment means field "open incoming payment" is set to other than no. However if

  • Lightroom Photobook Templates?

    I have moved across from the Apple photo products - iPhoto and then Aperture - to Lightroom. Whilst I love the editing capability within Lightroom the photo book options are very limited. There are no preset templates and it is very time consuming ha

  • Playing AVI in QT for windows

    Hi, I am new to QT and AppleTv. Trying to convert AVI to QT and get no sound, I have found a codec for the video but no codec seems to work for the sound. Any tips (except don't use QT). Thanks

  • I tried to download Adobe Reader and it said that I did not have sufficient privledge

    Hi- I just tried to download Adobe rEader and it said that the download was unsuccessful as I did nto have sufficient priviledge.