DAC/TreeControl/Custom Query -- DAC-511 error

I have a TreeControl built from a Master->Detail->Detail relationship.
(rowsetA, rowsetB, rowsetC)
I am construction a custon search panel to perform searches on the RowSetInfo objects associated with the Tree.
I programatically set the where clause of rowsetA: rowsetA.setQueryContition("column1 = 'value'");
I then execute the query: rowsetA.executeQuery();
Every time I open the application, the first time I press the Find button, I receive the following error:
DAC-511: ResultSetInfo: could not execute the query.
JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
null
After acknowledging this error, I press the Find button again and the query executes fine.
What's up with this???
All of my rowsets appear to initialize correctly.
Any suggestions would be appreciated.
TIA
Andrew

refreshnig...

Similar Messages

  • Error in running custom query from jspx(site) for Content Tracker Report

    Hi All,
    I want to generate a custom Content Tracker Report. I am able to do so from Content Tracker console, but when i try to invoke the service 'SCT_GET_DOCUMENT_INFO_ADMIN' or 'SCT_GET_DOCUMENT_INFO' with my custom query(which simply counts the number of rows in a table) from my jspx page, it gives the following error.
    oracle.stellent.wcm.server.request.RequestException: Error
    occurred in Content Server executing service
    'SCT_GET_DOCUMENT_INFO_ADMIN'
    Caused By: oracle.stellent.ridc.protocol.ServiceException: Unable to get
    document info. Unable to execute service method 'sctExecuteQuery'. The
    error was caused by an internally generated issue. The error has been
    logged.
    What could be the reason and the resolution?
    Also, I know that i am invoking the service in the right way as custom report from query as 'select * from users' works fine from site.
    P.S. I am using UCM 11g + SSXA

    Things are turning weird. The below two queries work from jspx.
    1. SELECT * FROM Users
    2. SELECT dname FROM Users
    But, the following query gives error (SQL is correct).
    select dname, count(dname) from users group by dname
    Unable to execute service method 'sctExecuteQuery'. Null pointer is dereferenced.
    $Unable to get document info.!csUnableToExecMethod,sctExecuteQuery!syNullPointerException
    intradoc.common.ServiceException: !$Unable to get document info.!csUnableToExecMethod,sctExecuteQuery
    *ScriptStack SCT_GET_DOCUMENT_INFO_ADMIN
    3:sctExecuteQuery,**no captured values**
    at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
    at intradoc.server.Service.buildServiceException(Service.java:2260)
    at intradoc.server.Service.createServiceExceptionEx(Service.java:2254)
    at intradoc.server.Service.createServiceException(Service.java:2249)
    at intradoc.server.Service.doCodeEx(Service.java:584)
    at intradoc.server.Service.doCode(Service.java:505)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
    at intradoc.server.Service.doAction(Service.java:477)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
    at intradoc.server.Service.doActions(Service.java:472)
    at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)
    at intradoc.server.Service.executeActions(Service.java:458)
    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)
    at intradoc.server.Service.doRequest(Service.java:1890)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:435)
    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
    at intradoc.util.IdcConcurrentHashMap.get(IdcConcurrentHashMap.java:60)
    This works fine from Content Tracker UI.
    Anyone has any idea, what could be the issue here?

  • HOWTO: Handle a click event on a DAC TreeControl

    HOWTO: Handle a click event on a DAC TreeControl
    Goal: Handle the event that occurs when a user clicks on a new node of a DAC TreeControl. In this example the handler is simple - it just prints out the current node. You can try this example on the DACTree.jpr project in the 3.2 tutorial, described in the online help under
    Tutorials and Sample Applications
    -> Tutorials
    -> Building Enterprise Applications with Business Components for Java
    -> Enhancing the Online Orders Application
    -> Creating a DAC Client
    The problem: The usual procedure for adding an event to a DAC component does not work: if you select your TreeControl in the designer, then select the Events tab of the property inspector, none of the events listed does what we want.
    Solution: Get the underlying JTree and add your listener to it. Although the TreeControl is not a subclass of javax.swing.JTree, it does have an underlying JTree which you can get by calling TreeControl.getTree().
    Add the following code to your frame's .java file (Hint: Add any event, from the Events tab of the property inspector, then use the generated code as your template, changing it to match this example):
    1. Declare a JTree:
    JTree tree = new JTree();2. In jbInit(), add the event listener after the code that sets up your TreeControl:
    tree = treeControl1.getTree();
    tree.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
    public void valueChanged(javax.swing.event.TreeSelectionEvent e) {
    tree_valueChanged(e);
    });3. Add the event handler method:
    void tree_valueChanged(javax.swing.event.TreeSelectionEvent e) {
    System.out.println("Current node: " + tree.getLastSelectedPathComponent());
    }

    could you add a mouselistener to the pane or whatever container the pie chart is drawn on? Then override the mouseClicked method to do whatever you want?
    Message was edited by:
    petes1234

  • SQL 2012 SP1 - How to determine a query that causes Error 8623 in SQL Log: The query processor ran out of internal resources and could not produce a query plan. This is a rare event...

    We are getting multiple 8623 Errors in SQL Log while running Vendor's software.
    How can you catch which Query causes the error?
    I tried to catch it using SQL Profiler Trace but it doesn't show which Query/Sp is the one causing an error. 
    I also tried to use Extended Event session to catch it, but it doesn't create any output either.
    Error:
    The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that
    reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
    Extended Event Session that I used;
    CREATE EVENT SESSION
        overly_complex_queries
    ON SERVER
    ADD EVENT sqlserver.error_reported
        ACTION (sqlserver.sql_text, sqlserver.tsql_stack, sqlserver.database_id, sqlserver.username)
        WHERE ([severity] = 16
    AND [error_number] = 8623)
    ADD TARGET package0.asynchronous_file_target
    (SET filename = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xel' ,
        metadatafile = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xem',
        max_file_size = 10,
        max_rollover_files = 5)
    WITH (MAX_DISPATCH_LATENCY = 5SECONDS)
    GO
    -- Start the session
    ALTER EVENT SESSION overly_complex_queries
        ON SERVER STATE = START
    GO
    It creates only .xel file, but not .xem
    Any help/advice is greatly appreciated

    Hi VK_DBA,
    According to your error message, about which query statement may fail with error message 8623, as other post, you can use trace flag 4102 & 4118 for overcoming this error. Another way is looking for queries with very long IN lists, a large number of
    UNIONs, or a large number of nested sub-queries. These are the most common causes of this particular error message.
    The error 8623 occurs when attempting to select records through a query with a large number of entries in the "IN" clause (> 10,000). For avoiding this error, I suggest that you could apply the latest Cumulative Updates media for SQL Server 2012 Service
    Pack 1, then simplify the query. You may try divide and conquer approach to get part of the query working (as temp table) and then add extra joins / conditions. Or You could try to run the query using the hint option (force order), option (hash join), option
    (merge join) with a plan guide.
    For more information about error 8623, you can review the following article.
    http://blogs.technet.com/b/mdegre/archive/2012/03/13/8623-the-query-processor-ran-out-of-internal-resources-and-could-not-produce-a-query-plan.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Use custom query script webi

    Hello,
    I have created an SQL query to MS SQL Server. I want this query to run for my results at webi reports. When I copy this query, I validate it without errors, but afer saving it, the webi losses it and has the query created by the tool. How can I make the webi run this custom query?
    Thanks

    What is your BO version ?
    Did you check the below SAP KBAs ?
    1761949 - Custom SQL is being lost when editing Webi document
    1812889 - Custom SQL dissapears and reverts to the generated SQL after cancelling the prompt window when refreshing a WebIntelligence report

  • Asset Manager sample - Custom Query Interface

    Greetings Ladies & Gentlemen -
    I've pretty much reproduced a custom query page in my application
    (copied from the Asset Manager sample application) and it seems to
    perform as expected - well almost !
    When I arrive at the page I get an error message where the
    report would display that reads -
    failed to parse SQL query : ORA - 00936 : missing expression.
    It goes away when I press the Go button, and it reappears when I press
    the Reset button.
    I've set the default for the shuttle and I've created all the same processes for the page.
    Any ideas where this page needs to be corrected ?
    Thanks for your valuable time in advance.
    Brian

    Any suggestions?

  • Need to reconcile users based on custom query in IT resource

    Hi,
    We have a requirement to reconcile users from DB based on below criteria:
    If the user have attribute=sysadmin as 'Y' then that user should be reconciled into idm.
    If user have two attributes=sysadmin as 'Y' and manager as 'Y', then that user should be reconciled into idm.
    If user have two attributes=sysadmin as 'Y' and manager as 'N', then that user should be reconciled into idm.
    But if If user have two attributes=sysadmin as 'N' and manager as 'N', then that user should not be reconciled into idm.
    I need to mention that in the custom query column of IT resource. I gave the below query but the schedule task fails with error.
    Custom Query: (|(|(|(|(CREATEGLOBAL_FLAG="Y")(SYSADMIN_FLAG="Y"))(ALLOCATE_FLAG="Y"))(RELEASE_FLAG="Y"))(LOCATION_RESTRICTIONS_FLAG="Y"))
    Error: ERROR,24 Apr 2012 20:29:15,830,[OIMCP.DATC],Class/Method: DBFacade/getRecord encounter some problems: ORA-00936: missing expression
    java.sql.SQLException: ORA-00936: missing expression
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
    If anybody have implemented same scenario then please help us.
    Thanks,
    Kalpana.

    Try this query:
    select usr.usr_login, obj.obj_name, ost.ost_status from usr, obj, obi, oiu, ost where usr.usr_key = oiu.usr_key and obi.obi_key = oiu.obi_key and obi.obj_key = obj.obj_key and ost.ost_key = oiu.ost_key and obj.obj_name='<resource object name>'
    you can add : and ost.ost_status = <status value > to search status as well.
    regards,
    GP

  • Pagination in toplink using custom query

    Re: Pagination using TopLink
    Posted: Aug 31, 2006 10:42 PM in response to: Shaun Smith Reply
    Hi,
    I have my own customer query which is really complex with subqueries,joins,grouping,aggregation in the query etc etc for which I cant use toplink workbench to create a project and do the metadata mapping.
    But we need to enable pagination without holding the database resources between customer's page time in the browser.
    Is there any provision in toplink to just input the custom query (either statement/prepared statement) and do pagination without holding connection to the database between page time?
    The example i got from the link makes use of LogicalCursor/ChunkingLogicalCursor etc.
    LogicalCursor cursor = new LogicalCursor(Model.class,null);
    for (CursorIterator it = cursor.iterator(session); it.hasNext();)
    System.out.println(it.next(session));
    Only parameter that is passed to the LogicalCursor is "Model" which is a java object mapped to a particular table.
    But we had a java object which should be mapped to the output of a complex query involing complex query and pagination needs to be enabled.
    Could you please let us know a sample by which we can do by simply passing the query during the runtime ?

    It really seems weird.
    We followed the toplink tutorial and wrote a servlet FindAddress which on receiving the request
    1. instantiates ReadQuery and
    2. setreferenceclass to Address.class,
    3. setFetchSize(1000) and
    4.sets useScrollableCursor.
    5. It does session.executeQuery returning a ScrollableCursor.
    6. We place the ScrollableCursor in HttpSession
    and then redirect the page to viewAddress.jsp which
    1. retrieves the ScrollableCursor from the session
    2. i=0;     while(cursor.hasNext() && i<1000) {
         Address address = (Address)cursor.next();
    //display via the jsp all these 1000 address objects
    3. has a next button when a click on that it again goes to the same page retrieving the next set of 1000 records from ScrollableCursor from the session.
    Through out this experimentation I could see the connection is still held. I was expecting that once the page gets displayed for 1000 records and untill you press next, the connection should be handled back to the J2EE application server but still the connection is held .
    The logic of setFetchSize as mentioned in the documentation is that after reading the first set of records as per fetchSize ,connection should be returned to the pool and when we do iterator.next() after fetchsize limit, it has to again going to the database and fetch records but it doesnt seem to be.
    Could you please help us. This is what we are trying to do as next step and we had been evaluating toplink could be the best choice for our business scneario:
    We try to achieve pagination without holding the database resource when the user navigates between paged records.
    Any help on this would make us to hit toplink for our huge application.
    Here is the attached FindAddress.java and ViewAddress.jsp
    FindAddress.java
    =============
    // Decompiled by DJ v2.9.9.61 Copyright 2000 Atanas Neshkov Date: 9/8/2006 6:32:21 PM
    // Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
    // Decompiler options: packimports(3)
    // Source File Name: FindAddress.java
    package examples.servletjsp;
    import java.io.IOException;
    import java.io.PrintStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.toplink.expressions.Expression;
    import oracle.toplink.expressions.ExpressionBuilder;
    import oracle.toplink.queryframework.ReadAllQuery;
    import oracle.toplink.queryframework.ScrollableCursor;
    import oracle.toplink.threetier.ClientSession;
    import oracle.toplink.threetier.Server;
    // Referenced classes of package examples.servletjsp:
    // JSPDemoServlet
    public class FindAddress extends JSPDemoServlet
    public FindAddress()
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    doPost(request, response);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    request.setCharacterEncoding("UTF-8");
    getServletContext().log("FindAddress servlet - doPost");
    java.util.Vector address = null;
    ScrollableCursor cursor = null;
    try
    HttpSession session = request.getSession(true);
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(examples.servletjsp.model.Address.class);
    ExpressionBuilder builder = new ExpressionBuilder();
    query.setSelectionCriteria(builder.get("id").greaterThan(100));
    query.setFetchSize(5000);
    query.useScrollableCursor();
    System.out.println("########### Sleep Mode Before assigning to CURSOR ###############");
    System.out.println("############ Back from Sleep Mode before CURSOR ############");
    cursor = (ScrollableCursor)((Server)getSession()).acquireClientSession().executeQuery(query);
    System.out.println("############ Sleep Mode After assigning to CURSOR ###########");
    System.out.println("############ Back from Sleep Mode After CURSOR ############");
    session.setAttribute("ScrollableCursor", cursor);
    catch(Exception e)
    request.setAttribute("source", "FindEmployees doPost");
    request.setAttribute("header", "An Error Occurred");
    request.setAttribute("errorMessage", e.getMessage());
    request.getRequestDispatcher("./errorPage.jsp").forward(request, response);
    return;
    System.out.println("cursor------------" + (cursor == null));
    if(cursor == null)
    request.getRequestDispatcher("./EmployeesNotFound.jsp").forward(request, response);
    } else
    request.setAttribute("address", address);
    request.getRequestDispatcher("./viewAddress.jsp").forward(request, response);
    viewAddress.jsp
    =============
    <%@page import="java.util.*"%>
    <%@page import="examples.servletjsp.*"%>
    <%@page import="examples.servletjsp.model.*"%>
    <%@page import="oracle.toplink.queryframework.ScrollableCursor"%>
    <%@page import="java.math.*"%>
    <%@page contentType = "text/html; charset=UTF-8"%>
    <html>
    <head><title>Employee Query Results</title></head>
    <body>
    <form name="test" method="post" action="viewAddress.jsp">
    <!--      Prepare s heading.
         Get the employees passed in from ViewEmployees servlet. Show them in table format. Provide button
         to ViewEmployee -->
    <%
         request.setCharacterEncoding("UTF-8");
         String searchString = request.getParameter("employeeString");
         ScrollableCursor cursor = (ScrollableCursor) session.getAttribute("ScrollableCursor");
         String heading = null;
              heading="Search Results for FindAll on Employee";
         String employeeData = "";
         //Iterator data = ((Vector)request.getAttribute("address")).iterator();
         int i =0;
         while(cursor.hasNext() && i<4995) {
              if(i<10){
                   System.out.println("######### JSP Count TRhread Sleep ###########");
                   //Thread.sleep(100);
                   //System.out.println("######### JSP Count TRhread Sleep Over ###########");
              i++;
         Address address = (Address)cursor.next();
         BigDecimal id = address.getId();
         String city = address.getCity();
         String province = address.getProvince();
         String street = address.getStreet();
         String country = address.getCountry();
         String pCode = address.getPostalCode();
         employeeData += "<tr><td>" + id + "</td>"
              + "<td>" + province + "</td>"
              + "<td>" + street + "</td>"
              + "<td>" + city + "</td>"
              + "<td>" + pCode + "</td>"
              + "<td>" + country+ "</td>"
              + "</tr>";
         //cursor.close();
         System.out.println("abcdAfter closing the cursor ->plz see whether connpool monitorcnt = 0");
    %>
    <center>
         <h2><%=heading%></h2>
         <hr>
         Return to Main
         <p>
         <table border=1>
              <tr>
                   <td align="center">Address Id</td>
                   <td align="center">Province</td>
                   <td align="center">Street</td>
                   <td align="center">City</td>
                   <td align="center">Postal Code</td>
                   <td align="center">Country</td></tr>
              <%=employeeData %>
         </table>
    </center>
    <p>
    <input type="submit" name ="next" value="next" >
    <center>Return to Main</center>
    </form>
    </body>
    </html>

  • Using NVL in Query of Query resulting in error

    I'm still using CF8 and Oracle 11G back-end.
    When I use NVL in the query of query I got error....Can't I use NVL to check on null value? Please help
    Here is my codes:
    <cfquery name="GetC2" datasource="#Trim(application.OracDSN)#">
         SELECT CamID2, rel2_2,p_ln2,p_fn2,ins,l_year
         FROM prt_temp
         WHERE Ins = 'CC'
         AND l_year =  '1481'
    AND NVL(Child_LN2,' ') <> ' '
    AND NVL(Child_FN2,' ') <> ' '
        </cfquery>
    <cfif GetC2.Recordcount NEQ 0>   
    <cfquery name="CheckRel2C2" dbtype="QUERY">
      SELECT CamID2, rel2_2
      FROM GetC2
      WHERE NVL(Rel2_2,' ') <> ' '
    AND NVL(p_ln2,' ') = ' '
    AND NVL(p_fn2,' ') = ' '
    AND Ins = 'CC'
    AND l_year =  '1481'
    </cfquery>
    </cfif>
    The error:
    Error Executing Database Query.
    Query Of Queries syntax error.
    Encountered "NVL ( Rel2_2 ,. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,

    NVL is an Oracle function, and is not available in ColdFusion Query of Query.  If you are trying to check for null values, then use IS NULL or IS NOT NULL.  So
    WHERE NVL(Rel2_2,' ') <> ' '
        AND NVL(p_ln2,' ') = ' '
        AND NVL(p_fn2,' ') = ' '
    becomes
    WHERE Rel2_2 IS NOT NULL
        AND p_ln2 IS NULL
        AND p_fn2 IS NULL
    -Carl V.

  • Add custom query to standard PLD layout

    Hi Everybody,
    I need to change the standard Invoice PLD report, in order to include additional data that is
    kept in my UDO.
    Is it possible to define a custom query inside PLD to retrieve data from the UDO
    (the UDO is linked to the Invoice) and show it in the Invoice layout?
    Thanks all,
    Manuel Dias

    Hi Manuel,
    One workaround you can try is to use UDF and formatted search to retrive the info on the invoice screen and then directly display it on the invoice PLD.
    Hope it helps.
    Regards,
    Hamsa

  • How to find Tables behind a Custom Query in SAP

    Hi Gurus,
    Can anyone please help me find tables behind a custom query in SAP.
    Regards
    As

    Hi
    Check the name of the programm assigned to transaction, it should be like this:
    AQZZ<user group>=======<query name>======
    or
    AQIC<user group>=======<query name>======
    It depends of the query area is global or cross-client
    So run SQ01, select the quey area, select the quey group and so your query: now you can see the infoset and then you see it by SQ02 transaction
    Max

  • Can I use custom query in DB Adapter with Polling

    Hi All,
    I am getting problem while using db adapter with polling. Can I use custom query in db adapter with polling.
    I am using 2 tables; table 1 and table2
    Structure of table1 is as:
    File_name
    Batch_id
    Creation_date
    Status
    Structure of table2 is as:
    Batch_id
    Employee_ID
    Last_Name
    First_Name
    Middle_Name
    Group_ID
    Site_ID
    Dept_Num
    Report_id
    I have to use below query while polling to table1
    Select count(*) as NOSEXP, Report_id
    from table1, table2
    where table2.batch_id =
    table2.batch_id
    and table1.Status= 0
    group by Report_id;
    I mean, when I use DB adapter to poll table1, I have to use above query.
    Can you Please suggest on this.
    Thanks in advance.

    I will check for existance not based on Primary key but based on three other fields in the table. I think , by default DB adapter configured for MERGE checks for existance based on PK. Can we change the Primary Key in the mapping file after the DB adapter is configured. In that case , will it check for existance based on the fields , I mention.
    Edited by: user12020809 on Sep 16, 2012 6:08 PM

  • Custom query conditions in db adapter

    Hello,
    How to execute custom query in bpel db adapter?
    For example :
    1. select * from employee where status = 'N' and address is not null
    2. select * from empoyee where substatus = 'Y' and phone is null
    after where keyword - query part is dynamic, parameter combinations and count is unlimited ( depends on business logic ). It is not possible to implement each condition parameter as parameter in db adapter configuration.
    Db adatper query has to be something like  : select * from employee where #condition# , but #condtion# need to be interpretated as condition not string with quotes..
    best Regards,
    Uldis

    Say your complete query looks like this -
    select SUBJECT_NAME from RELATION
                where PID_GID_SSID IN (select PARTY_KEY from  xref WHERE row_id='123')
    1). In assign activity, write out the query part which comes after where clause and assign to variable query
    (select PARTY_KEY from  xref WHERE row_id='123') , replace the value of row_id from input value in assign.
    2. Now open DB adapter and pass the rest of query as input -
    select SUBJECT_NAME from RELATION
                where PID_GID_SSID IN #query

  • Processing a cursor of 11,000 rows and Query completed with errors

    So I have 3rd party data that I have loaded into a SQL Server Table. I am trying to determine if the 3rd party Members reside in our database by using a cursor and going through all 11,000 rows...substituting the #Parameter Values in a LIKE statement...trying
    to keep it pretty broad. I tried running this in SQL Server Management Studio and it chunked for about 5 minutes and then just quit. I kind of figured I was pushing the buffer limits within SQL Server Management Studio. So instead I created it as a Stored
    Procedure and changed my Query Option/Results and checked Discard results after execution. This time it chunked away for 38 minutes and then stopped saying
    Query completed with errors. I did throw a COMMIT in there thinking that the COMMIT would hit and free up resources and I'd see the Table being loaded in chunks. But that didn't seem to work.
    I'm kind of at a loss here in terms of trying to tie back this data.
    Can anyone suggest anything on this???
    Thanks for your review and am hopeful for a reply.
    WHILE (@@FETCH_STATUS=0)
    BEGIN
    SET @SQLString = 'INSERT INTO [dbo].[FBMCNameMatch]' + @NewLineChar;
    SET @SQLString = ' (' + @NewLineChar;
    SET @SQLString = ' [FBMCMemberKey],' + @NewLineChar;
    SET @SQLString = ' [HFHPMemberNbr]' + @NewLineChar;
    SET @SQLString = ' )' + @NewLineChar;
    SET @SQLString = 'SELECT ';
    SET @SQLString = @SQLString + CAST(@FBMCMemberKey AS VARCHAR) + ',' + @NewLineChar;
    SET @SQLString = @SQLString + ' [member].[MEMBER_NBR]' + @NewLineChar;
    SET @SQLString = @SQLString + 'FROM [Report].[dbo].[member] ' + @NewLineChar;
    SET @SQLString = @SQLString + 'WHERE [member].[NAME_FIRST] LIKE ' + '''' + '%' + @FirstName + '%' + '''' + ' ' + @NewLineChar;
    SET @SQLString = @SQLString + 'AND [member].[NAME_LAST] LIKE ' + '''' + '%' + @LastName + '%' + '''' + ' ' + @NewLineChar;
    EXEC (@SQLString)
    --SELECT @SQLReturnValue
    SET @CountFBMCNameMatchINSERT = @CountFBMCNameMatchINSERT + 1
    IF @CountFBMCNameMatchINSERT = 100
    BEGIN
    COMMIT;
    SET @CountFBMCNameMatchINSERT = 0;
    END
    FETCH NEXT
    FROM FBMC_Member_Roster_Cursor
    INTO @MemberIdentity,
    @FBMCMemberKey,
    @ClientName,
    @MemberSSN,
    @FirstName,
    @MiddleInitial,
    @LastName,
    @AddressLine1,
    @AddressLine2,
    @City,
    @State,
    @Zipcode,
    @TelephoneNumber,
    @BirthDate,
    @Gender,
    @EmailAddress,
    @Relation
    END
    --SELECT *
    --FROM [#TempTable_FBMC_Name_Match]
    CLOSE FBMC_Member_Roster_Cursor;
    DEALLOCATE FBMC_Member_Roster_Cursor;
    GO

    Hi ITBobbyP,
    As Erland suggested, you can compare all rows at once. Basing on my understanding on your code, the below code can lead to the same output as yours but have a better performance than cursor I believe.
    CREATE TABLE [MemberRoster]
    MemberKey INT,
    FirstName VARCHAR(99),
    LastName VARCHAR(99)
    INSERT INTO [MemberRoster]
    VALUES
    (1,'Eric','Zhang'),
    (2,'Jackie','Cheng'),
    (3,'Bruce','Lin');
    CREATE TABLE [yourCursorTable]
    MemberNbr INT,
    FirstName VARCHAR(99),
    LastName VARCHAR(99)
    INSERT INTO [yourCursorTable]
    VALUES
    (1,'Bruce','Li'),
    (2,'Jack','Chen');
    SELECT * FROM [MemberRoster]
    SELECT * FROM [yourCursorTable]
    --INSERT INTO [dbo].[NameMatch]
    --[MemberNbr],
    --[MemberKey]
    SELECT y.MemberNbr,
    n.[MemberKey]
    FROM [dbo].[MemberRoster] n
    JOIN [yourCursorTable] y
    ON n.[FirstName] LIKE '%'+y.FirstName+'%'
    AND n.[LastName] LIKE '%'+y.LastName+'%'
    DROP TABLE [MemberRoster], [yourCursorTable]
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • SCCM Custom Query

    Hello,
    I am looking for a 2007 SCCM custom query that will look for KB2964358 installed. My trouble lies when I specify the below query to see if an update is installed, and it only returns XP computers since it is looking for the ADD Remove Programs feature.
    ConfigMgr is not collecting the list of Software Updates (patches) for Window 7/Vista/ 2008/ 2008 Core operating systems. Because, on these operating systems this information is stored
    in “Win32_QuickFixEngineering”  WMI class (it’s not listed in Add Remove Programs) and the inventory of this class is NOT enabled in SMS_DEF.MOF (by def ault). Hence ConfigMgr. report won’t be able to provide these details unless and until you’ve enabled
    the appropriate WMI class in SMS_DEF.MOF. Is there any other way to look for an update installed in custom queries that will return Windows 7 machines as well?
    SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID
    = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%KB2964358%"

    Hi,
    take a look at the article below to extend the SMS_DEF.mof file to include the WMI class.
    http://technet.microsoft.com/en-us/library/cc180866.aspx
    Blog: http://theinfraguys.com
    Follow me at Facebook
    The Infra Guys Facebook Page
    Please remember to click Mark as Answer on the answer if it helps you in anyway

Maybe you are looking for

  • Why can't I get the Kodak Document Print App in the UK?

    Why can't I get the Kodak Document Print App in the UK?

  • Trying to displaying image in screen.

    Hi, I'm new to this CLDC and MIDP coding. I'm working on this code right now, but I cannot seem to display a image in the screen. All I get is a blue background. Can someone help me to make the image appear in the screen? -I think it may have to do w

  • How to run the Converter

    i am working on Java card. I have got a Very Strange Problem. The build_samples always produces error. even the converter batch file produces errors. i have installed j2sdk1.4.0 and java_card_kit-2_1_2. Mail the solution to [email protected] Thanx

  • Coupon Code Expired?!

    According to Apple, the NAWinterBook08 coupon was supposed to be extended through March 8, 2008 for a 20% discount. I tried to submit an order just now and was told that the coupon was expired. What's the deal?

  • Looking to upgrade to Leopard...possible with an external CD/DVD rom drive?

    I bought my MacBook in May 2006, and after my AppleCare had expired, my optical drive would randomly decide whether or not it would eject the disks I would feed it. Before it started acting up, I purchased Leopard and installed it right after it came