Access and JDBC not giving correct results

I am running a Query on an access DB
SELECT COUNT(*) FROM TABLE1 WHERE [First Name] LIKE '*Jamie*'
is the SQL query that should be executed. I get 0 errors or warnings but I get a result back as 0
res.next(); int max = res.getInt(1);
The max is always returned as 0.
When I do the SAME SQL query but
SELECT COUNT(*) FROM TABLE1 WHERE [First Name] = 'Jamie'
and with the above code, I get results
I am confused... please help!

why should you? sql doesn't read minds. it's an error only in your understanding. you passed a perfectly reasonable string the first time.
%

Similar Messages

  • % Change is not giving correct results.

    Hi,
    I am using Ago Function to calculate Current month cx count , previous month cx count, present month acct count, previous month acct count and in the report parameter selecting Reporting Month as DEC 09. The results are coming perfectly fine... but when I create % Change Previous Month Cx count and % change Previous month Account count, It is not showing the correct results and getting only 0% listed even if the Difference is huge and should be around 10% ...
    The code written to calculate % change is :
    CASE WHEN ("EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" IS NULL OR "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" = 0) AND NOT "EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" IS NULL AND "EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" <> 0 THEN 100.0 WHEN ("EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" IS NULL OR "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" = 0) AND ("EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" IS NULL OR "EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" = 0) THEN 0.0 WHEN "EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" IS NULL AND NOT "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" IS NULL AND "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" <> 0 THEN -(100.0) ELSE 100.0 * ("EIP BDW Analytics"."EIP Reporting FACT"."Current Month Account Count" - "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count") / "EIP BDW Analytics"."EIP Reporting FACT"."Previous Month Account Count" END
    Can some one tell me what I need to do in order to get the desired results.
    I am using a time dimension with the following hierarchy ( Year - Month - Period_ID) joined with the Reporting Table Fact which has count of cx and Count of Accts.

    We have two assets one acquired on 01/04/2014 and another on 26/04/2014.  Everything else is same for both assets like asset class , keys etc.
    Now here are two calculations.
    System is giving calculation ok , what should we do so that for both assets we are left with same scrap value (1047)  (and not 1119.68 as in last line )
    Can anyone help how to get value in last field of screen shot given below asset vale date or it is always blank.
    wanted to add something in our case DEP to the DAY is also ticked in dep key.
    regards
    Sanjeev Mehndiratta

  • Outer Join not giving correct result

    I have two tables=> tab_child_tmp (product_id,region,child_val,mst_product) and
    tab_master_tmp (master_product_id,region,master_val)
    tab_child_tmp.mst_product is the foreign key referencing tab_master_tmp.master_product_id.
    Currently the tables are populated with below values
    tab_child_tmp
    PRODUCT_ID REGION CHILD_VAL MST_PRODUCT
    Arm-01,     CAL,     100,     Arm-Master
    Arm-01,     DEL,     222,     Arm-Master
    Arm-01,     CHEN,     55,     Arm-Master
    Arm-02,     MUM,     69,     Arm-Master
    Arm-02,     DEL,     90,     Arm-Master
    tab_master_tmp
    MST_PRODUCT     REGION     MASTER_VAL
    Arm-Master     , CAL,     390
    Arm-Master     , DEL,     300
    Arm-Master, CHEN,     450
    Arm-Master, MUM,     600
    Now I want to display the result in the below format
    PRODUCT_ID REGION CHILD_VAL MASTER_VAL
    1. Arm-01     , CAL, 100,     390
    2. Arm-01     , DEL, 222,     300
    3. Arm-01     , CHEN, 55,     450
    4. Arm-01     , MUM, 0,     600
    5. Arm-02     , MUM, 69,     600
    6. Arm-02     , DEL, 90,     300
    7. Arm-02     , CHEN, 0,     450
    8. Arm-02     , CAL, 0,     390
    When I am running the below query it is not returning the above 4,7 and 8 rows. Can you please provide the correct sql to get the above desired output
    SELECT
    a.product_id,
    nvl(a.region,b.region) geo,
    nvl(a.child_val,0)match_val,
    b.master_val
    FROM
    tab_child_tmp a,
    tab_master_tmp b
    WHERE
    a.mst_product(+) = b.master_product AND
    a.region(+) = b.region
    Thanks

    Hi
    Thanks for the reply. Please find below the details.
    Oracle Version*
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Solaris: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Create Table Script_
    create table TAB_CHILD_TMP
    PRODUCT_ID VARCHAR2(50),
    REGION VARCHAR2(100),
    CHILD_VAL NUMBER,
    MST_PRODUCT VARCHAR2(50)
    create table TAB_MASTER_TMP
    MST_PRODUCT VARCHAR2(50),
    REGION VARCHAR2(100),
    MASTER_VAL NUMBER
    Insert Script_
    INSERT INTO tab_child_tmp VALUES ('Arm-01','CAL',100,'Arm-Master');
    INSERT INTO tab_child_tmp VALUES ('Arm-01','DEL',222,'Arm-Master');
    INSERT INTO tab_child_tmp VALUES ('Arm-01','CHEN',55,'Arm-Master');
    INSERT INTO tab_child_tmp VALUES ('Arm-Master','MUM',69,'PLC1');
    INSERT INTO tab_child_tmp VALUES ('Arm-Master','DEL',90,'PLC1');
    INSERT INTO tab_master_tmp VALUES ('Arm-Master','CAL',390);
    INSERT INTO tab_master_tmp VALUES ('Arm-Master','DEL',300);
    INSERT INTO tab_master_tmp VALUES ('Arm-Master','CHEN',450);
    INSERT INTO tab_master_tmp VALUES ('Arm-Master','MUM',600);
    INSERT INTO tab_master_tmp VALUES ('PLC1','MUM',199);
    INSERT INTO tab_master_tmp VALUES ('PLC1','DEL',299);
    INSERT INTO tab_master_tmp VALUES ('PLC1','CHEN',399);
    Expected output logic*
    Need to display the product value for each region along with the value of master product for the corresponding product and region. If a product doesn't belong to a particular region, but the corresponding master product is, then that value also needs to be displayed for that product and region with child value as zero.
    ie. for product Arm-01 there is no record in tab_child_tmp for region "MUM", but it's master product 'Arm-Master' has a record for region 'MUM' in tab master_tmp table. So in ouput there will be a record for product 'Arm-01' and region-'MUM' with child value as 0 and master value as 600.
    Expected Output*
    PRODUCT_ID ~~~ REG ~~~ CHILD_VAL ~~~ MASTER_VAL
    Arm-01 ~~~ CAL ~~~ 100 ~~~ 390
    Arm-01 ~~~ DEL ~~~ 222 ~~~ 300
    Arm-01 ~~~ CHEN ~~~ 55 ~~~ 450
    Arm-01 ~~~ MUM ~~~ 0 ~~~ 600
    Arm-MASTER ~~~ MUM ~~~ 69 ~~~ 199
    Arm-MASTER ~~~ DEL ~~~ 90 ~~~ 299
    Arm-MASTER ~~~ CHEN ~~~ 0 ~~~ 399
    Please help

  • Enterprise Manager does not give correct results

    I am using version 9.0.2.0.1 core edition(oc4j & web-cache).
    My application consists of business components, java beans and jsp. It is running fine.
    Oracle enterprise manager is not giving correct results of memory/cpu usage by oc4j_home and bc4j.
    Some times it does not gives result, when i refresh it twice or thrice it shows results.
    But results are not correct. On each refresh it gives different results.
    Then it is very hard to find which resuslt is correct.
    waiting for response,
    Tahir.

    i have been using 9iAS versions 102*, 90200, 90201, and now using 903.
    As stated above, some times the results for oc4j_home is displayed.
    But the memory/cpu usage for bc4j is never shown.
    Also, its radio-button is always disabled. while its status is "running".
    On BC4J page, it also shows results of application modules created. But these results are usually wrong.
    How bc4j will be enabled, and how its memory results can be get ???
    Tahir.

  • I m unable to access apple os after windows 7 instalation and its not giving the boot option

    i m unable to access apple os after windows 7 instalation and its not giving the boot option. plz any one help me out ..  how to fix it or how to delete windows 7 on my macbook

    Reboot, as soon as you hear the chime press and hold the option key, when the Boot Manager appears select OSX.

  • I'm setting up Apple ids, and its not giving me the option to set up a rescue email. How can I add one?

    I'm setting up Apple IDs, and its not giving me the option to set up a rescue email. I've set up Apple ID's in the past, and its always given me the option. How can I add a rescue email?

    You can find the instructions here. I removed the screenshots but the text is copied below.
    http://support.apple.com/kb/HT5312?viewlocale=en_US&locale=en_US
    You can edit or delete your rescue email address at My Apple ID. To edit your rescue email address:
    Navigate to My Apple ID using your web browser.
    Click "Manage your account"
    When prompted, sign in using your Apple ID and password.
    Click Password & Security
    You'll be asked to answer 2 of your 3 security questions before you can make any modifications. If you are unable to remember your answers, you can choose to send an email to your rescue email to reset your security questions.
    Note: The option to send an email to reset your security questions and answers will not be available if a rescue email address is not provided. You will need to contact iTunes Store support in order to do so. 
    After you've validated your identity by correctly answering your security questions, click Edit to the right of your rescue email address.
    Once you've finished editing your rescue email address, click the Save button directly below the email field.  

  • VL06I Inbound delivery monitor not showing correct results

    Dears,
    We are creating inbound deliveries on the basis of POs and creating GR via MIGO after eliminating movement type in line item catageory by using SPRO. For monitoring we would like to use VL06I but its not showing correct results.
    Can anyone guid me ?
    Regards,
    FR

    You can list all Inbound Deliveries by selecting "List Inbound Deliveries"  Tab in VL06I
    May be if you can little elaborate the issue

  • NonLinearFitWithMaxIters does not give correct results for phase

    Dear all,
    I am trying to fit a sin cuve with NonLinearFitWithMaxIters function of labwindows, but the results given by this function are dispersed a lot (the function does not give same results).
    In fact, I have two waveforms signals v and i (of 104 points), and I  find the phase between the two signals with NonLinearFitWithMaxIters.
    The two singals v and i are  measured with an osciloscope.
    I use the following fit functions :
    v=p1*sin(wt+p2) ;
    i=p3*sin(wt+p4) ;
    I use the NonLinearFitWithMaxIters function to fit the data and to have the parameters  p1, p2, p3, p4. Then, the phase is claculated as follow phase=p4-p3.
    The problem is that the phase calculted between the two signals (v and i) is different for each run for the same conditions.
    In fact, for a same condition, I measure different times the signals v and i, and I calculate the phase p4-p3, using NonLinearFitWithMaxIters. The goal is to calculate a mean of phases for the same condition. For example, there are cases where the phase=-5 degree, and other cases when phase=12 degree.
    For ten measures of v and i, the phase calculated is different. I get a big dispersion between the phases.
    I would like to know please why I have a big difference in phases calculated with the same condition?whern using NonLinearFitWithMaxIters.
    I read that this function does not give all time the correct results, is there a way to know when the results are not corrects and when they are correct ?
    And is there any solution to find accuratly the phase between the two waveforms.
    Thank you for your precious answer.

    The pseudocode which I am using is :
    v_err=NonLinearFitWithMaxIters(array_x,array_v,v_y_fit,1252,100,sinus,v_coef,2,&v_mean_squareError);
    The fit function is
    double sinus(double x, double a[],int noef){
        return (a[0]*sin((w*x)+a[1]));
     I use the same inital coeficient of v_coef for each run :     
    v_coef[0]=0.03;
    v_coef[1]=0.2;
    These coeficient are choosen arbitrary.
    In this case, the number of points of the data is 1252 (the data of array_v).
    The number of iterations is 100.
    For the array_x, the distance between adjacents values of the array is dt=0.4*1e-9(difference between array_x[i] anv array_x[i+1]=dt=0.4*1e-9 ).
    for (i=0;i<1252;i++){
    array_x[i]=i*(0.4*1e-9);
    The means square error returnned by the function when it is complished is  small, of the order of 0,001.
    I read the help
    « From the help:
    You must pass a pointer to the nonlinear function f(x,a) along with a set of initial guess coefficients a. NonLinearFitWithMaxIters does not always give the correct answer. The correct output sometimes depends on the initial choice of a. It is very important to verify the final result.
    That means that the function cannot be used, as it does not give correct results. How
    can we check if the results are good or not ? in my case.
    I think that in my case, the function does not give correct results, but how can I check if the results are good, or not ? The mean square error is small.

  • FOX CLOCKS not giving correct time. Central time is 2 hours ahead of the actual time

    FOX CLOCKS not giving correct time. Central time is 2 hours ahead of the actual time

    sorry not an Atomic clock issue I read your post wrong
    actually last night I tried to set my clock back to the time without Daylight savings and it would only let me set it to 1 or 3 am but not 2.. I noticed this, but I would wait till Sunday is over and see if this bug is only a one day issue which I have a feeling it may be, wait till 3am march 10th and see if this bug fixes itself I have a feeling it will

  • After an iTunes update failed to install iTunes won't open and I get lthe folloowing error messages.  Program can't start because MSVCR80.dll is missing, and iTunes not installed correctly. please reinstall iTunes. Error 7( windows errpr 126)

    After an iTunes update failed to install, iTunes won't open and I get the following two windows.  Program can't start because MSVCR80.dll is missing from your computer, and iTunes not installed correctly. Please reinstall iTunes. Error 7 (windows error 126)  When I reinstall I get the same messages and ITunes won't open.

    Click here and follow the instructions.
    (98815)

  • HT3939 Hi! Special characters such as è, ê and À are not dislayed correctly when received on an iphone, they appear like ¨c,¸e and R, why?

    Special characters such as è and À are not displayed correctly on my iphone but are no problem in my Outlook.
    Emails are sent from a blackberry Z10
    Thanks

    Special characters such as è and À are not displayed correctly on my iphone but are no problem in my Outlook.
    Emails are sent from a blackberry Z10
    Thanks

  • I have a 27" iMac with 16GB of factory installed SDRAM and 1T harddrive.  It is telling me the harddrive is full and is not functioning correctly.  How can I adjust so that all files are managed on the harddrive rather than the SDRAM.  (BTW - design flaw)

    Processor 3.4 GHz Intel Core i7
    Memory  16 GB 1333 MHz DDR3
    I have a 27" iMac with 16GB of factory installed SDRAM and 1T harddrive.  It is telling me the harddrive is full and is not functioning correctly.  How can I adjust so that all files are managed on the harddrive rather than the SDRAM.  (BTW - design flaw here.)
    Older Macs with a single Harddrive would simply expand OS management on the drive, and I think I understand the new Fusion Drive to do just that, but how do I get this product that I spent a great deal of money on to be more than a pretty screen?

    I was confused by this statement
    It is telling me the harddrive is full and is not functioning correctly.
    OS X manages ram and when you run out, it create swapfiles to extend your ram on the HDD (Hard Disk Drive). The OS itself, takes about 16 gig of space and that too resides on the HDD.  Your 16 gig of RAM is really a temporary space that holds things from the HDD so the processor can work on them.  There is no design flaw between your ram and HDD.  Something else is going on and there are a lot of smart people here to help you figure out what that "something else" is.
    I would do three things.  First I would create a backup, backups are important.  Second, I would reboot into recovery and repair my HDD.  Lastly while still booted in recovery I would repair permissions.
    Can you capture a screen shot of the exact error you are getting?

  • Install failed "APS DAEMON.EXE error. MSVCR80.dll missing" and "iTunes not installed correctly. Error 7

    How do I correct Install failed "APS DAEMON.EXE error. MSVCR80.dll missing" and "iTunes not installed correctly. Error 7

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (100246)

  • Im trying to save my cv as a word document and its not giving me the option to do when i save as

    im trying to save my cv as a word document and its not giving me the option to do when i save as

    Nathan,
    You don't say what version of Pages you are using or what version of the OS you are using. In general though, you can Export to Word format either from the File menu or the Share menu, and under some circumstances, when you Save, you can check a box to Save a Copy as: Word. Export is the best option from the point of view of being reliably available in either File or Share menus.
    Jerry

  • .bat file result not giving correctly in data services

    Hi ,
    I am using .bat file to count the number of files in the folder. I want to capture the value of the number of files.
    I have written small .bat file as shown below
    @echo off
    setlocal enableextensions
    CD %1
    set cnt=0
    for %%A in (*) do set /a cnt+=1
    echo File count = %cnt%
    endlocal
    I have used this batch  file in the script as shown below.
    $COUNT =exec('D:\\test.bat', 'D:\\docs',8);
    print($COUNT);
    In the above $COUNT is varchar(255).
    actually i have only 11 file sin the docs folder . But it is giving the 442 files.
    If I run the same batch file in the windows cmd command I am getting the correct result.
    Please let me know what will be issues?
    I am unable figure out the issues for weird result when I am using DS.
    Please help me in this issue.
    Thanks & Regards,
    Ramana.

    Hi,
    While executing the batch file it is taking the Data services installation directory path as shown below.
    14504    6420    PRINTFN    3/30/2015 9:40:10 AM    0: C:\Program Files (x86)\SAP BusinessObjects\Data Services\bin  File count = 442
    I have changed the the batch file with two parameters. one for changing directory and another one for changing the folder.
    Now my batch file looks like this.
    @echo off
    setlocal enableextensions
    %1:
    CD %2
    echo %CD%
    set cnt=0
    for %%A in (*) do set /a cnt+=1
    echo File count = %cnt%
    endlocal
    Then my script is like this .
    $COUNT =exec('D:\\test.bat', ' D D:\\docs',8);
    print($COUNT);
    Now it is giving the expected result as shown below.
    14700    13912    PRINTFN    3/30/2015 9:52:18 AM    0: D:\Docs  File count = 11
    Thanks & Regards,
    Ramana.

Maybe you are looking for

  • In indianvisa App. page; when I clicking a link in this page after a long time (2 hours), it shows me session expired. how can i solve it? Please.

    http://indianvisa-bangladesh.nic.in/visa/indianVisaRegDetails.jsp; this is page link. I want to stay in this page for a long time but i can't, they show me a message "session expired". Also I set an add-on namely Session Keeper but don't implement it

  • Tutorials for SAP NETWEAVER 7.1

    Hi I installed SAP netweaver 7.1 version in my system.PLease provide the tutorials for that. Please tell me the exact difference between between SAP netweaver 7. 0 and SAP NW 7.1. What are the added features in 7.1. please help me.

  • Debugging a non-working login hook

    I'm setting up labs in a school, some have 2008 iMacs, 2007 iMacs, 2007 Macbooks and powerbook g4's. I have a new 2008 iMac as my master image and I've set-up a LoginHook in com.apple.loginwindow.plist that runs a script that works just great. It doe

  • MacBook Pro won't sleep for more than a few seconds

    For a few months now my late '08 MBP has been intermittently refusing to sleep. When I close the lid, the system will power down to sleep mode, the Apple on the top goes out and the power light will fade off and on as expected. But after a few second

  • Feature Request: Timestamped cache

    Feature Request: I've been working on an app that pulls in a lot of files. Most of these files don't change very often, so using the cache to re-read them is definitely the preferred solution. However, because these files can change, and I don't real