SQL Issue with MS Access

Hello;
I have an SQL query:
Select year, sum(group1) as A from table1 where name in ('test1', 'test2') group by year;
When I run it through SQL editor in MS Access it returns the years and sum and a total of 5 rows.
When I pass this command through Java: Connection.createStatement and executeQuery
I can print the values and it prints 5 rows but after printing it hangs.
When i get the size of result set :
while(rs.next())
resultSetSize ++;
System.out.println(rs.getInt(1) + "\t" +resultSetSize);
It shows the result set as size of 10, when i print the values it stops at 5. I am not sure where the issue is.
I think since my where condition is have 2 values it might be causing problem.
If I just put 1 value after my where condition, then the java code runs fine.
Can anyone tell me what the issue is here or where am I going wrong?
Thanks for your help.
Edited by: yesmein on Apr 23, 2009 5:58 AM

Thanks for the suggestion. I checked the code. Indeed I was not printing an exception. When I printed the exception this is what i get:
Exception is: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
hope this helps to guide me on how to solve this issue.
Below is the code:
public static void TestQuery()
String query="SELECT year, sum(group1) as A FROM table1 WHERE name in ('test1', 'test2') ";
Connection conn = ConnectDB1.getDBConnection(); //this gets the database parameters from a properties file
Statement stat = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs = stat.executeQuery(query);
int resultSetSize=0;
while(rs.next())
resultSetSize ++;
System.out.println(rs.getInt(1) + "\t" +resultSetSize);
rs.beforeFirst();
System.out.println("Size of result set: " +resultSetSize);
while(rs.next())
System.out.println(rs.getInt(1) + "\t" + rs.getInt(2) );
rs.close();
stat.close();
conn.close();
System.out.println("End of program");
catch (Exception e){System.out.println("Exception is: " +e);}
}

Similar Messages

  • Issue with assistive access not keeping permissions

    Since a recent upgrade (likely from OS X 10.9.x to 10.10.2) I've had issues with Assistive Access blocking Automator and Applescript from interaction with dialogs.
    If I run my script or my Automator workflow (which basically has the same script in it) I get the error:
    System Events got an error: Automator is not allowed assistive access. (in the case of Automator).
    If I open Automator, and then untick and retick the Automator entry in the Accessibility options within Security & Privacy (System Preferences), then workflow can run again. It continues to work until I Quit Automator. Then it's as if OS X no longer trusts Automator to be the same app I gave Accessibility permissions to.  And the situation repeats. It's much as if it were not code-signed. The exact same issue plays out with Apple Script.
    I came across this info, which I hoped would solve the problem, but it made no difference: http://macscripter.net/viewtopic.php?id=43394 and http://bit.ly/1x3SRmc
    In my Accessibility permissions I now have:
    Script Editor
    Automator
    1Password 5 (which the script interacts with)
    com.apple.security.agentStub.xpc (in case that's being called up and triggering the Accessibility issue)
    osascript (in case that's handling the script and triggering the Accessibility issue)
    SecurityAgent.xpc (in case that was triggering the Accessibility issue)
    I added all these because the post at http://bit.ly/1x3SRmc     indicated that anything Apple Script is interacting with needs Accessibility access permissions.
    My script is as follows:
    set appName to "SecurityAgent"
    set passApp to "1Password 5" (* set this to the name of your password manager *)
    tell application "System Events"
      if not (exists window 1 of process appName) then -- test if SecurityAgent window exists
      set answer to display dialog "The password dialog was not found. Please check." buttons {"Ok"}
      return -- abort if SecurityAgent window does not exist
      end if
    end tell
    tell application "System Events"
      set position of window 1 of process appName to {10, 10}
    -- move SecurityAgent window out of the way
    end tell
    activate application passApp
    tell application "System Events"
      tell application "SystemUIServer"
      set answer to display dialog "Make sure correct 1Password item is actively selected (i.e. click it again if it was previously selected), then click “Continue” to proceed." buttons {"Continue"}
      end tell
      tell process passApp
      (* If you are not using 1Password, you may need to change the menu item clicks, below, to whatever is correct in your particular password manager *)
      click menu item "copy password" of menu "item" of menu bar 1
      delay 1
      set appData to the clipboard
      end tell
      tell application "System Events"
      tell process appName
      set value of text field 1 of window 1 to appData
      if exists (text field 2 of window 1) then
      set value of text field 2 of window 1 to appData
      if exists checkbox 1 of window 1 then
      if value of checkbox 1 of window 1 is 1 then
      click checkbox 1 of window 1
      end if
      end if
      set value of checkbox 1 of window 1 to 0
      delay 1 (* gives  a moment to see what's going on *)
      click button "OK" of window 1
      else
      if value of checkbox 1 of window 1 is 1 then
      click checkbox 1 of window 1
      end if
      delay 1 (* gives  a moment to see what's going on *)
      click button "OK" of window 1
      end if
      end tell
      end tell
    end tell
    In Automator it would appear the script is generating an error as soon as it reaches line 5, "if not (exists window 1 of process appName) then"
    I would greatly appreciate some assistance in resolving this issue.

    Starting with Mavericks, Apple changed the way that the accessibility works (see Using AppleScript with Accessibility and Security features in Mavericks) - each individual application needs to be given access, instead of a global option.  A regular AppleScript application saves properties and global variables with the script, which makes it a new application as far as the system security is concerned, so it needs to be re-added to the accessibility list.  To work with this new security feature, you need to code-sign your AppleScript application or make the script(s) in the bundle read-only so that they don't get changed (note that an AppleScript-based project in Xcode does not modify the application bundle by saving properties and globals).

  • SQL Query with MS-Access Database

    Hi,
    I have linked my oracle database with MS-Access via a DB LINK. i can access the data from MS-ACCESS, but i have a problem that when i specify the column name or define a where clause in my query it gives me the error ORA-00904: invalid identfier ..
    This query fetch the data without any problem SELECT * FROM TBLREPORT@M_ACCESS but when i run SELECT EMP_ID FROM TBLREPORT@M_ACCESS it gives me the error i mentioned above. (Column name have No problem or mistake of spelling even CASE)
    also when i try to put where clause in the query it gives me same error SELECT * FROM TBLREPORT@M_ACCESS WHERE EMP_ID = '100' (Error)
    is there any change in SQL query for ACCESS database ??
    any clue
    Regards
    Rehman

    Are column/table names in access case sensitive? Issue
    DESC TBLREPORT@M_ACCESS If column EMP_ID actual name shows up in mixed/lower case, enclose it in double quotes and use the exact case. E.g., if column name shows up as Emp_Id, use:
    SELECT "Emp_Id" FROM TBLREPORT@M_ACCESSSY.

  • SQL issue with with/without where cluase have some data issue

    Hi,
    I have an issue with the below sql. when I apply org filter for certain organization it's not returning the result but when I remove the filter that particular organization appears in the result. Can someone help to identify the cause for that. appreciate for your help.
    the filter I tried with AND T116391.ORG_HIER11_NAME                             = 'IT Hosting Services'
    SELECT DISTINCT T116391.ORG_HIER11_NAME
    FROM WC_TLNT_READINESS_D T310261
    /* Dim_WC_TLNT_READINESS_D */
    WC_TLNT_RETENTION_RISK_D T308248
    /* Dim_WC_TLNT_RETENTION_RISK_D */
    WC_TLNT_LOSS_IMPACT_D T308236
    /* Dim_WC_TLNT_LOSS_IMPACT_D */
    WC_TLNT_EMPLOYEE_D T308163
    /* Dim_WC_TLNT_EMPLOYEE_D */
    W_POSITION_DH T116081
    /* Dim_W_POSITION_DH_Position_Hierarchy */
    W_EMPLOYEE_D T115519
    /* Dim_W_EMPLOYEE_D_Supervisor */
    W_JOB_D T95865
    /* Dim_W_JOB_D */
    W_EMPLOYEE_D T68497
    /* Dim_W_EMPLOYEE_D */
    WC_ROWLVL_SECURITY_D T310120
    /* DIM_WC_ROWLVL_SECURITY_D */
    W_DAY_D T66755
    /* Dim_W_DAY_D_Common */
    W_INT_ORG_D T111939
    /* Dim_W_INT_ORG_D_Employee_Org */
    WC_TLNT_F T308187
    /* Fact_WC_TLNT_F */
    WC_TLNT_RSLTS_POTENTIAL_D T308263
    /* Dim_WC_TLNT_RSLTS_POTENTIAL_D */
    W_PAY_GRADE_D T95908
    /* Dim_W_PAY_GRADE_D */
    WC_ORG_LIST_D T304800
    /* Dim_WC_ORG_LIST_D_OrgSecurity */
    W_INT_ORG_DH T116391
    /* Dim_W_INT_ORG_DH_Employee_Org */
    WHERE ( T308187.LOSS_IMPACT_WID = T308236.ROW_WID
    AND T308163.ROW_WID = T308187.TLNT_EMPLOYEE_WID
    AND T116081.ROW_WID = T308187.EMP_POSTN_DH_WID
    AND T115519.ROW_WID = T308187.SUPERVISOR_WID
    AND T95865.ROW_WID = T308187.JOB_WID
    AND T308187.RETENTION_RISK_WID = T308248.ROW_WID
    AND T66755.X_REVIEW_YEAR_WID = T308187.REVIEW_YEAR_WID
    AND T68497.ROW_WID = T308187.EMPLOYEE_WID
    AND T68497.X_PAY_GRADE_WID = T95908.ROW_WID
    AND T68497.X_I_POPULATION_GROUP = T310120.I_POPULATION_GROUP
    AND T308187.RSLTS_POTENTIAL_WID = T308263.ROW_WID
    AND T95908.ROW_WID = T308187.PAY_GRADE_WID
    AND T111939.ROW_WID = T308187.HR_ORG_WID
    AND T111939.ORG_NUM = T304800.ORGANIZATION_ID
    AND T116391.ORG_WID = T308187.HR_ORG_WID
    AND T116391.BASE_ORG_NUM = T304800.ORGANIZATION_ID
    AND T66755.DAY_DT = TO_DATE('2012-07-10 00:00:00' , 'YYYY-MM-DD HH24:MI:SS')
    AND T116391.ORG_HIER11_NAME                             = 'IT Hosting Services'
    AND T308187.READINESS_WID = T310261.ROW_WID
    AND T308263.RESULTS_POTENTIAL = 'Strong Potential'
    AND T310120.ALLOWED = 'Y'
    AND T310120.ROW_Secuirty_GROUP = 'Corporate Full Data Access'
    AND CAST(T66755.X_REVIEW_YEAR_WID AS CHARACTER ( 30 ) ) = '2012'
    AND CAST(T308187.REVIEW_YEAR_WID AS CHARACTER ( 30 ) ) = '2012'
    AND (T111939.HR_ORG_FLG IN ('U', 'Y'))
    AND (T116391.ROW_WID IN (0)
    OR T116391.W_HIERARCHY_CLASS IN ('HR-ORG'))
    AND (T116391.ROW_WID IN (0)
    OR T116391.HR_ORG_FLG IN ('Y'))
    AND (T116391.ROW_WID IN (0)
    OR T304800.SECURITY_PROFILE_ID IN (-1))
    AND (T111939.HR_ORG_FLG IN ('Y')
    OR T304800.SECURITY_PROFILE_ID IN (-1))
    AND (T116391.ROW_WID IN (0)
    OR T116391.CURRENT_VER_HIER_FLG IN ('Y'))
    AND (T116081.CURRENT_LVL1ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL2ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL3ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL4ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL5ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL6ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL7ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL8ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_TOP_LVL_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL15ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL14ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL9ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL16ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL11ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL10ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL13ANC_LOGIN IN ('N0004404')
    OR T116081.CURRENT_LVL12ANC_LOGIN IN ('N0004404')) )
    order by T116391.ORG_HIER11_NAME desc
    Thanks
    Jay
    Edited by: Jay on Jul 10, 2012 7:51 AM

    How to ask question
    SQL and PL/SQL FAQ
    Handle:     Jay
    Status Level:     Journeyer (280)
    Registered:     Aug 6, 2010
    Total Posts:     350
    Total Questions:     61 (45 unresolved)
    REALLY?

  • Issue with web access in view administrator console after connection server 5.5 installation.

    Hi All,
    I am  trying to bring up my setup with ESXi 5.5 and vcenter 5.5 U2. I made a DNS server and made two 2008 R2 machines and launched vcentre and connection manager on them.
    After installing connection server 5.5, I am unable to open the web UI by clicking "view administrator console" icon on my desktop! I installed proper certificated and iis module too and confirmed that my https certificate is properly working. (snapshot attached, filename - snapshot_view_webpage.jpeg)
    I google for the possible error and tried below mentioned links but none of them worked.
    1.)    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004759
    Corrected this error but still system is in same shape and i am unable to get the console's admin webpage.
    2.)    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2001277
    In this method, my admin folder  didn't got recreated as the service restart got stuck for a long time and throws error that service restart got time out!!(snapshot attached)
    Can some one please help me to move forward. Please let me know if you need more information from my end.
    Thanks,
    Jeevan

    Since the policy AKS is top in sequence under service selection rule so it should hit for sure. As you wrote that even after disabling the default device admin, then also request is hitting the same and restarting the ACS services resolved the issue. The symptoms of your issue are exactly same as stated in this defect.
    CSCuo93378    Certain browsers cause ACS database corruption
    Due to this issue we have seen cases where request hits the disable and default policies without any reason. Actually accessing ACS via chrome mess around with all the operators in conditions.
    The only workaround is to access all the rules and conditions in supported browser. Ensure all the operators are correct, save the changes and restart the ACS services.
    The issue seems to be fixed in ACS 5.5 patch 5
    Regards,
    Jatin

  • Issue with Teradata access from Business Objects AIX Machine

    Hi,
    I am using BO  XI.31 which is installed on AIX 5.3 machine. I have installed Teradata driver on the machine and I have created the require ODBC.ini entry to point Teradata database. While refreshing the report I am getting below error message.
    A database error occured .The database error test is (CS) "DBDriver failed ot load: /BOBJ/xi_3.1...Connectionserver/libdbd_tdodbc.so
    0509-022 Cannot load module/BOBJ/xi_3.1....ConnectionServer/libdbd_tdodbc.so
    0509-150 Dependent module libodbc.a(odbc.so) Could not be loaded.
    0509-022 Cannot load module libodbc.a(odbc.so)
    0509-022 System error:A file or directory in the path name does not exist.
    Any body know what are the steps require to access teradata database from AIX box

    Hi Jacks,
    Following information might help you to resolve the issue.
    This is caused by a wrong HOME environment variable of the user that starts the BO processes.
    Resolution
    Check the correct path of your BO 3.1 installation and export it as HOME environment variable:
    Example:
    BO 3.1 installation path: /home/<bouser>/bo3.1/Enterprise12.0../...
    Type in the command line:
    export HOME=/home/<bouser>/boversion
    You can also change this environment variable permanently if you edit the .profile file of the BO user (home/<username>/.profile), adding the above line into the file, then source it again with:
    . .profile
    or with a logoff/logon of the session.
    Check if the path of your HOME is correct with:
    env | grep HOME
    Now you can run the installation setup without any error.
    Regards,
    Sarbhjeet Kaur

  • Issue with changing Access Service in ACS 5.2

    Hi,
    I am working on lab setup where I installed ACS 5.2 I created new access service and used it in existing service selection rule (Rule-2) earlier but it didn't work. Later I created new service selection rule and applied new service access rule. However even after this change it keeps applying predefined default access access service. Please refer attached picture for better understanding.
    As shown, I want Aks-Rule to work and apply service 'Lab-Policy' however it keeps referring Rule-2 and applies 'Default Device Admin' access service even after I disable it. 
    I have to restart ACS service from CLI console to make it work. Is this a bug or am I missing anything. Please advise guys.
    Regards,
    Akshay

    Since the policy AKS is top in sequence under service selection rule so it should hit for sure. As you wrote that even after disabling the default device admin, then also request is hitting the same and restarting the ACS services resolved the issue. The symptoms of your issue are exactly same as stated in this defect.
    CSCuo93378    Certain browsers cause ACS database corruption
    Due to this issue we have seen cases where request hits the disable and default policies without any reason. Actually accessing ACS via chrome mess around with all the operators in conditions.
    The only workaround is to access all the rules and conditions in supported browser. Ensure all the operators are correct, save the changes and restart the ACS services.
    The issue seems to be fixed in ACS 5.5 patch 5
    Regards,
    Jatin

  • Issue with Data Access Profile

    Hi Experts,
         Facing issue while using Data Access Profiles:
    I have created a data access profile ,giving access to only limited members for  a particular model.
    While logging in using a particular user id which is assigned to this data access profile I am able to see all the members for which the access is denied
    and I am also able to manipulate the transaction data. But in data access profile I have provided only read access.
    Recently,the system has been upgraded with a new support package after which we are facing the issue.
    Please help us solving the issue.
    BPC version:  10.0 NW
    SP : 15
    Best Regards,
    Remya

    Dear Ramya,
    Again do the setting for data access profile.  Sometime it will not refresh.
    Regards,
    Nanny

  • ODBC : Link sql developper with MS access

    Hi ,
    I would like to link tables from Oracle SQL Developer 1.5.4 to Ms access (2003) with ODBC.
    Could you please explain me all the steps must be followed?
    Thanks in advance
    Regards
    Lamine

    Please review this Access Migration page on OTN. Lower down on that page are links to demonstrations on making an MS Access connection.
    Please note, SQL Developer 1.5.4 is an older version of the software. The current production release is SQL Developer 2.1.1 and there are new early adopter releases of SQL Developer 3.0.
    Sue

  • BAPI_GOODSMVT_CREATE lock issue with no access to ABAP!

    Hello everyone,
    I have written a class in vb .NET that uses the BAPI_GOODSMVT_CREATE to post goods issues. I have done numerous tests myself which all were successful. However, when a colleague wanted to test my class he suddenly got the following error "The plant data of the material <XXXX> is locked by the user <XXXX>". The user specified is the standard background user we use for RFCs. So basically the user is blocking himself.
    This issue seems to be quite common as Google turns up with numerous results. They either end up with people being desperate and giving up or finding solutions in ABAP. However, my team has no access to ABAP since SAP-programming has all been outsourced to India. Getting any changes done in ABAP will be a long and tedious progress for which we simply do not have the time.
    Is there anyway to resolve this issue on our side? Maybe through other RFCs or changes in how we handle the BAPI? I am quite desperate as this problem occurred shortly before we wanted to go live and now it is not sure we can even do anything on our side.

    Hi Tom,
    If you want to call DEQUEUE_ALL from vb.net then tell your ABAP counterpart to create a new remote enabled function module and he can subsequently make a call to DEQUEUE_ALL in the custom developed function module through ABAP. You can then call the newly created custom function module using its calling parameter.
    Also, if required he can expose that newly custom created function module as a webservice that you can call from vb.net.
    I hope its clear to you now about how can you access it from vb.net.
    Regards,
    Sachin

  • SQL: Issue with running out of storage on server when running table-valued function

    SQL Version: 2008 (not r2)
    Problem:  I'm getting the following error message when running a table-valued function:
    Msg 1105, Level 17, State 2, Line 1
    Could not allocate space for object 'dbo.SORT temporary run storage:  141072001204224' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files
    to the filegroup, or setting autogrowth on for existing files in the filegroup.
    Request:  Could anyone tell me if there are modifications that I could make to my SQL code to avoid this storage issues?
    Thanks,
    ....bob sutor
    Code Facts:
    The JCCD table is a large table 2MM records
    The other tables in the JOINS are very small 15 records or less
    SQL Function Code:
    ALTER FUNCTION [dbo].[xcft_XAWP_GLBalance_JCCD_Detail]()
    RETURNS @JCGLDetail TABLE
          JCCo tinyint
        , Job varchar(10)
        , PostingSource varchar(10)
        , CostToDate numeric(12,2)
        , Phase varchar(20)
        , EarnType smallint
        , LiabilityType smallint
        , CostType tinyint
        , ControllingSetting varchar(30)
        , GLAccountCharged varchar(20)
        , DeptNum varchar(10)
        , DeptDesc varchar(30)
        , JCDC_CostType tinyint
        , CostTypeGL_Open varchar(20)
        , CostTypeGL_Closed varchar(20)
        , JCDO_ExcludePR varchar(1)
        , JCDO_Phase varchar(20)
        , PhaseGL_Open varchar(20)
        , PhaseGL_Closed  varchar(20)
        , JCDL_LiabType smallint
        , LiabTypeGL_Open varchar(20)
        , LiabTypeGL_Closed varchar(20)
        , JCDE_EarnType smallint
        , EarnTypeGL_Open varchar(20)
        , EarnTypeGL_Closed varchar(20)
    AS
    BEGIN
     DECLARE
     @WIPMonthCurrent date
     SET @WIPMonthCurrent = (Select TOP 1 WIPMonth FROM udxcWIPMonths WHERE ActiveWIPPeriod = 'Y')
     INSERT INTO @JCGLDetail
          JCCo
        , Job
        , PostingSource
        , CostToDate
        , Phase
        , EarnType
        , LiabilityType
        , CostType
        , DeptNum
        , DeptDesc
        , JCDC_CostType
        , CostTypeGL_Open
        , CostTypeGL_Closed
        , JCDO_ExcludePR
        , JCDO_Phase
        , PhaseGL_Open
        , PhaseGL_Closed
        , JCDL_LiabType
        , LiabTypeGL_Open
        , LiabTypeGL_Closed
        , JCDE_EarnType
        , EarnTypeGL_Open
        , EarnTypeGL_Closed
     SELECT  
         JCCD.JCCo, JCCD.Job, JCCD.Source, sum(JCCD.ActualCost) AS CostToDate, JCCD.Phase, JCCD.EarnType, JCCD.LiabilityType, JCCD.CostType
       , JCDM.Department, JCDM.Description
       , JCDC.CostType AS JCDC_CostType, JCDC.OpenWIPAcct AS CostTypeGL_Open, JCDC.ClosedExpAcct AS CostTypeGL_Closed
       , JCDO.ExcludePR AS JCDO_ExcludePR, JCDO.Phase AS JCDO_Phase, JCDO.OpenWIPAcct AS PhaseGL_Open, JCDO.ClosedExpAcct AS PhaseGL_Closed
       , JCDL.LiabType AS JCDL_LiabType, JCDL.OpenBurdenAcct AS LiabTypeGL_Open, JCDL.ClosedBurdenAcct AS LiabTypeGL_Closed
       , JCDE.EarnType AS JCDE_EarnType, JCDE.OpenLaborAcct AS EarnTypeGL_Open, JCDE.ClosedLaborAcct AS EarnTypeGL_Closed
     FROM JCCD
     LEFT JOIN JCJP ON JCCD.JCCo = JCJP.JCCo AND JCCD.Job = JCJP.Job
     LEFT JOIN JCCM ON JCJP.JCCo = JCCM.JCCo AND JCJP.Contract = JCCM.Contract
     LEFT JOIN JCDM ON JCCM.JCCo = JCDM.JCCo AND JCCM.Department = JCDM.Department
     LEFT JOIN JCDC ON JCDM.JCCo = JCDC.JCCo AND JCDM.Department = JCDC.Department AND JCCD.CostType = JCDC.CostType
     LEFT JOIN JCDE ON JCDM.JCCo = JCDE.JCCo AND JCDM.Department = JCDE.Department AND JCCD.EarnType = JCDE.EarnType
     LEFT JOIN JCDO ON JCDM.JCCo = JCDO.JCCo AND JCDM.Department = JCDO.Department AND JCCD.Phase = JCDO.Phase
     LEFT JOIN JCDL ON JCDM.JCCo = JCDL.JCCo AND JCDM.Department = JCDL.Department AND JCCD.LiabilityType = JCDL.LiabType
     LEFT JOIN xcft_XAWP_FiscalPeriodCutoffs_ForWIPMonth() AS cutoffs ON JCCD.JCCo = cutoffs.GLCo
     WHERE
          JCCD.Mth <= cutoffs.FiscalYear_LastMonth
         AND JCCD.Job IN(SELECT JobNum FROM budxcWIPData_SQL WHERE WIPMonth = @WIPMonthCurrent)
         AND JCCD.JCCo IN(SELECT JCCo FROM JCCO WHERE udExcludeFromWIP <> 'Y' or udExcludeFromWIP IS NULL)
         --AND LTRIM(RTRIM(JCCD.Job)) = '71-'
     GROUP BY
         JCCD.JCCo, JCCD.Job, JCCD.Source, JCCD.Phase, JCCD.EarnType, JCCD.LiabilityType, JCCD.CostType
       , JCDM.Department, JCDM.Description
       , JCDC.CostType, JCDC.OpenWIPAcct, JCDC.ClosedExpAcct
       , JCDO.ExcludePR, JCDO.Phase, JCDO.OpenWIPAcct, JCDO.ClosedExpAcct
       , JCDL.LiabType, JCDL.OpenBurdenAcct, JCDL.ClosedBurdenAcct
       , JCDE.EarnType, JCDE.OpenLaborAcct, JCDE.ClosedLaborAcct
     UPDATE @JCGLDetail
      SET
          ControllingSetting =
        CASE WHEN Phase = JCDO_Phase AND JCDO_ExcludePR = 'N' THEN 'PhaseOverride-PR Excluded'
          WHEN Phase = JCDO_Phase AND JCDO_ExcludePR = 'Y'
           AND EarnType NOT IN(Select EarnType FROM JCDE WHERE JCDE.JCCo = JCCo AND JCDE.Department = DeptNum)
           AND LiabilityType NOT IN(Select LiabType FROM JCDL WHERE JCDL.JCCo = JCCo AND JCDL.Department = DeptNum)
           THEN 'PhaseOverride-PR Not Excluded'
          WHEN EarnType = JCDE_EarnType THEN 'Earn Type Override'
          WHEN LiabilityType = JCDL_LiabType THEN 'Liability Type Override'
          ELSE 'Cost Type' END
     UPDATE @JCGLDetail
      SET
          GLAccountCharged =
        CASE WHEN ControllingSetting = 'PhaseOverride-PR Excluded' OR ControllingSetting = 'PhaseOverride-PR Not Excluded'
          THEN PhaseGL_Open
          WHEN ControllingSetting = 'Earn Type Override' THEN EarnTypeGL_Open
          WHEN ControllingSetting = 'Liability Type Override' THEN LiabTypeGL_Open
          ELSE CostTypeGL_Open END
    RETURN 
    END
    Bob Sutor

    well, did you either restart the instance or add another tempdb file (no restart required) to let other transactions  continue on the server.
    or check if autogrowth was limited, change that to unlimnited , to the transactions conintue..
    the function may be dumping the data on to tempdb, how much data are you excepting back...what are indexes on the tables
    Hope it Helps!!

  • HT4623 IOS 7 issues with FaceTime access

    Just updated my IPad with IOS 7 and can't access FaceTime can anyone help me please ?

    I have found that people with this problem have been able to get it worked out after a restore.
    http://support.apple.com/kb/HT1414

  • Issue with Excel Access Web Part, with sites that were migrated from 2010 SP to 2013 SP

    Hello, 
    If I try to add an Excel Access Web Part to a page I get the following:
    **Note: This only happens with sites that were migrated from 2010 SharePoint to SharePoint 2013. If I create a new site the feature works like it should and loads the workbook. I've tested this on several sites, our environment is enterprise as well. Being
    that the majority of our sites were migrated from 2010, I need this to work! 

    Can you try below fix and let me know
    http://blogs.technet.com/b/excel_services__powerpivot_for_sharepoint_support_blog/archive/2013/05/21/excel-services-the-workbook-cannot-be-opened.aspx

  • Issue with the Access Sequence related to Pricing

    Hi Gurus,
    I have one issue related to Pricing. I have an access sequence ZPCD which has Table "A558" assigned to it.
    Table A558 has fields
      5  Sales Org
    10  Distribution channel
    20  Division
    25  Customer.
    But the issue is here.....in the access sequence ZPCD the field "20  Division" got deleted some how.
    but i checked the table A558, it has "Division" in it.
    So, summary is Table A558 has field Division, but the access sequence ZPCD is missing field Division in Access table A558.
    Table 518 contains 585 condition record entries entries in Production system.
    So question is how will i add Division back to the Access sequence Table A558.
    Waiting for your expert advise and comments
    Thank you

    Dear Anitha
    If I am correct, in access sequence, at field level, there is no deletion option available and hence, I am surprised how this could be possible.
    Anyway, you can try in development server as follows:-
    Go to V/07, select ZPCD, block the table 558 and delete.  Save the data.  Now try to reassign the same table and see how it works.
    thanks
    G. Lakshmipathi

  • Error with sql commands with ms access

    hi!
    I'm having problems with sending commands like "create group x" and "alter database password" these aren't working.
    I'm using the jdbcodbc bridge. Simply doing this:
    Statement stmt = con.createStatement();
    stmt.executeUpdate ("alter database password a null");
    doesn't work.
    create group also don't work. Surely other stuff also don't work. But things like create table, drop table, create proc, do work.
    I can't do all the stuff that appears here.
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acadvsql.asp
    What may be happenning?
    can all that really work from java just like this or it don't?
    I'm using Access 2002 with access 2000 db format.
    Thanks.
    Greeting from chile.

    Well may be I am ignorant. I'm doing a real thing (for somebody) for the first time. They will buy few pcs. Also I think I would like they update to access 2000 or 2002 from 97 because of the semi stored procedures... They will do a lot of effort to just buy that but they really need it.
    I just actually wanted the ability to mantain users and assign permissions to do stuff from the same application. That would have been nice but it is not critical, at least execute procedures does work.

Maybe you are looking for