Name attribute not giving the desired result in form tag

Hi,
I am using struts and the name attribute in form tag is not giving me the desired reuslt. The code is
<html:form name="loginActionForm" type="source.form.LoginActionForm" action="/login.do" method="post">
</html:form>
when I am trying to use the name in javascript then I am getting an error
"document.loginActionForm " is null or not an object.Where am I going wrong?

I did so but the name I have used in the form tag is the same as what i have used in javascript.I dont think that it is a javascript error and it must be some mistake I made in the form tag.Also one more thing is it necessary to use the type attribute if you use the name attribute.

Similar Messages

  • Function used in SQL query not showing the desired results

    I have created a function that gives me the client id but when i am using the function in the query its not giving me any result i.e. 0 rows but if I execute the function sepreatly and put the result of that function in the qurey it is giving me the desired result please have a look on the following and please reply with you expert opinion:
    FUNCTION CODE:
    create or replace function j2
    (usid in varchar2)
    return varchar2
    is
    cidn_in varchar2(4000) := '';
    ls_sep varchar2(1) := ',';
    cursor predicate_cidn
    is
    select
    logical_schema_id
    from
    CLIENT_REGISTRY cr,
    MEMBER_ROLE_CLIENT_ASSIGNMENT mrca,
    MEMBER m
    where
    mrca.base_client_id = cr.base_client_id and
    mrca.member_id = m.member_id and
    cr.schema_in_use_in = '1' and
    m.active_status_id = 'A' and
    upper(mrca.member_id) = upper(usid);
    BEGIN
    for GET_CIDN in predicate_cidn
    loop
    cidn_in := cidn_in || ls_sep || '''' || GET_CIDN.logical_schema_id || '''';
    end loop;
    cidn_in := substr(cidn_in, 2);
    cidn_in := '('||cidn_in||')';
    --dbms_output.put_line(cidn_in);
    return cidn_in;
    END ;
    SQL> select j2('qaa@adp') from dual;
    J2('QAA@ADP')
    ('BASE18','SDK1TEST','SEETHA1CONFIG','BASE09','KAREN2','SIVACONFIG','BASE19','SD
    K1CTEST','VASU1','KAREN5','EVENTS1CTEST','SDK1','ADA1CONFIG','BASE10','VRB1CONFI
    G','CRU2CONFIG','BASE20','SIVATEST','PCOMCONFIG','KP1CONFIG','KAREN4CONFIG','EVE
    NTS1TEST','SUZ3CONFIG','DONG2CONFIG','ED2CONFIG','SIVACTEST','APDCONFIG','EVENTS
    1CONFIG','ESSCONFIG','SIVA','SDK2CONFIG','ED3CONFIG','RAJ4CONFIG','CBRCONFIG','N
    AMRATA2CONFIG','EMIL1','NAMRATA1CONFIG','SDK2CTEST','BVT2CONFIG','MURUGAN1CONFIG
    ','COB1CONFIG','GABY1TEST','CHR1CONFIG','ED4CONFIG','USE1CONFIG','SDK2TEST','DEM
    O1CONFIG','BERNIE1CONFIG','XA1','CAR2TEST','SDK2','ED5CONFIG','PAY1TEST','PAYXCO
    NFIG','KP1TEST','SEAN1CONFIG','CAR2CTEST','VASU1CONFIG','SEAN2CONFIG','KP1CTEST'
    ,'MAU1CONFIG','CONWCONFIG','PAN1CONFIG','MERAJ2','PRA3CONFIG','SEAN5CONFIG','KP1
    ','PRA4CONFIG','CAR2CONFIG','PRA2CONFIG','SEAN6CONFIG','PRA3TEST','RPT','GABY1CT
    EST','SDK3CONFIG','PRA2TEST','SEAN9CONFIG','CAR2','LV1CONFIG','PRA3CTEST','DONG1
    CONFIG','TE1CONFIG','MERAJ2CONFIG','VIV1CONFIG','GABY1','SEAN2','PRA2CTEST','PRA
    3','RPTCONFIG','PRA4CTEST','SEAN3','MITA1CONFIG','PRA2','RPTCTEST','PCOM1CONFIG'
    ,'SS2CONFIG','PAY1CONFIG','SEAN7','ANNCONFIG','BASE11','BASE02','LV2CONFIG','RPT
    TEST','IMPECONFIG','SUR1CONFIG','SREEK2CONFIG','BASE03','SRINU3CONFIG','BDCONFIG
    ','JAY1CONFIG','AMMAN1','PRA1TEST','WPGCONFIG','BASE12','MP5CONFIG','MERAJ1','SR
    INU2CONFIG','XA1CONFIG','RAJ1CONFIG','WPGCTEST','BASE04','CHRIS','RAJSCONFIG','P
    ANKAJ','BASE13','WPGTEST','RAJ3CONFIG','WPG','BASE14','VASU2CONFIG','SRINU1CONFI
    G','BASE05','PRA4TEST','VASU1TEST','PRA5CONFIG','NISH1CONFIG','CHRISCONFIG','SDK
    3TEST','RAJ3TEST','KP2CONFIG','BASE06','DEFPCONFIG','NISH2CONFIG','CHRISCTEST','
    WPSCONFIG','VASU2TEST','BASE15','GABY1CONFIG','PRA5TEST','MITA2CONFIG','BASE07',
    'VASU1CTEST','KP2TEST','VASU2CTEST','LAURA3CONFIG','BASE16','CHRISTEST','WPSTEST
    ','VASU2','KP2CTEST','EVENTS1','BASE17','RAJ2CONFIG','WPSCTEST','BASE08','SREEK1
    CONFIG','ADVE','PRA4','SDK1CONFIG','KP2','KAREN1','CRU1CONFIG','WPS')
    Now if i put the results (cut and paste )in the query it gives me the results
    SQL> select count(*) from baseclient.address_detail where cidn in ('BASE18','SDK1TEST','SEETHA1CONFIG','BASE09','KAREN2','SIVACONFIG','BASE19','SD
    2 K1CTEST','VASU1','KAREN5','EVENTS1CTEST','SDK1','ADA1CONFIG','BASE10','VRB1CONFI
    3 G','CRU2CONFIG','BASE20','SIVATEST','PCOMCONFIG','KP1CONFIG','KAREN4CONFIG','EVE
    4 NTS1TEST','SUZ3CONFIG','DONG2CONFIG','ED2CONFIG','SIVACTEST','APDCONFIG','EVENTS
    5 1CONFIG','ESSCONFIG','SIVA','SDK2CONFIG','ED3CONFIG','RAJ4CONFIG','CBRCONFIG','N
    6 AMRATA2CONFIG','EMIL1','NAMRATA1CONFIG','SDK2CTEST','BVT2CONFIG','MURUGAN1CONFIG
    7 ','COB1CONFIG','GABY1TEST','CHR1CONFIG','ED4CONFIG','USE1CONFIG','SDK2TEST','DEM
    O1CONFIG','BERNIE1CONFIG','XA1','CAR2TEST','SDK2','ED5CONFIG','PAY1TEST','PAYXCO
    8 9 NFIG','KP1TEST','SEAN1CONFIG','CAR2CTEST','VASU1CONFIG','SEAN2CONFIG','KP1CTEST'
    10 ,'MAU1CONFIG','CONWCONFIG','PAN1CONFIG','MERAJ2','PRA3CONFIG','SEAN5CONFIG','KP1
    11 ','PRA4CONFIG','CAR2CONFIG','PRA2CONFIG','SEAN6CONFIG','PRA3TEST','RPT','GABY1CT
    12 EST','SDK3CONFIG','PRA2TEST','SEAN9CONFIG','CAR2','LV1CONFIG','PRA3CTEST','DONG1
    13 CONFIG','TE1CONFIG','MERAJ2CONFIG','VIV1CONFIG','GABY1','SEAN2','PRA2CTEST','PRA
    14 3','RPTCONFIG','PRA4CTEST','SEAN3','MITA1CONFIG','PRA2','RPTCTEST','PCOM1CONFIG'
    15 ,'SS2CONFIG','PAY1CONFIG','SEAN7','ANNCONFIG','BASE11','BASE02','LV2CONFIG','RPT
    16 TEST','IMPECONFIG','SUR1CONFIG','SREEK2CONFIG','BASE03','SRINU3CONFIG','BDCONFIG
    17 ','JAY1CONFIG','AMMAN1','PRA1TEST','WPGCONFIG','BASE12','MP5CONFIG','MERAJ1','SR
    18 INU2CONFIG','XA1CONFIG','RAJ1CONFIG','WPGCTEST','BASE04','CHRIS','RAJSCONFIG','P
    19 ANKAJ','BASE13','WPGTEST','RAJ3CONFIG','WPG','BASE14','VASU2CONFIG','SRINU1CONFI
    20 G','BASE05','PRA4TEST','VASU1TEST','PRA5CONFIG','NISH1CONFIG','CHRISCONFIG','SDK
    21 3TEST','RAJ3TEST','KP2CONFIG','BASE06','DEFPCONFIG','NISH2CONFIG','CHRISCTEST','
    22 WPSCONFIG','VASU2TEST','BASE15','GABY1CONFIG','PRA5TEST','MITA2CONFIG','BASE07',
    23 'VASU1CTEST','KP2TEST','VASU2CTEST','LAURA3CONFIG','BASE16','CHRISTEST','WPSTEST
    24 ','VASU2','KP2CTEST','EVENTS1','BASE17','RAJ2CONFIG','WPSCTEST','BASE08','SREEK1
    25 CONFIG','ADVE','PRA4','SDK1CONFIG','KP2','KAREN1','CRU1CONFIG','WPS');
    COUNT(*)
    228
    BUT if I user the function it gives me no results
    0 rows selected and its taking a loon time to reurn

    This appears to be a duplicate of the question in this thread
    Re: VPD issue Need Assistance ASAP
    where I wrote
    "Your function returns a single string that happens to have a bunch of commas and quotes in it. An IN list generally requires a list of strings, which your function doesn't return.
    You could rewrite the function to be a pipelined table function and then do
    select count(*)
    from baseclient.address_detail
    where cidn in (SELECT cidn
    FROM TABLE(<<your pipelined table function>>))
    However, I would expect it to be easier not to wrap all this into a function and just have your IN clause be the logic in your predicate_cidn cursor.
    Justin
    "

  • Progression not yielding the desired result

    Hi
    I have written a text query using the progressive relaxation method. It is not giving me the desired results. Here are the query details:
    I have created an Intermedia index on a table with following specs:
    BEGIN
    CTX_DDL.DROP_PREFERENCE('CTXSYS.COMPANY_SEARCH_MULTI');
         CTX_DDL.CREATE_PREFERENCE('CTXSYS.COMPANY_SEARCH_MULTI', 'MULTI_COLUMN_DATASTORE');
         CTX_DDL.SET_ATTRIBUTE(     'CTXSYS.COMPANY_SEARCH_MULTI',
                        'columns',
                        'COMPANY,
                        DESC_N_PRODS,
                        PROD_DESC_N_PRODS,
                        PG_TITLE_GLUSR,
                        PG_KWD_DESC,
                        GEOGRAPHICAL_PROFILE,
                        GLUSR_DESC,
                        SUBCAT_DESC,
                        CTL_DESC,
                        SHORT_PROFILE,
                        LONG_PROFILE');
         CTX_DDL.DROP_SECTION_GROUP('CTXSYS.COMPANY_SEARCH_GROUP');
         CTX_DDL.CREATE_SECTION_GROUP('CTXSYS.COMPANY_SEARCH_GROUP', 'BASIC_SECTION_GROUP');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F1',     'COMPANY');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F2',     'DESC_N_PRODS');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F3',     'PROD_DESC_N_PRODS');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F4',     'PG_TITLE_GLUSR');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F5',     'PG_KWD_DESC');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F6',     'GEOGRAPHICAL_PROFILE');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F7',     'GLUSR_DESC');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F8',     'SUBCAT_DESC');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F9',     'CTL_DESC');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F10','SHORT_PROFILE');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F11','LONG_PROFILE');
         CTX_DDL.DROP_PREFERENCE('CTXSYS.IIL_LEXER');
         CTX_DDL.CREATE_PREFERENCE('CTXSYS.IIL_LEXER','BASIC_LEXER');
    CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_LEXER', 'INDEX_STEMS', 'ENGLISH');
         CTX_DDL.DROP_PREFERENCE('CTXSYS.IIL_FUZZY_PREF');
         CTX_DDL.CREATE_PREFERENCE('CTXSYS.IIL_FUZZY_PREF', 'BASIC_WORDLIST');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','FUZZY_MATCH','ENGLISH');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','FUZZY_SCORE','60');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','FUZZY_NUMRESULTS','100');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','SUBSTRING_INDEX','TRUE');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','PREFIX_INDEX','TRUE');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','PREFIX_MIN_LENGTH','1');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','PREFIX_MAX_LENGTH','3');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','WILDCARD_MAXTERMS','15000');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','STEMMER','ENGLISH');
    END;
    CREATE INDEX COMPANY_SEARCH_IM on COMPANY_SEARCH(DUMMY) INDEXTYPE IS
    CTXSYS.CONTEXT PARAMETERS
    ('DATASTORE CTXSYS.COMPANY_SEARCH_MULTI SECTION GROUP CTXSYS.COMPANY_SEARCH_GROUP MEMORY 50M
    LEXER CTXSYS.IIL_LEXER WORDLIST CTXSYS.IIL_FUZZY_PREF STOPLIST CTXSYS.IIL_STOPLIST');
    Now if I want to search for a string - acrylic crochet
    My progressive clause is as follows:
    <QUERY>
    <TEXTQUERY>
    <PROGRESSION>
    <SEQ>(acrylic crochet) within F2</SEQ>
    <SEQ>($acrylic $crochet) within F2</SEQ>
    <SEQ>(acrylic crochet) within F3</SEQ>
    <SEQ>($acrylic $crochet) within F3</SEQ>
    <SEQ>(NEAR((acrylic,crochet))) within F2</SEQ>
    </PROGRESSION>
    </TEXTQUERY>
    </QUERY>
    The data set has a record where F2 Contains following text:
    Manufacturers and exporters of yarns like acrylic yarn, viscose yarns, acrylic blended yarn, acrylic knitting yarn, spun yarn, blended yarns, braided thread, chenille yarn, cotton yarn, crochet yarn, dupion silk yarns etc
    My problem is that - This record is not coming in the search result.
    The record starts appearing if I use only NEAR Clause. as shown below:
    <QUERY>
    <TEXTQUERY>
    <PROGRESSION>
    <SEQ>(NEAR((acrylic,crochet))) within F2</SEQ>
    </PROGRESSION>
    </TEXTQUERY>
    </QUERY>
    Please advise what could be wrong - is my Index proper, or my progressive clause has some problem or there is something else which I have totally missed.
    Regards
    Madhup

    The discussion in the link below contains the same bug that you have encoutered and some workarounds.
    Re: progressive relaxation doesn't progress

  • Query not giving the correct result

    select Project_id, contractno
    from elf_transactions
    where(rtrim(contractno),rtrim(project_id)) not in
    (select rtrim(contractno),rtrim(projectid)
    from contract_proj
    where report_month='1-May-2007' )
    when I m firing this query, it is not giving correct result to me, it also select the recorts which are matches in both the table
    i want to fine out those contract, with projectid which are not in contract_proj table
    Please help me in this regard

    CREATE TABLE ELF_TRANSACTIONS
    VENDOR_ORDER_REF VARCHAR2(60 BYTE),
    BT_SUB_CON_REF VARCHAR2(10 BYTE),
    PR_NO VARCHAR2(15 BYTE),
    PO_NO VARCHAR2(15 BYTE),
    PR_PO_DESCR VARCHAR2(200 BYTE),
    ONE_IT_PROG VARCHAR2(50 BYTE),
    BT_DEL_MANAGER_NAME VARCHAR2(40 BYTE),
    DELIVERY_TYPE VARCHAR2(5 BYTE),
    ACTUAL_DEP_DATE DATE,
    ASSOC_ASG_BR_QUE VARCHAR2(50 BYTE),
    PRE_AVG_P1_P2_INC_CNT NUMBER(3),
    POST_P1_P2_INC NUMBER(3),
    PERC_GROWTH_POST_REL NUMBER(3),
    VENDOR_DEL_MANAGER VARCHAR2(50 BYTE),
    REPORT_MONTH DATE,
    COMMENTS VARCHAR2(200 BYTE),
    PROJECT_ID VARCHAR2(20 BYTE),
    CONTRACTNO VARCHAR2(15 BYTE),
    CONTRACT_TYPE NVARCHAR2(15),
    IDUNO VARCHAR2(10 BYTE),
    STATUS VARCHAR2(10 BYTE),
    DESCRIPTIONCODEDELIVERABLE VARCHAR2(255 BYTE),
    UNIQUEID VARCHAR2(255 BYTE),
    LOCK_RECORD CHAR(1 BYTE),
    VERIFIED CHAR(1 BYTE),
    VERIFIED_BY VARCHAR2(40 BYTE),
    BT_VERIFIED CHAR(1 BYTE),
    BT_VERIFIED_BY VARCHAR2(40 BYTE)
    CREATE TABLE CONTRACT_PROJ
    CONTRACTNO VARCHAR2(10 BYTE),
    PROJECTID VARCHAR2(20 BYTE),
    IDUNO VARCHAR2(10 BYTE),
    CH_EMPID VARCHAR2(8 BYTE),
    CHNAME VARCHAR2(40 BYTE),
    GH_EMPID VARCHAR2(8 BYTE),
    GHNAME VARCHAR2(40 BYTE),
    PM_EMPID VARCHAR2(8 BYTE),
    PMNAME VARCHAR2(40 BYTE),
    SPM_EMPID VARCHAR2(8 BYTE),
    SPMNAME VARCHAR2(40 BYTE),
    PRJ_MONTH DATE,
    BT_CONTRACT CHAR(1 BYTE)
    REPORT_MONTH     COMMENTS     PROJECT_ID     CONTRACTNO     CONTRACT_TYPE     IDUNO     STATUS     DESCRIPTIONCODEDELIVERABLE     UNIQUEID
    06/01/2007 00:00:00          1287     TML007452               OPEN     Delivery of CRs DM CD and NSI     N/A
    06/01/2007 00:00:00          1280     TML007452               OPEN     Delivery of CRs H&W OOR and WLTO     N/A
    06/01/2007 00:00:00          1231     TML007452               OPEN     Delivery of CRs H&W OOR WLTO     
    06/01/2007 00:00:00          1097     TML007679               OPEN     High Level Roadmap for Global Services and Wholesale with Feasibility study into BTR access to Switc     N/A
    06/01/2007 00:00:00          405     TML007942               OPEN     RTRCC DEVELOPMENT -Q107     
    06/01/2007 00:00:00          405     TML007919               OPEN     WLR3 DEVELOPMENT-Q107     
    06/01/2007 00:00:00          1170     TML008439               OPEN     R-510     
    CONTRACTNO     PROJECTID     IDUNO     CH_EMPID     CHNAME     GH_EMPID     GHNAME     PM_EMPID     PMNAME     SPM_EMPID     SPMNAME     PRJ_MONTH     BT_CONTRACT
    MBT003060     176     BT06     8694     Soman Sameer Surendra     1054     Bhadti Shripad Shivram     1054     Bhadti Shripad Shivram     1420     Rao Darbhamulla Kameswara     05/01/2007 00:00:00     N
    MBT003842     1156     BT12     19992     Kalle Ajit Ashutosh     1539     Padgaonkar Shailesh Vishwanath     13948     Khunte Milind Vasant     16426     Kulkarni Vinay     05/01/2007 00:00:00     Y
    MBT004677     458     BT09     20275     Mundassery George     5044     Kamalapurkar Leena Shrinivas     12849     Dave Ajay Yogeshchandra     2017     KIRKIRE SONAL MADHUKAR     05/01/2007 00:00:00     N
    MBT004695     362     BT13     20276     Ghosh Sankar     2624     Avachat Jagdish Vasantrao     13592     Pal Sudipta     2624     Avachat Jagdish Vasantrao     05/01/2007 00:00:00     N
    MBT004826     VITRIA     BT09     20275     Mundassery George     26099     Saha Debendra Kumar     28134     Hinge Anand Sharad     12777     Karandikar Sumedh Vidyadhar     05/01/2007 00:00:00     Y
    MBT004924     1027     BT03     1451     Tillu Ashirwad     15693     Devaraj Daniel G     6867     Jadhav Satyajit Ramesh     15693     Devaraj Daniel G     05/01/2007 00:00:00     N
    MBT004927     1025     BT05     4436     Kelkar Subhash Manohar     20379     Gore Sujeet Narayan     13704     Vignesh Chandrasekaran     4347     BIJNORI REHANA GULAMWARIS     05/01/2007 00:00:00     N
    MBT004927     1092     BT05     4436     Kelkar Subhash Manohar     15094     Jain Jitendra     13350     Bokil Shripad Raghunath     9511     Markande Balchandra Narayan     05/01/2007 00:00:00     N
    MBT004927     1213     BT09     20275     Mundassery George     19996     Vege Sridhar     16401     Sibgathulla Mohammed     19996     Vege Sridhar     05/01/2007 00:00:00     N

  • Table padding not giving the desired effect?

    On our page we have a table that we don't want the text to be on the left side so close to the edge. In the past adding padding to the table has worked when using GOLIVE, now that I've switched to Dreamweaver it does not give the spacing like before. So... how can I achieve the same padding effect without making the tables whack, using DW? I assume this could be done through CSS, but am unsure of how to go about it or if I'm even correct?
    The page is here http://174.132.166.66/~gatorboy/auto-restoration/index.html  where it says "Auto restoration" and the text below that we want it to look like this http://www.jefflilly.com/musclecars/ see the spacing between the text and the table where it says "muscle cars"
    Thanks for any help!
    -Shera

    The class name that you have applied to your table td cell should be "tableFrontpage" (see below) NOT "tableFrontpage style1" as it is now.
    <td width="567" height="1001" class="tableFrontpage">
    Make the change as above then add the new css selectors (below) to your css style sheet:
    .tableFrontpage h3 {
    padding: 10px 0px 0px 15px;
    margin: 0;
    .tableFrontpage p {
    padding: 10px 15px 0px 15px;
    margin: 0;

  • Why is my zero order hold not giving the expected result?

    I am trying to replicate the functionality of the Discrete Order Hold Function so that I can use it without having to have a ''Control and Simulation Loop''. The attachment desiredresult.vi shows an example of the Discrete Order Hold Function inside the ''Control and Simulation Loop''. The other attachment (zeroorderholdquestion.vi) shows my attempt at achieving the same result. I multiplied the while loop index by the sampling period to get the array index for the resampled y-output. I based this on my understanding of the formula for Discrete Order Hold given under http://zone.ni.com/reference/en-XX/help/371894G-01/lvsim/sim_dzoh/#details.
    However, I am having difficulty getting the frequency of the waveforms before and after resampling to match up. (See attachment for clarity on what I mean by this). Any suggestions on what I am doing wrong?
    Solved!
    Go to Solution.
    Attachments:
    zeroorderholdquestion.vi ‏207 KB
    desiredresult.vi ‏244 KB

    here i wrote something maybe similar to simulate a multi channel, mux, sample and hold with cross talk
    http://forums.ni.com/t5/LabVIEW/How-can-I-create-and-sample-and-hold-circuit-in-Labview/m-p/2407256#...
    If samplerate and hold time have a clean ratio  you just need the decimate vi
    another simple version:
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • To_date function not fetching the desired result.....

    Hi Gurus,
    I get varied results from the below 2 queries, I am pessimistic about using to_char instead prefer using to_date, but query doesn't seem to fetch the complete data while using the to_date but with to_char it works. Please can someone make this to_date used query below work for me.
    Main table structure:
    Column Name     ID     Pk     Null?     Data Type     Default     Histogram     Encryption Alg     Salt
    MINISTRY_CODE     1          Y     VARCHAR2 (15 Byte)          Yes          
    BILL_MONTH     2          Y     DATE          Yes          
    CUBIC     3          Y     NUMBER          Yes          
    GALLONS     4          Y     NUMBER          Yes          
    AMOUNTS     5          Y     NUMBER          Yes          
    MTR_TYPE     6          Y     CHAR (1 Byte)          Yes          1st query:
    SELECT ministry_code,
    DECODE(mtr_type, 'C','Billed Cubic',
    'G','Billed Gallons',
    'A','Billed OMR',
    'R','Collected',
    'U','Total Unpaid Bills') mtr_type,
    SUM(CASE
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') = '012011' AND mtr_type = 'C' THEN cubic
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') = '012011' AND mtr_type = 'G' THEN (gallons)
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') = '012011' AND mtr_type = 'A' THEN amounts
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') = '022011' AND mtr_type = 'R' THEN amounts
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') <= '022011' AND mtr_type = 'U' THEN amounts ELSE 0 END) January
    FROM tmp_paew_month_gafu1 WHERE ministry_code IN
    (SELECT DISTINCT ministry_code FROM tmp_paew_month_gafu GROUP BY ministry_code)
    GROUP BY ministry_code,mtr_type
    ORDER BY 1,3 DESCSAMPLE OUTPUT:
    MINISTRY_CODE MTR_TYPE JANUARY
    001 Billed Gallons 5326252
    001 Billed Cubic 24210.2363636364
    001 Total Unpaid Bills 16402.5
    001 Billed OMR 13287.36
    001 Collected 10410.508
    002 Total Unpaid Bills 12089.99
    002 Billed Cubic 0
    002 Billed OMR 0
    002 Billed Gallons 0
    002 Collected 0
    003 Total Unpaid Bills 27418.711
    2nd query:
    SELECT ministry_code,
    DECODE(mtr_type, 'C','Billed Cubic',
    'G','Billed Gallons',
    'A','Billed OMR',
    'R','Collected',
    'U','Total Unpaid Bills') mtr_type,
    SUM(CASE
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month) = to_date('012011','MMYYYY') AND mtr_type = 'C' THEN cubic
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_date(bill_month) = to_date('012011','MMYYYY') AND mtr_type = 'G' THEN (gallons)
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_date(bill_month) = to_date('012011','MMYYYY') AND mtr_type = 'A' THEN amounts
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_date(bill_month) = to_date('022011','MMYYYY') AND mtr_type = 'R' THEN amounts
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_date(bill_month) <= to_date('022011','MMYYYY') AND mtr_type = 'U' THEN amounts ELSE 0 END) January
    FROM tmp_paew_month_gafu1 WHERE ministry_code IN
    (SELECT DISTINCT ministry_code FROM tmp_paew_month_gafu GROUP BY ministry_code)
    GROUP BY ministry_code,mtr_type
    ORDER BY 1,3 DESCSample OUTPUT:
    MINISTRY_CODE MTR_TYPE JANUARY
    001 Total Unpaid Bills 106062.002
    001 Billed OMR 0
    001 Billed Cubic 0
    001 Billed Gallons 0
    001 Collected 0
    002 Total Unpaid Bills 42023.243
    002 Collected 0
    002 Billed Gallons 0
    002 Billed Cubic 0
    002 Billed OMR 0
    003 Total Unpaid Bills 133260.435

    What is the sense of to_date(bill_month) in the second query?
    bill_month is already a date. to_date function will expect a character parameter and convert it in a date value.
    So what will happen? First the bill_month will be implicitely converted to a character value.
    Second this character value will be converted back to a date. You gave no format string. So both conversions will be made will your setting of nls_date_format.
    I can only guess what you really want. Perhaps you want to trunc the bill_month with trunc(bill_month,'MM').
    Please give us
    - table create script
    - insert statements for test data
    - required output for these test data
    - description of your requirements
    Edited by: hm on 22.11.2012 23:16

  • The Same Excel Functions Not Giving the Same Result in Numbers

    I'm been using Excel for years and now that I've made the switch to Mac, I thought I should probably utilise the iWork suite of software and get rid of Microsoft once and for all.
    Whilst I love the user-friendliness, there are so many small things that Apple to appear to have overlooked which keeps me hanging on to Microsoft Office just a little, but I digress.
    OK, So I have one sheet in Numbers with the following data.
    I am trying I need to search Column A for the TLDs in Column C, if they exist output the correct renewal price from Column D in Column B
    e.g. A2 contains .net so  B2 should have 12.50 in it.
    A
    B
    C
    D
    1
    Domain Name
    Renewal Price 1
    TLDs
    Renewal Price 2    
    2
    test.net
    .com
    5.00
    3
    test.co.uk
    .co.uk
    10.00
    4
    test.com
    .net
    12.50
    So... can someone please explain to me why the same functions which exist in Numbers and Excel (VLOOKUP / LOOKUP / SEARCH) do not work in Numbers as they do in Excel? If there is a valid reason, fine, I'll accept that, but how do I acheive the above?
    The formula which WORKS in B2 in Excel but NOT in Numbers is:
    =VLOOKUP(LOOKUP(32768,SEARCH(C$2:C$4,A2),C$2:C$4),$C$2:$E$4,2,FALSE)
    Thanks in advance.

    So... can someone please explain to me why the same functions which exist in Numbers and Excel (VLOOKUP / LOOKUP / SEARCH) do not work in Numbers as they do in Excel? If there is a valid reason, fine, I'll accept that, but how do I acheive the above?
    That's a form of "array function" (searching a "table array").  Numbers can't do array functions the way Excel can.
    Here's one way to achieve the same goal in Numbers:
    The formula in B2, copied down:
         =VLOOKUP(RIGHT(A2,LEN(A2)−SEARCH(".",A2)+1),Prices::$A:$B,2,FALSE)
    SG

  • Query:  Not getting the desired result. Please help

    QL> select * from ecev;
    entity_Tag
    7
    8
    9
    10
    1
    2
    3
    4
    5
    6
    SQL> select * from dg;
    DIGP_TAG CEPT_TAG
    600 1
    700 1
    800 1
    900 1
    100 1
    200 1
    500 1
    75 2
    SQL> select * from enow;
    ENTITY_CODE ENTITY_TAG DIGP_TAG TARGET_DA CEPT_TAG
    EXT 7           600      26-MAY-07 1
    EXT 8           700      26-MAY-07 1
    EXT 9           800      26-MAY-07 1
    EXT 10           800      22-APR-76 1
    EXT 1           100      20-OCT-06 1
    EXT 2           200      20-OCT-06 1
    EXT 3           500      20-OCT-06 1
    EXT 4           100      20-OCT-06 1
    EXT 5           100      20-OCT-06 1
    EXT 6           80      20-OCT-06 1
    EXT 1           75           2
    SQL> select * from tk;
    TK_TAG DIGP_TAG NARRATIVE DUE_DATE CEPT_TAG
    35 90 raj 27-MAY-07               1
    36 900 kkd 27-MAY-07               1
    37 100 kim 28-MAY-07               1
    30 100 ram 23-MAY-07               1
    31 100 kish 23-MAY-07               1
    32 200 mar 23-MAY-07               1
    33 100 gy 23-MAY-07               1
    34 100 mm 27-MAY-07               1
    8 rows selected.
    For the following query
    1 select
    2 d.ecev_tag ecev_tag,
    3 a.digp_tag entity_owner ,
    4 c.digp_tag task_owner,
    5 c.tk_tag task_tag,
    6 c.narrative
    7 from enow a,
    8 entl b,
    9 tk c,
    10 ecev d
    11 where ( a.DIGP_TAG=100 or c.digp_tag=100)
    12 and a.entity_tag=b.entity_tag(+)
    13 and b.tk_tag=c.tk_tag(+)
    14* and a.entity_tag=d.entity_tag
    SQL> select * from entl;
    TK_TAG ENTITY_TAG
    35 5
    36 10
    30 1
    31 1
    32 2
    33 3
    34 3
    Result:
    I get
    entity_tag ENTITY_OWNER TASK_OWNER TASK_TAG NARRATIVE
    5 100 90 35 raj          row1
    1 100 100 30 ram          row2
    1 75 100 30 ram          row3 1 100 100 31 kish          row4
    1 75 100 31 kish          row5 3 500 100 33 gy          row6
    3 500 100 34 mm          row7
    4 100                              row8
    Row1: yes, since entity_tag 5 is owned by digp_tag 100 (enow)
    Row2: yes, since entity_tag 1 is owned by digp_tag 100 (enow)
    Row3: NO, since entity_tag 1 is owned by digp_tag 75, which in turn is in cept_tag 2, since the passed digp_tag is 100 and it just belongs to cept_tag 1 we should not be getting this row.
    Row4: Yes, since tk_tag 31 is owned by digp_tag 100 (tk)
    Row5 NO, since entity_tag 1 is owned by digp_tag 75, which in turn is in cept_tag 2 since the passed digp_tag is 100 and it just belongs to cept_tag 1 we should not be getting this row.
    Row6: Yes, since tk_tag 33 is owned by digp_tag 100 (enow)
    Row7: Yes, since tk_tag 34 is owned by digp_tag 100(enow)
    Row8: Yes, since entity_tag 4 is owned by 100(enow
    I guess i have to join dg.cept_tag and a.cept_tag, but it is not working.....
    Can somebody understand this and help...
    Thanks
    Ram

    QL> select * from ecev;
    entity_Tag
    7
    8
    9
    0
    1
    2
    3
    4
    5
    6
    SQL> select * from dg;
    DIGP_TAG CEPT_TAG
    600 1
    700 1
    800 1
    900 1
    100 1
    200 1
    500 1
    75 2
    SQL> select * from enow;
    ENTITY_CODE ENTITY_TAG DIGP_TAG
    TARGET_DA CEPT_TAG
    EXT 7
              600      26-MAY-07 1
    8           700
         26-MAY-07 1
    EXT 9
              800      26-MAY-07 1
    10           800
         22-APR-76 1
    EXT 1
              100      20-OCT-06 1
    2           200
         20-OCT-06 1
    EXT 3
              500      20-OCT-06 1
    4           100
         20-OCT-06 1
    EXT 5
              100      20-OCT-06 1
    6           80
         20-OCT-06 1
    EXT 1
              75           2
    L> select * from tk;
    TK_TAG DIGP_TAG NARRATIVE DUE_DATE
    CEPT_TAG
    35 90 raj 27-MAY-07               1
    36 900 kkd 27-MAY-07               1
    37 100 kim 28-MAY-07               1
    30 100 ram 23-MAY-07               1
    31 100 kish 23-MAY-07               1
    32 200 mar 23-MAY-07               1
    33 100 gy 23-MAY-07               1
    34 100 mm 27-MAY-07               1
    8 rows selected.
    For the following query
    1 select
    2 d.ecev_tag ecev_tag,
    3 a.digp_tag entity_owner ,
    4 c.digp_tag task_owner,
    5 c.tk_tag task_tag,
    6 c.narrative
    7 from enow a,
    8 entl b,
    9 tk c,
    10 ecev d
    11 where ( a.DIGP_TAG=100 or c.digp_tag=100)
    12 and a.entity_tag=b.entity_tag(+)
    13 and b.tk_tag=c.tk_tag(+)
    14* and a.entity_tag=d.entity_tag
    SQL> select * from entl;
    TK_TAG ENTITY_TAG
    35 5
    36 10
    30 1
    31 1
    32 2
    33 3
    34 3
    sult:
    I get
    entity_tag ENTITY_OWNER TASK_OWNER TASK_TAG
    NARRATIVE
    5 100 90
    35 raj          row1
    100 100 30
    ram          row2
    75 100
    30 ram          row31 100 100
    31 kish          row4
    75 100
    31 kish          row5
    3 500 100
    33 gy          row6
    500 100 34
    mm          row7
    100                              row8
    1: yes, since entity_tag 5 is owned by digp_tag 100
    (enow)
    Row2: yes, since entity_tag 1 is owned by digp_tag
    100 (enow)
    Row3: NO, since entity_tag 1 is owned by digp_tag 75,
    which in turn is in cept_tag 2, since the passed
    digp_tag is 100 and it just belongs to cept_tag 1 we
    should not be getting this row.
    Row4: Yes, since tk_tag 31 is owned by digp_tag 100
    (tk)
    Row5 NO, since entity_tag 1 is owned by digp_tag 75,
    which in turn is in cept_tag 2 since the passed
    digp_tag is 100 and it just belongs to cept_tag 1 we
    should not be getting this row.
    Row6: Yes, since tk_tag 33 is owned by digp_tag 100
    (enow)
    Row7: Yes, since tk_tag 34 is owned by digp_tag
    100(enow)
    Row8: Yes, since entity_tag 4 is owned by 100(enow
    I guess i have to join dg.cept_tag and a.cept_tag,
    but it is not working.....
    Can somebody understand this and help...
    Thanks
    Ram
    Result:
    I get
    entity_tag ENTITY_OWNER TASK_OWNER TASK_TAG NARRATIVE
    5 100 90 35 raj     row1
    1 100 100 30 ram     row2
    1 75 100 30 ram     row3
    1 100 100 31 kish     row4
    1 75 100 31 kish     row5
    3 500 100 33 gy     row6
    3 500 100 34 mm     row7
    4 100                    row8

  • MDX Formula - Not Getting the Desired Results

    Hi All,
    I have the following formula that I am using to calculate the "Average Daily Volume MTD" but if I drilldown into the Products dimension then I don't see any values. It seems like it's only calculating the values at the top level (GEN1).
    CASE
    WHEN
    IsLevel ([Time Periods].CurrentMember, 0)
    THEN
    Sum(CrossJoin({[Trade Quantity]},{FirstChild(Parent([Time Periods].CurrentMember)):([Time Periods].CurrentMember)}))
    Sum(CrossJoin({[Trade Days Input]},{FirstChild(Parent([Time Periods].CurrentMember)):([Time Periods].CurrentMember)}))
    WHEN
    (IsLevel ([Time Periods].CurrentMember, 1))
    THEN
    [Trade Quantity] / ([Measures].[Trade Days Input])
    ELSE
    Missing
    END
    I tried to insert the another condition in the WHEN clause,
    AND IsAncestor([Products], [Products].Dimension.CurrentMember, INCLUDEMEMBER)
    but it still doesn't give me any values.
    Can anyone please help me out here?
    Thanks

    Hi Dighe,
    Thanks , I have tried that , but its not working.
    What is happening that , with every setting system is unable to filter batch .
    For each material it selects all the batches in query2 .
    If I try to jump from batch1 still it displays all the batches.
    If I use only the Batch in the assignment it dispalys all the rows of the query  so its evident that there is no filter applied at the batch level , I tried all the combination , single value , P , E , Infoobject etc. But it remains same.
    Any guess???
    Thanks.

  • Case condition is not giving the correct result in Union query

    Hello PL/SQL Gurus,
    I am using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production version
    I have a table in following format -
    drop table TT2;
    create table TT2(FeeDate,Clerk,ClrComm,ExComm,TagComm) as select
    20120102,'Mathews',25,56,245 from dual union all select
    20120102,'Lika',0,56,245 from dual union all select
    20120102,'Ram',0,0,245 from dual union all select
    20120102,'Angilo',NULL,NULL,245 from dual union all select
    20120102,'Nikki',225,NULL,245 from dual union all select
    20120103,'Ram',NULL,556,2345 from dual union all select
    20120103,'Lika',NULL,NULL,245 from dual union all select
    20120103,'Mathews',25,56,245 from dual;DML Used -
    SELECT FEEDATE,CLERK,SUM(ClrComm) ClrComm,null ExComm,null TagComm,sum(case when ClrComm>0 then ClrComm end) Comm
    from tt2
    group by FEEDATE,CLERK
    UNION
    SELECT FEEDATE,CLERK,null ClrComm,sum(ExComm) ExComm,null TagComm,sum(case when ExComm>0 then ExComm end) Comm
    from tt2
    group by FEEDATE,CLERK
    UNION
    SELECT FEEDATE,CLERK,null ClrComm,null ExComm,sum(TagComm) TagComm,sum(case when ClrComm=0 or ClrComm is NULL and ExComm=0 or ExComm is NULL then TagComm end) Comm
    from tt2
    group by FEEDATE,CLERKResult Output -
      FEEDATE CLERK      CLRCOMM     EXCOMM    TAGCOMM       COMM
    20120102 Angilo                               245        245
    20120102 Angilo
    20120102 Lika             0
    20120102 Lika                       56                    56
    20120102 Lika                                 245        245
    20120102 Mathews         25                               25
    20120102 Mathews                    56                    56
    20120102 Mathews                              245
    20120102 Ram            225                              225
    20120102 Ram                         0
    20120102 Ram                                  490        490
      FEEDATE CLERK      CLRCOMM     EXCOMM    TAGCOMM       COMM
    20120103 Lika                                 245        245
    20120103 Lika
    20120103 Mathews         25                               25
    20120103 Mathews                    56                    56
    20120103 Mathews                              245
    20120103 Ram                       556                   556
    20120103 Ram                                 2345
    20120103 Ram
    Output expected -
    FEEDATE          CLERK     CLRCOMM     EXCOMM     TAGCOMM     Comm
    20120102     Mathews     25     56     245     81
    20120102     Lika     0     56     245     56
    20120102     Ram     0     0     245     245
    20120102     Angilo               245     245
    20120102     Nikki     225          245     225
    20120103     Ram          556     2345     556
    20120103     Lika               245     245
    20120103     Mathews     25     56     245     81I sincerely thanks to all of you for your effort in advance.

    This way:
    select feedate, clerk, clrcomm, excomm, tagcomm,
           sum(decode(nvl(clrcomm, 0) + nvl(excomm, 0), 0, tagcomm, nvl(clrcomm, 0) + nvl(excomm, 0))) over (partition by feedate, clerk) comm
      from tt2
    order by feedate, clerk;
    FEEDATE                CLERK   CLRCOMM                EXCOMM                 TAGCOMM                COMM                    
    20120102               Angilo                                                245                    245                   
    20120102               Lika    0                      56                     245                    56                    
    20120102               Mathews 25                     56                     245                    81                    
    20120102               Nikki   225                                           245                    225                   
    20120102               Ram     0                      0                      245                    245                   
    20120103               Lika                                                  245                    245                   
    20120103               Mathews 25                     56                     245                    81                    
    20120103               Ram                            556                    2345                   556                   
    8 rows selected

  • How to define the Market Sales KF, in order to receive the desired result

    Hi all,
    I dont know how to define the Market Sales Kefigure, in order to get the following result. Any hint is more than welcome.
    Prd_ID = Product ID
    PS  =  Product Sales
    M_ID = Market ID
    MS  = Market Sales
    MS%  = Market Share ( formula in BEX PS/MS)
    <b>
    Prd_ID;PS;M_ID;MS;MS%</b>
    A00001;10;MRK1;100;10%
    A00002;20;MRK1;100;20%
    <b>SBTOT</b>;30;MRK1;100;30%
    B00001;40;MRK2;200;20%
    B00002;30;MRK2;200;15% 
    <b>SBTOT</b>;70;MRK2;200;35%
    <b>GTOTL</b>;100;MRKX;300;33,3%
    Products A00001 and A00002 compete in the same market. So the individual marketshares should be calculated against the market MRK1(200), e.g. 40/200 and 30/200.
    The totals now, of the A00001 and A00002 products(3040) should be compared against <b>the same market</b> MRK1(200),</b> and <b>not against</b> the MRK1MRK1(200+200).
    Thanks
    Vasso Siagri<b></b><b></b><b></b>

    Maik,
    thank you for your answer, but I am afraid this is not giving the desired results.
    What I want----
    >What am getting
    Prd_ID;PS;M_ID;MS;MS%
    A00001;10;MRK1;100;10%  ---> 10;MRK1;200;5%
    A00002;20;MRK1;100;20%  ---> 20;MRK1;200;10%
    SBTOT;30;MRK1;100;30%   ---> 30;MRK1;200;15%
    B00001;40;MRK2;200;20%  ---> 40;MRK2;400;10%
    B00002;30;MRK2;200;15%  ---> 30;MRK2;400;7,5%
    SBTOT;70;MRK2;200;35%   ---> 70;MRK2;400;17,5%
    GTOTL;100;MRKX;300;33,3% ---> 1000;MRKX;600;16,7%
    Neither resticted KF restricted on Market ID is working for many markets; it is working only if you analyze one market id.
    Any idea? bw idea? What actually I need is aggregation of unique records in terms on market id.

  • App.activeDocument.name  not giving the new name entered in save as option from the script

    When I open a document and use save as option and enter a new name. The app.activeDocument.name object is still giving me the old file name, it not giving the new file name that was entered in the save as option. However this issue is comming when I open a document and use the save as option for the first time. From then on for any number of times I use the save as option it gives me the new name.

    Hi,
    In my case I am calling the script from my AI plugin(this is developed in c++) .  My plugin will be called when ever there is a event,  suppose I do ctrl+shift+s ( i,e File > Save as from Illustrator) , then my plugin will call the script.
    Script that I am using:
       var doc = app.activeDocument;
       alert (doc.name);
       var dest;
       var options= new IllustratorSaveOptions();
       dest = new File(app.activeDocument.path + '/' + doc.name);      
       doc.saveAs(dest, options);

  • NOT IN operator giving the wrong results

    DB version:10gR2
    Why is NOT IN giving the wrong results. Isn't NOT EXISTS operator a flawless alternative to NOT IN?
    create table my_table1 (col1 number);
    insert into my_table1 values (1);
    insert into my_table1 values (2);
    commit;
    create table my_table2 ( col1 number);
    insert into my_table2 values (1);
    commit;
    select * from my_Table1;
           COL1
              1
              2
    select * from my_table2;
           COL2
              1
      --correct result
      SELECT * FROM my_table1 t1 WHERE NOT EXISTS
    (SELECT * FROM my_table2 t2 WHERE t1.col1 = t2.col1)
           COL1
              2
    ---correct result using IN
    SELECT * FROM my_table1 t1 where col1 not in (select col1 FROM my_table2 t2);
           COL1
              2
    Inserting a NULL to my_Table2
    Now the query using NOT IN is returning wrong results.
    insert into my_table2 values (null);
    commit;
    SELECT * FROM my_table1 t1 where col1 not in (select col1 FROM my_table2 t2);
    no rows selected
    Query using NOT EXISTS is still giving the right results.
    SELECT * FROM my_table1 t1 WHERE NOT EXISTS
       (SELECT * FROM my_table2 t2 WHERE t1.col1 = t2.col1);
           COL1
              2

    ScottsTiger wrote:
    can i use NOT EXISTS(with a proper Co-related subquery) as a safe alternative to NOT IN?Depends on your data and what you need to achieve.
    Personally I avoid using NOT EXISTS or NOT IN if I can really help it.
    My preferred method is to outer join the tables together and then remove any resultant rows where a value exists and I didn't want one. ;)

  • Get_ddl Not giving the entire DDL

    Hi,
    SQL> select dbms_metadata.get_ddl('TABLE','CS_CSG_SYSTEMS') from dual;
    DBMS_METADATA.GET_DDL('TABLE','CS_CSG_SYSTEMS')
      CREATE TABLE "CUSTSRV"."CS_CSG_SYSTEMS"
       (    "RECORD_NO" NUMBER(15,0),
            "SY
    SQL> desc cs_csg_systems;
    Name                                      Null?    Type
    RECORD_NO                                 NOT NULL NUMBER(15)
    SYSTEM_NO                                          NUMBER(15)
    APP_TYPE                                           VARCHAR2(20)
    SUB_APP_TYPE                                       VARCHAR2(20)
    INCLUDE_FLAG                                       NUMBER(1)
    PRIN_NO                                            NUMBER(4)Why is the get_ddl function not giving the entire ddl ?
    Thanks
    Rajiv

    I think this is it ?
    SQL> set long 2000
    SQL> select dbms_metadata.get_ddl('TABLE','CS_CSG_SYSTEMS') from dual;
    DBMS_METADATA.GET_DDL('TABLE','CS_CSG_SYSTEMS')
      CREATE TABLE "CUSTSRV"."CS_CSG_SYSTEMS"
       (    "RECORD_NO" NUMBER(15,0),
            "SYSTEM_NO" NUMBER(15,0),
            "APP_TYPE" VARCHAR2(20),
            "SUB_APP_TYPE" VARCHAR2(20),
            "INCLUDE_FLAG" NUMBER(1,0),
            "PRIN_NO" NUMBER(4,0),
             CONSTRAINT "CS_CSG_SYSTEMS_PK" PRIMARY KEY ("RECORD_NO")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 524288 NEXT 524288 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "CUST_SML_X"  ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "CUST_SML_D"

Maybe you are looking for