Now how to create a tsql to get best result.

Hi all
I have a table that called   voucheritem
This table has 6 fields
And my standard value is:
Rows
Rules
Subsidiary
1ad
2ad
3ad
4ad
5ad
1
Rule 1
2050  
103
207
396
452
509
2
Rule 2
2050
107
210
354
431
580
Row 1 : I want to compare rule1 and the table values (voucheritem), when the values are opposite of each other then show the values
Row2 : I want to compare rule2 and the table values (voucheritem), when the values are opposite of each other then show the values
I run this code:
Select * from
voucheritem
Result is
Rows
Subsidiary
1ad
2ad
3ad
4ad
5ad
1
2050  
103
208
396
452
509
2
2050
107
210
354
435
580
3
2050
110
210
300
430
590
4
2050
100
207
396
452
510
5
2050
107
210
360
431
580
6
2050
103
207
396
452
509
7
2050
107
210
354
431
580
see row 1 :
2ad has 208 value its not equal by rule 1
row 2: 4ad has  435 value . its not equal by rule 2
 Now how to create a tsql to  get best result.
Name of Allah, Most Gracious, Most Merciful and He created the human

Does this do what you were looking for?
DECLARE @rules TABLE (ruleID INT, subsidiary INT, ad1 INT, ad2 INT, ad3 INT, ad4 INT, ad5 INT)
INSERT INTO @rules (ruleID, subsidiary, ad1, ad2, ad3, ad4, ad5)
values
(1,2050,103,207,396,452,509),
(2,2050,107,210,354,431,580)
DECLARE @voucheritem TABLE (voucherID INT, subsidiary INT, ad1 INT, ad2 INT, ad3 INT, ad4 INT, ad5 INT)
INSERT INTO @voucheritem (voucherID, subsidiary, ad1, ad2, ad3, ad4, ad5)
values
(1, 2050, 103, 208, 396, 452, 509),
(2, 2050, 107, 210, 354, 435, 580),
(3, 2050, 110, 210, 300, 430, 590),
(4, 2050, 100, 207, 396, 452, 510),
(5, 2050, 107, 210, 360, 431, 580),
(6, 2050, 103, 207, 396, 452, 509),
(7, 2050, 107, 210, 354, 431, 580)
SELECT v.*,
CASE WHEN v.ad1 NOT IN (SELECT ad1 FROM @rules) THEN 'E' ELSE NULL END AS ad1Error,
CASE WHEN v.ad2 NOT IN (SELECT ad2 FROM @rules) THEN 'E' ELSE NULL END AS ad2Error,
CASE WHEN v.ad3 NOT IN (SELECT ad3 FROM @rules) THEN 'E' ELSE NULL END AS ad3Error,
CASE WHEN v.ad4 NOT IN (SELECT ad4 FROM @rules) THEN 'E' ELSE NULL END AS ad4Error,
CASE WHEN v.ad5 NOT IN (SELECT ad5 FROM @rules) THEN 'E' ELSE NULL END AS ad5Error
FROM @voucheritem v
LEFT OUTER JOIN @rules r
ON v.ad1 = r.ad1
AND v.ad2 = r.ad2
AND v.ad3 = r.ad3
AND v.ad4 = r.ad4
AND v.ad5 = r.ad5
WHERE r.ruleID IS null

Similar Messages

  • M-Audio Fast Track, how to get best results?

    Hey guys.
    I just got my M-Audio Fast Track. It seems quite cool. Not really to sure what to do with it though!
    I'm using it to record guitars and vocals into GB.
    So how can i set it up to get best results?
    Right now I have my Audio System Preferences set to Built in Audio for In and Out, but in GB preferences I have Input set to FastTrack and Out set to Built-In...
    It seems to be quite quiet, quieter than if i plug my guitar directly into the iMacs line in...?
    Cheers
    jim
    P.S. Please don't bother writing about how I should have bought a Firewire device or anything else, I'm a cheap *** student, I bought what I could!

    Jim
    I have just bought one and the sound is good. I monitor sound thru my HI_FI system. The settings I have are:
    1. Leave sound settings alone in system preferences.
    2. In GB2 I have set input and output devices to fast track. (By the way there are no drivers available for this device - it is natively supported by OS X)
    To adjust volume I have to adjust the right hand output volume knob on the front of the Fast track. My G5 system volume control has no effect on the fast track.
    Andrew

  • HOW TO CHANGE SQL QUERY TO GET SPECIFIC RESULT

    I HAVE FOLLOWING QUERY AND ITS FUNCTIONING BUT I WANT ALL THOSE RECORD SHOULD BE DISPLADE WICH HAVE NO TRANSACTION IN SALES ANS SALES RETURN WHILE RETREVING DATA FROM DATABASE.
    I TRIED TO USE + OPERATOR BUT I DON'T KNOW HOW TO CHANGE THE QUERY TO GET THE RESULT
    MAIN TABLE IS BEING USED TO FETCH RECORD
    SALES_HEADER,SALES_DETAIL
    SALES_HEADERR,SALES_DETAILR
    STOCK_REG
    AND THE QUERY IS
    select s.item_code,S.DESCR,s.GRAND_TOTAL,
    sum(decode(d.dayno,01,NVL(S.QTY,0),0)) DAY1,
    sum(decode(d.dayno,02,NVL(S.QTY,0),0)) DAY2,
    sum(decode(d.dayno,03,NVL(S.QTY,0),0)) DAY3,
    sum(decode(d.dayno,04,NVL(S.QTY,0),0)) DAY4,
    sum(decode(d.dayno,05,NVL(S.QTY,0),0)) DAY5,
    sum(decode(d.dayno,06,NVL(S.QTY,0),0)) DAY6,
    sum(decode(d.dayno,07,NVL(S.QTY,0),0)) DAY7,
    sum(decode(d.dayno,08,NVL(S.QTY,0),0)) DAY8,
    sum(decode(d.dayno,09,NVL(S.QTY,0),0)) DAY9,
    sum(decode(d.dayno,10,NVL(S.QTY,0),0)) DAY10,
    sum(decode(d.dayno,11,NVL(S.QTY,0),0)) DAY11,
    sum(decode(d.dayno,12,NVL(S.QTY,0),0)) DAY12,
    sum(decode(d.dayno,13,NVL(S.QTY,0),0)) DAY13,
    sum(decode(d.dayno,14,NVL(S.QTY,0),0)) DAY14,
    sum(decode(d.dayno,15,NVL(S.QTY,0),0)) DAY15,
    sum(decode(d.dayno,16,NVL(S.QTY,0),0)) DAY16,
    sum(decode(d.dayno,17,NVL(S.QTY,0),0)) DAY17,
    sum(decode(d.dayno,18,NVL(S.QTY,0),0)) DAY18,
    sum(decode(d.dayno,19,NVL(S.QTY,0),0)) DAY19,
    sum(decode(d.dayno,20,NVL(S.QTY,0),0)) DAY20,
    sum(decode(d.dayno,21,NVL(S.QTY,0),0)) DAY21,
    sum(decode(d.dayno,22,NVL(S.QTY,0),0)) DAY22,
    sum(decode(d.dayno,23,NVL(S.QTY,0),0)) DAY23,
    sum(decode(d.dayno,24,NVL(S.QTY,0),0)) DAY24,
    sum(decode(d.dayno,25,NVL(S.QTY,0),0)) DAY25,
    sum(decode(d.dayno,26,NVL(S.QTY,0),0)) DAY26,
    sum(decode(d.dayno,27,NVL(S.QTY,0),0)) DAY27,
    sum(decode(d.dayno,28,NVL(S.QTY,0),0)) DAY28,
    sum(decode(d.dayno,29,NVL(S.QTY,0),0)) DAY29,
    sum(decode(d.dayno,30,NVL(S.QTY,0),0)) DAY30,
    sum(decode(d.dayno,31,NVL(S.QTY,0),0)) DAY31,
    sum(S.qty) TU
    FROM
    (select nvl(sales_detail.qty+sales_detail.bonus,0) as qty,
    sales_detail.item_code AS ITEM_CODE,
    stock_reg.descr AS descr,
    s_date as sale_date,stock_reg.GRAND_TOTAL AS GRAND_TOTAL FROM
    SALES_DETAIL,SALES_HEADER,STOCK_REG
    WHERE SALES_DETAIL.S_ID = SALES_HEADER.S_ID AND
    SALES_DETAIL.ITEM_CODE = STOCK_REG.ITEM_CODE(+) AND
    STOCK_REG.COMCODE='C1'
    UNION all
    select -1*nvl(sales_detailR.qty+sales_detailR.bonus,0) as qty,
    sales_detailR.item_code AS ITEM_CODE,
    stock_reg.descr AS descr,
    RETURN_date as sale_date,stock_reg.GRAND_TOTAL AS GRAND_TOTAL FROM
    SALES_DETAILR,SALES_HEADERR,STOCK_REG
    WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
    SALES_DETAILR.ITEM_CODE = STOCK_REG.ITEM_CODE(+) AND
    STOCK_REG.COMCODE='C1') S,
    (select level as dayno
    from dual
    connect by level <= 31) d
    where d.dayno = to_char(s.sALE_date, 'DD') AND TO_DATE(S.SALE_DATE) BETWEEN '&FROMDATE' AND '&TODATE'
    GROUP BY S.ITEM_CODE,S.DESCR,S.GRAND_TOTAL

    well my query running successfully just the quesion was that i wanted to bring some changes in the query to retrieve the complete record which has no transaction in sales
    for exmple
    if i write the quey
    select dept.deptno,sum(sal) from emp,dept
    where dept.deptno = emp.deptno
    group by dept.deptno
    the recult comes as
    DEPTNO SUM(SAL)
    10 8750
    20 10875
    30 9400
    though there is another deptno which is deptno no 40
    have no sal
    and when i use this query
    select dept.deptno,sum(sal) from emp,dept
    where dept.deptno = emp.deptno(+)
    group by dept.deptno
    it shows the dept no 40 also
    DEPTNO SUM(SAL)
    10 8750
    20 10875
    30 9400
    40
    so to get this i posted query which was to long to understand easily.
    i accept that i sholud post short query to make other understand
    so check out this
    select STOCK_rEG.item_code AS ITEM_CODE,SUM(qty) as qty
    FROM
    SALES_DETAILR,SALES_HEADERR,STOCK_REG
    WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
    SALES_DETAILR.STOCKCODE = STOCK_REG.STOCKCODE
    AND RETURN_DATE = '01-APR-08'
    GROUP BY STOCK_rEG.item_code
    ORDER BY TO_NUMBER(ITEM_CODE) ASC
    when i execute this query i get the following result
    ITEM_CODE QTY
    84 2
    102 3
    108 3
    116 6
    166 3
    170 3
    thoug there is other items are aalso available in stock which transaction
    yet not been done or not been sold out/
    so when i use the outer join i get the same result
    select STOCK_rEG.item_code AS ITEM_CODE,SUM(qty) as qty
    FROM
    SALES_DETAILR,SALES_HEADERR,STOCK_REG
    WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
    SALES_DETAILR.STOCKCODE(+) = STOCK_REG.STOCKCODE
    AND RETURN_DATE = '01-APR-08'
    GROUP BY STOCK_rEG.item_code
    ORDER BY TO_NUMBER(ITEM_CODE) ASC
    ITEM_CODE QTY
    84 2
    102 3
    108 3
    116 6
    166 3
    170 3
    hope i tried to make u understand on better way

  • How long does it take to get the result of hands-on-course test?

    Hi:
    I passed 1Z0-043 and submitted hands-on-course.
    How long does it take to get the result? And how long does it take to get the certificate?
    Another question:
    Is there any place you can search for OCPs?, just to check those people who have fake certificates.
    Saad,

    S.Nayef wrote:
    Hi:
    I passed 1Z0-043 and submitted hands-on-course.Congratulations!
    How long does it take to get the result? And how long does it take to get the certificate?Submitting hands-on-course should take 2-3 weeks. After that, you'll wait approximately 1 month to get certificatre
    Another question:
    Is there any place you can search for OCPs?, just to check those people who have fake certificates.NO there's not
    >
    Saad,

  • How to create function module for getting customer name

    Hi Experts,
                   How to create function module?  when in import parameter kunnr values to be passed it must give name1 details according to the customer number...
    how to write the logic in source code....
    Regards,
    Thiru. R

    1. First of all create function group.
    2. Create function module using this function group.
    3. If only one kunnr is needed at a time, create import parameter for it. But if many kunnr to be entered at a time,use table.
    4. Fetch name1 for each kunnr from KNA1 table.
    "->> if many kunnr
    if not t_kunnr[] is initial.
    select kunnr as kunnr name1 as name1
    into table t_kunnr_name1
    from kna1
    for all entried in table t_kunnr
    where kunnr = t_kunnr-kunnr.
    endif.       
    sort t_kunnr_name1 by kunnr name1.
    delete adjacent duplicates from t_kunnr_name1 comparing kunnr name1.
    table t_kunnr_name1 will contain kunnr and its name1.
    I hope logic is clear for you now.
    Regards,
    Aparna

  • How to Create process of Type : Get Next or Previous Primary Key Value

    Hi,
    Can anybody give the steps how to create the page process for type Get Next or Previous Primary Key Value in oracle Express database
    Ramesh j c.

    Hi Justin,
    In oracle 10g XE , we have sample application v2.0
    1. Do you have any Document to create step by step the sample application v2.0 and Is it possible to create all the pages of this sample application v2.0 b by wizard. To recreate or create the demo app, start from the home area,
    next go to application builder,
    then click the create button,
    next choose "demonstration application"
    and then you can choose "Run | Edit | Re-install" the "Sample Application" along with a few other apps.
    2. When we install this sample application v2.0 , which is the sql script is executed or how it is installed. If you want the sample application you can export it after you create it if you want the SQL associated with it.
    3. Whenever the sample application v2.0 is installed, how the encrypted pass word is created for the user demo and admin. This is setup with the application install. I don't believe it is encrypted either. If your wanting SSL there are some threads on here that talk about encrypting content.
    Justin thanks for to create process Get Next or Previous Primary Key Value

  • How to create a function to get the 16th of the current month and the 15th of the next month

    I need to create a function to get the 16th of the current month and 15th of the next month to use it in the fast formula to calculate the sick leave.
    Example:
    If an employee takes a sick leave from 16 feb 2015 to 17 feb 2015 , I want it to affect march's payroll not February.
    Please help and thanks in advance.

    Below statement gives you the result. Use the concept and write your PL/SQL function.
    select TO_DATE('16-'||TO_CHAR(SYSDATE, 'MON-RRRR')), TO_DATE('15-'||TO_CHAR(add_months(SYSDATE, 1), 'MON-RRRR')) from dual;
    Or you can use same construct directly in the fast formula by changing syntax accordingly.
    Regards,
    Peddi.

  • [LV - TS] How to execute a SEQ file, get the result (PASS/FAIL) and the report file ?

    Hello,
    I'm looking for the most obvious and simple way to, from Labview :
    1- Start the Teststand engine : DONE
    2- Get a list of SEQ files to execute : DONE
    3- Loop through the list to execute each SEQ file : <- found some examples but I have some trouble with the UIMessage stuff
    http://zone.ni.com/reference/en-XX/help/370052N-01/tsexamples/infotopics/executing_sequences_using_api_labview/
    4- Get the result of the SEQ execution : <- unsure
    5- Get the XML path+name of the report file generated : <- obviously not easy
    http://digital.ni.com/public.nsf/allkb/3D3B2358DF9B786B8625789500549A3B
    http://forums.ni.com/t5/NI-TestStand/Getting-Report-File-Path-location-at-execution-in-TestStand-2012/td-p/3041789
    Here is my current implementation :
    David Koch
     

    Hello,
    I tried to work from this example :
    http://forums.ni.com/t5/NI-TestStand/Execution-of-TestStand-Sequence-in-LabVIEW-via-TS-API-Different/td-p/2939616/page/2#M46686
    However it remains unclear about how to get a simple
    answer from just running a sequence file out of any
    model so far (Simple Pass). Like I told you, all what
    I need, once the TS engine is started, is a VI with the
    following interface :
    INPUT
    1- TS engine reference
    2- SEQ file path (path or string)
    3- Sequence name to execute
    4- UUT string (optional, but yeah)
    5- error in
    OUTPUT
    1- Result boolean (PASS/FAIL)
    2- Path to XML report
    3- error out
    It would be so cool to just have this
    About the surrounding UI, I'm working on it. The LV
    code is not really important at this point, it's running
    a SEQ file that matters to me.
    David Koch
     

  • How to write a query to get this result?

    I have four tables. how to get the result meet the following condition?
    1,select all from USERACC_FOR_DOM_REP table.
    2,then take out(filter out) the username from EXCEPTION_ACC table where EXCEPTION_ACC.username=USERACC_FOR_DOM_REP.username and
    EXCEPTION_ACC.TARGET_DB=USERACC_FOR_DOM_REP.TARGET_DB
    3, then take out(filter out) the username from MAX_USER_LOGIN table where MAX_USER_LOGIN.username=USERACC_FOR_DOM_REP.username and
    MAX_USER_LOGIN.TARGET_DB=USERACC_FOR_DOM_REP.TARGET_DB and MAX_USER_LOGIN.LAST_LOGIN < sysdate -90).
    4, then take out(filter out) the username from MYTABLE table where MYTABLE.username=USERACC_FOR_DOM_REP.username and
    MYTABLE.TARGET_DB=USERACC_FOR_DOM_REP.TARGET_DB
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    SQL> desc USERACC_FOR_DOM_REP
    Name Null? Type
    USERNAME NOT NULL VARCHAR2(30)
    ACCOUNT_STATUS NOT NULL VARCHAR2(32)
    TARGET_DB VARCHAR2(9)
    SQL> desc EXCEPTION_ACC
    Name Null? Type
    USERNAME NOT NULL VARCHAR2(30)
    TARGET_DB VARCHAR2(15)
    SQL> desc MAX_USER_LOGIN
    Name Null? Type
    USERNAME NOT NULL VARCHAR2(30)
    TARGET_DB VARCHAR2(9)
    LAST_LOGIN DATE
    INSERT_DATE DATE
    SQL> desc MYTABLE
    Name Null? Type
    USERNAME VARCHAR2(20)
    TARGET_DB VARCHAR2(20)

    sorry if i didn't make this clear.
    here is the problem. i have three tables. like below. i also give some sample data
    USERS, USER_MAX_LOGIN, EXCEPTION_USER
    USERS table has all the user information for each user in each database.
    USER_MAX_LOGIN has those users who logged in within 1 year (we keep 1 year audit data)
    EXCEPTION_USER has user which should be excluded from the report.
    My report need to find all users in all databases who has not logged in for more than 90 days.
    USERS
    username     target_db     profile     
    u1     d1     user     
    u2     d1     user     
    u3     d2     user     
    u1     d2     user     
    u2     d2     user     
    u3     d1     user     
    USER_MAX_LOGIN
    username     target_db     last_login_date     
    u1     d1     02-Jan-12     
    u3     d2     06-Aug-11     
    u1     d2     06-Aug-11     
    u2     d2     06-Sep-11     
    EXCEPTION_USER
    username     target_db          
    u2     d1          
    THIS IS THE REPORT I NEED TO BE LOOK LIKE.               
    username     target_db     last_login     profile
    u3     d2     06-Aug-11     user
    u1     d2     06-Aug-11     user
    u2     d2     06-Sep-11     user
    u3     d1     UNKNOWN     user <<----- the unknown means we don't know when the user logged in last time. the user_max_login table does not have its information.

  • How to create a button to get the image form MPMoviePlayerController?

    I get the workspaces from the samples.(iOS Developer Library).But I want to create a button on OverlayView in order to snapshot the movie being played. I want to know how to do it.Thanks a lot.

    I don't have a clue what you're asking, but I suspect the question would be better directed to the Developers Forum, since you are referring to iOS Developer Library.

  • Date half a year from now, how to create?

    How can I create a Date () instance which resembles half a year, or 2 months or a year or a day etc. etc. from now?
    Thanks!

    So, I did something like...
    Date now = new Date ();
    Timestamp timeStamp = new Timestamp (now.getTime ());
    GregorianCalendar calendar = new GregorianCalendar ();
    // TODO - FOR NOW WE ADD 60 DAYS TO THE EXISTING TIMESTAMP FOR THE EXPIRY DATE.
    calendar.add (Calendar.DATE, 60);
    Date expiryDate = calendar.getTime ();
    Timestamp expTimeStamp = new Timestamp (expiryDate.getTime ());

  • How to create a formula to get the month name based on userresponse

    Hi,
    I have created a report using E-Fashion - Actually i need  a report like  -  For ex i need 4 months data from 12 months
    My report should display the 4 months data along with starting & end month data in the next 2 columns
    I have used the prompt to fetch the data & i have created a formula in the cloumn like below:
    For the column haader i have given = Tonumber(userresponse("Enter start:")) - I am getting the Month number in the header But i need the month name in the header.Please guide me
    Regards
    Karthika

    Hi Ram,
      Thanks for your Help.I tried in an another way like I created 2 Variable -
    Start Date  =UserResponse("Enter Month(Start):"
    End Date = =UserResponse("Enter Month(End):"
    I have created the column header for
    start date:
    =If([start Date] = "1";"January";If( [start Date] = "2"; "February";If([start Date] = "3";"March";If([start Date] = "4";"April";If([start Date] = "5";"May";If([start Date] = "6";"June";If([start Date] = "7";"July";If([start Date] = "8";"August";If([start Date] = "9";"September";If([start Date] = "10";"October";If([start Date] = "11";"November";If([start Date] = "12";"December"))))))))))))
    End Date:
    =If([End Date] = "1";"January";If( [End Date] = "2"; "February";If([End Date] = "3";"March";If([End Date] = "4";"April";If([End Date] = "5";"May";If([End Date] = "6";"June";If([End Date] = "7";"July";If([End Date] = "8";"August";If([End Date] = "9";"September";If([End Date] = "10";"October";If([End Date] = "11";"November";If([End Date] = "12";"December"))))))))))))
    For the Datas in the column:
    Start Date:
    =[Sales revenue] Where([Month]=ToNumber(UserResponse("Enter Month(Start):")))
    End Date:
    =[Sales revenue] Where([Month]=ToNumber(UserResponse("Enter Month(End):")))
    I got the Report format as i required
    Thanks
    Karthika

  • How to create a button to get File Open popup window and select a file

    Hi,
    I have an applet that contains Browse button. When user clicks on that, a File Open popup window should be displayed to enable user to select the input file. This file path should be given back as parameter.
    How to do this? I have tried using LoadFileData but not able to get the desired result.
    Any pointers would be helpful.
    Thanks,
    Lalitha Dandibotla

    Do you need only the path or also the file back into Siebel?
    If you need both, the have a look at any attachment applet, that will give you a good start.
    Are you using Siebel in High Interactivity (HI) Mode or Standard Interactivity (SI) Mode?
    If you are in SI Mode have a look at the html type
    <input type="file">
    http://www.w3.org/TR/html401/interact/forms.html#h-17.4
    Axel

  • How to create an invoice and get customer to sign

    Im just starting my own mobile mechanic business and I want to use my iPad 2 (3G & wifi) to create an invoice on the job, I also would like to get the customer to sign for the job on my screen.
    Is this possible ?

    Hi,
    Are you looking for BAPI <b>BAPI_ACC_INVOICE_RECEIPT_POST</b>?
    Hope this helps (please reward me if it does).
    Regards, Joerg

  • How to create a Certificate that gets validated by Mozilla

    Hi,
    I've written an application that enables it's user to act as a CA.
    He can create Key-Paris, Certificates, sign Certificates and various other things.
    Among them he is able to export any KeyStore-Entry (i.E. a Key-Pair) to a PKCS#12 file.
    The problem that I am encountering here is, that Mozilla Browsers (i.E. Firefox) won't recognize the importet Certificate as a valid one. It says "The certificate couldn't be verified for unknown reason" (sorry, but I can't provide the exact error message because I use a localized build of firefox).
    What I do in order to reproduce this Problem is basicly this:
    - Create a Key-Pair
    - Create a (self-signed) certificate from the Public-Key
    - Store them as a PrivateKeyEntry in my KeyStore
    - sign the certificate with my self-signed CA-Certificate
    - export my CA-Certificate to Firefox
    - export my PrivateKeyPair to a PKCS#12-File wich I import with Firefox
    Any help would be greatly apreciated.

    (I would have appreciated it if you had pasted the certificate with the line-breaks, as required for PEM format certificates. Nevertheless...)
    Your certificate shows why Mozilla will not recognize the self-signed certificate from keytool as a Root CA: it does not contain the SubjectKeyIdentifier or AuthorityKeyIdentifier extensions in them.
    RFC3280 (http://www.ietf.org/rfc/rfc3280.txt) states the following:
    Conforming CAs MUST support key identifiers (sections 4.2.1.1 and
    4.2.1.2), basic constraints (section 4.2.1.10), key usage (section
    4.2.1.3), and certificate policies (section 4.2.1.5) extensions.Implementors of software that handle digital certificates choose to implement PKIX standards in stages; Mozilla has implemented more PKIX standards than keytool does, so while keytool will recoginize a Mozilla (or other PKIX-compliant) CA certficate, almost no PKIX-conformant certificate-handling software will handle self-signed CA certs issued by keytool.
    I would recommend you download something like EJBCA or OpenCA from sourceforge.net to create your self-signed CA. Ultimately, your CA certificate must look something like this (don't miss the SubjectKeyIdentifier and AuthorityKeyIdentifier extensions):
    Certificate:
        Data:
            Version: 3 (0x2)
            Serial Number:
                2b:d0:5f:b0:71:64:67:0e
            Signature Algorithm: 1.2.840.113549.1.1.11
            Issuer: CN=StrongKey DEMO Root CA, OU=For StrongKey DEMO Use Only, O=StrongAuth Inc
            Validity
                Not Before: Jul 25 16:02:17 2006 GMT
                Not After : Jul 22 16:12:17 2016 GMT
            Subject: CN=StrongKey DEMO Root CA, OU=For StrongKey DEMO Use Only, O=StrongAuth Inc
            Subject Public Key Info:
                Public Key Algorithm: rsaEncryption
                RSA Public Key: (4096 bit)
                    Modulus (4096 bit):
                        00:88:42:9c:c0:40:1f:06:8a:f7:55:93:c5:35:4b:
                        54:38:58:61:9b:04:2b:61:07:44:05:76:42:f9:e8:
                        2d:b9:99:c5:84:16:b1:40:43:5b:06:ca:fc:9b:d4:
                        59:f7:d6:2e:28:78:63:12:09:58:9e:db:a2:91:c2:
                        58:b5:5b:1e:9f:5e:cd:57:bb:83:ec:10:85:45:c3:
                        ee:0e:f7:6a:71:63:95:5f:5c:ce:6c:fd:43:54:bd:
                        af:ef:63:ae:e3:37:18:44:7b:2c:a3:7f:8d:00:04:
                        9a:a4:7e:48:c9:9e:c6:de:65:40:17:f6:3e:58:3b:
                        b1:f2:a9:4b:61:fb:d7:52:b2:c7:7f:22:25:5b:53:
                        c3:0e:22:94:17:21:ce:82:c3:79:cd:96:9f:cd:7e:
                        b2:b5:f4:0a:38:ac:1a:2d:bb:21:66:b5:20:43:3d:
                        94:85:fa:2b:a7:53:88:43:bc:9b:03:d2:5e:4a:dc:
                        d0:90:ac:55:99:54:5c:34:d2:f0:8e:18:ff:ea:12:
                        14:da:7f:77:63:30:d1:75:77:f1:ef:ac:11:3a:48:
                        43:c3:d0:f9:bb:1e:07:f5:6e:da:c9:ab:88:ff:e2:
                        ad:b8:24:e6:b1:3a:88:14:69:0b:41:3e:b0:02:00:
                        61:b3:a0:43:b2:46:3a:b8:37:a8:c3:57:a6:db:71:
                        78:97:04:cf:19:e8:e8:5a:c9:1a:73:77:75:36:5e:
                        19:7b:f6:24:fa:2d:df:19:5c:5c:3d:a3:79:aa:81:
                        55:5b:34:4a:c5:7d:85:e5:d9:ee:5f:74:30:5f:23:
                        63:e9:45:49:5d:d6:ef:95:32:d3:2c:10:08:86:06:
                        be:79:3c:3c:f8:82:b7:37:2c:dd:59:66:96:fe:cf:
                        9a:60:58:23:a1:26:ff:16:f0:c9:55:bf:27:fc:af:
                        de:6a:11:da:9a:c8:65:77:e4:ca:b6:2f:d3:58:ef:
                        93:1b:34:de:3a:81:07:b7:12:b2:61:83:a2:77:fc:
                        f3:53:fc:c2:71:db:d2:97:c5:50:c8:34:e8:4e:54:
                        da:c3:fb:31:79:34:c2:eb:b3:e0:be:38:fc:1e:5c:
                        ca:04:13:83:9e:e3:b0:66:30:33:56:82:d6:dd:c9:
                        94:9d:3b:ca:10:f6:fc:99:05:e2:de:ca:0c:d6:6b:
                        60:a6:f8:29:fc:c4:18:82:ae:38:c2:9f:62:fe:3a:
                        66:da:8c:17:12:a1:24:4c:a3:a6:9b:7b:bb:54:b8:
                        da:ff:e2:81:a7:33:54:0b:17:ee:2a:db:d4:e3:1d:
                        42:23:c1:8b:01:9e:42:8f:da:62:7b:21:9a:1c:b6:
                        9c:f3:28:75:16:11:23:d0:42:65:cc:34:70:9e:f1:
                        04:00:77
                    Exponent: 65537 (0x10001)
            X509v3 extensions:
                X509v3 Basic Constraints: critical
                CA:TRUE
                X509v3 Key Usage: critical
                Digital Signature, Certificate Sign, CRL Sign
                X509v3 Subject Key Identifier:
                82:05:B5:4B:E2:61:B0:C9:7A:6F:0F:D1:CC:A0:C3:62:FB:D2:5A:02
                X509v3 Authority Key Identifier:
                keyid:82:05:B5:4B:E2:61:B0:C9:7A:6F:0F:D1:CC:A0:C3:62:FB:D2:5A:02
                X509v3 Certificate Policies:
                Policy: 1.3.6.4.1.10514.509.1.4
        Signature Algorithm: 1.2.840.113549.1.1.11
            63:94:13:a9:6a:3b:a8:aa:34:e6:2b:0f:20:a9:55:d8:80:e8:
            54:0f:6a:15:b0:76:91:0d:98:a4:75:f9:50:09:2e:cf:30:2e:
            15:bc:21:c2:fe:f0:36:4b:60:7d:bb:b8:76:bd:9d:2b:d8:a5:
            a6:e7:60:83:00:f3:9c:65:f1:f7:b8:16:f7:72:ab:70:d7:c4:
            60:bf:fb:33:1e:67:e6:fa:a1:d0:23:5f:bf:69:fc:25:19:71:
            5a:c1:41:a3:ab:9b:da:09:92:2c:ee:83:c2:de:61:3a:b2:a4:
            c6:18:6d:dd:ef:77:2b:91:40:c5:9c:fb:61:66:f5:2d:4f:20:
            5a:c5:b6:1b:08:4b:a4:18:a7:b4:86:07:e1:c8:c1:a7:e3:8f:
            cf:01:4b:a4:a6:07:b3:65:5f:0a:1d:a1:7d:52:12:c3:43:8b:
            72:16:75:78:0a:b0:39:8a:92:33:4b:0e:ef:a8:c1:33:2e:cc:
            96:fd:a1:b1:2e:0b:1c:68:ff:fa:48:4f:43:60:32:a0:4f:9a:
            c0:29:e3:66:b9:ce:cb:0b:99:67:c0:74:33:4f:9b:e3:db:68:
            b9:ea:c2:67:f0:7a:db:88:93:7b:cf:5f:da:3b:ea:61:88:24:
            e7:82:5e:ce:be:39:c3:de:03:b5:42:3b:b3:50:12:95:25:b9:
            dc:7a:66:95:3b:97:6a:85:06:66:68:84:0f:3d:5b:93:de:2e:
            44:2e:58:97:1b:8b:56:db:7a:27:58:fe:ad:3c:32:4e:09:f9:
            60:2e:c0:3b:b4:80:53:04:41:ae:53:ff:b2:b7:f0:4d:72:9f:
            8b:59:14:7f:cc:42:83:74:3a:08:1c:2a:ab:95:7e:8e:ee:51:
            eb:2a:4c:82:5c:12:17:ec:22:92:93:22:62:55:36:91:6a:d7:
            5b:55:2d:46:e7:d4:30:fd:d5:c4:87:be:ea:a9:2c:fe:ac:5b:
            d7:51:fc:c7:4d:72:6a:f5:3e:40:ef:f7:63:8f:94:8c:95:f4:
            0f:4d:b0:02:31:9a:86:5f:0c:ce:f0:de:18:92:a8:09:3b:f9:
            3f:9b:95:5c:0e:ab:82:22:41:cc:7f:e2:83:d7:2f:cf:bc:1b:
            d7:65:ce:c1:7f:42:8d:5e:36:00:d6:14:42:0b:52:9b:23:46:
            5c:83:bb:ce:b8:e1:ac:43:b5:fb:c9:00:f7:cf:8d:2f:98:b8:
            99:f0:fb:a8:3b:38:df:a5:19:c6:d7:a8:f8:aa:9a:4d:50:4f:
            0a:f7:19:82:16:e0:92:6b:fc:47:a9:b3:c0:09:a4:ac:7b:8f:
            15:aa:60:c6:f3:4f:fa:1d:17:5c:24:bc:5b:3b:3e:8b:28:48:
            3d:26:c5:31:7e:f3:cb:36
    -----BEGIN CERTIFICATE-----
    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
    -----END CERTIFICATE-----BTW, why are you using a non-standard key-size of 1023 bits?

Maybe you are looking for