Order by clause using decode function

Hi everybody,
i need below order in my report.
Connecticut
greenwich
stamford
bridgeport
New York
NYC
wrestcher
byram
Georgia
atlanta
athens
oconny
first i need above order in my view out put.
so in order by clause i used first decode function for State ordering
and in second decode function for city ordering.
i do not need order by ascending or descending.
so pls anybody can help me.
any help is greatly appreciated.
thanks.

add asc after the decode. default is desc

Similar Messages

  • How can we use DECODE function in where clause.

    Hi Guys,
    I have to use DECODE function in where clause.
    like below
    select * from tab1,tab2
    where a.tab1 = b.tab2
    and decode(code, 'a','approved')
    in this manner its not accepting?
    Can any one help me on this or any other aproach?
    Thanks
    -LKR

    >
    I am looking for to decode the actual db value something in different for my report.
    like if A then Accepted
    elseif R then Rejected
    elseif D then Denied
    these conditions I have to check in where clause.
    >
    what are you trying to do?
    may be you are looking for
    select * from tab1,tab2
    where a.tab1 = b.tab2
    and
       (decode(:code, 'A','Accepted') = <table_column>
        or
        decode(:code, 'R','Rejected') = <table_column>
       or
        decode(:code, 'D','Denied') = <table_column>
       )

  • Using decode function without negative values

    Hi friends
    I am using oracle 11g
    I have at doubt regarding the following.
    create table Device(Did char(20),Dname char(20),Datetime char(40),Val char(20));
    insert into Device values('1','ABC','06/13/2012 18:00','400');
    insert into Device values('1','abc','06/13/2012 18:05','600');
    insert into Device values('1','abc','06/13/2012 18:55','600');
    insert into Device values('1','abc','06/13/2012 19:00','-32768');
    insert into Device values('1','abc','06/13/2012 19:05','800');
    insert into Device values('1','abc','06/13/2012 19:10','600');
    insert into Device values('1','abc','06/13/2012 19:15','900');
    insert into Device values('1','abc','06/13/2012 19:55','1100');
    insert into Device values('1','abc','06/13/2012 20:00','-32768');
    insert into Device values('1','abc','06/13/2012 20:05','-32768');
    Like this I am inserting data into table for every 5 minutes Here i need the result like
    output:
    Dname 18:00 19:00 20:00
    abc 400 -32768 -32768
    to retrieve this result i am using decode function
    SELECT Dname,
    MAX(DECODE ( rn , 1,val )) h1,
    MAX(DECODE ( rn , 2, val )) h2,
    FROM
    (SELECT Dname,Datetime,row_number() OVER
    (partition by Dname order by datetime asc) rn FROM Device
    where substr(datetime,15,2)='00' group by Dname.
    According to above data expected result is
    Dname 18:00 19:00 20:00
    abc 400 600(or)800 1100
    This means I dont want to display negative values instead of that values i want to show previous or next value.
    Edited by: 913672 on Jul 2, 2012 3:44 AM

    Are you looking for something like this?
    select * from
    select dname,
           datetime,
           val,
           lag(val) over (partition by upper(dname) order by datetime) prev_val,
           lead(val) over (partition by upper(dname) order by datetime) next_val,
           case when nvl(val,0)<0  and lag(val) over (partition by upper(dname) order by datetime) >0 then
             lag(val) over (partition by upper(dname) order by datetime)
           else 
             lead(val) over (partition by upper(dname) order by datetime)
           end gt0_val
    from device
    order by datetime
    where substr(datetime,15,2)='00';Please take a look at the result_column gt0_val.
    Edited by: hm on 02.07.2012 04:06

  • How to use DECODE function in Exspression?

    Hi,
    Can we use DECODE in Expression?
    I'm trying to use DECODE function but there is an error during the validation. But when i validate the mapping, it is successfully compiled but it is failed during deployment.
    But if I use CASE instead of DECODE, it works fine.
    Can we use DECODE in OWB???
    Thanks
    Raj

    Hi,
    In OWB 10gR2, if your are using only one DECODE in an expression, it's working. The package will compile when deploying the mapping. OWB will replace the DECODE by a CASE.
    But when you are using nested decode in an expression ( for example : decode(col1, 1, 'M', decode(col2, 'Madame', 'Mme', null)) ) only the first one is replaced by a case at deployment.
    In ROW_BASED mode, text of the expression is used outside of an sql statement and deployment will fails with "PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL statement only."
    If operating mode for the mapping is set to SET_BASED, it's working because the expression is used in an sql statement.
    I have logged a SR in metalink for this issue and a bug is opened (bug 5414112).
    But I agree with you, it's better to use case statement.
    Bernard

  • How to use decode function

    Hello Friends,
    I have a query that has different columns and I am not sure what the data type of each column is ...
    I want to use decode function which displays the following if the value of the column is like this ..
    if the value of column is -714E ie -700000000000000 then display as .A
    if the value of column is -814E ie -800000000000000 then display as .B
    NOTE ; don't know which column is having the value - and i don't know the data type of the column is ..
    got to use the decode function for all the columns selected ..
    I want to use decode function pls let me know how to write for this kind of requirement.
    appreciate your help in this rgds.
    thanks/kumar

    Dear Sir / Madam,
    Thanks for your understanding.
    Right now I am facing a unique problem.
    I am using decode function in a select statement. The columns are dynamic some columns are of type number and some are varchar datatypes. I want to apply decode function for every column irrespective of datatype.
    What i am finding difficult is if the column is a number datatype , the decode funciton is working good but if the column datatype is varchar or char datatype then i am getting ..
    here's the decode function..
    decode (CHAI.EVNDRIVE,
    -800000000000000,'.A',
    -700000000000000, '.B',
    -600000000000000 ,'.C',
    -500000000000000 , '.D',
    -400000000000000 , '.E',
    -300000000000000 , '.F',
    -200000000000000, '.G',
    -100000000000000 , '.H',
    -1000000000, '.R' ,CHAI.EVNDRIVE ) EVNDRIVE
    report error:
    ORA-01722: invalid number
    pls let me know how to over come this kind of scenario.
    is their a way to find whether the column datatype is number or char , so that i can check the column datatype before the decode funciton is applied ..
    thanks ..
    kumar

  • Problem using DECODE() function with a Query of Queries

    I
    posted
    on my blog about an issue I was having trying to use the PL/SQL
    DECODE() function with a Coldfusion Query of Queries. This function
    works fine when you query a database for information. However, when
    you query another query, it seems that CF doesn't recognize it. I
    got errors stating that it found a left parenthesis where it
    expected a FROM key word. Here is a simplified version of what I am
    trying to do:
    quote:
    <!--- Simulated query; similar to what I was calling from
    my database --->
    <cfscript>
    qOriginal = queryNew("Name,Email,CountryCode",
    "VarChar,VarChar,VarChar");
    newRow = queryAddRow(qOriginal, 5);
    querySetCell(qOriginal, "Name", "Joe", 1);
    querySetCell(qOriginal, "Email", "[email protected]", 1);
    querySetCell(qOriginal, "CountryCode", "AMER", 1);
    querySetCell(qOriginal, "Name", "Sally", 2);
    querySetCell(qOriginal, "Email", "[email protected]", 2);
    querySetCell(qOriginal, "CountryCode", "AMER", 2);
    querySetCell(qOriginal, "Name", "Bob", 3);
    querySetCell(qOriginal, "Email", "[email protected]", 3);
    querySetCell(qOriginal, "CountryCode", "ASIA", 3);
    querySetCell(qOriginal, "Name", "Mary", 4);
    querySetCell(qOriginal, "Email", "[email protected]", 4);
    querySetCell(qOriginal, "CountryCode", "EURO", 4);
    querySetCell(qOriginal, "Name", "John", 5);
    querySetCell(qOriginal, "Email", "[email protected]", 5);
    querySetCell(qOriginal, "CountryCode", "EURO", 5);
    </cfscript>
    <cfquery name="qCountries" dbtype="query">
    SELECT DISTINCT(CountryCode) AS CountryCode,
    DECODE(states, "AMER", "North America &amp; Canada",
    "EURO", "Europe &amp; Africa", "ASIA", "Japan &amp;
    Asia","") CountryName
    FROM qOriginal
    ORDER BY CountryCode
    </cfquery>
    <cfdump var="#qCountries#">
    <!--- ========== END OF CODE ========== --->
    So running this returned the following error:
    Query Of Queries syntax error.
    Encountered "(. Incorrect Select Statement, Expecting a
    'FROM', but encountered '(' instead, A select statement should have
    a 'FROM' construct.
    Does anybody know why this doesn't work? Is it just not
    supported? Please note that I have also tried to use the CASE()
    function instead of DECODE() and that resulted in basically the
    same error. For now I an looping over my distinct query with a
    switch statement and manually loading a new query with the data how
    I want it. But it would be a lot cleaner and less code to have the
    DECODE() to work. Thx!

    DECODE() is an Oracle function, not generic SQL. Q-of-Q is a
    very limited subset of SQL and lacks many functions and clauses
    available in standard SQL, especially what you may be used to using
    in your particular RDBMS.
    See
    Query
    of Queries user guide
    Phil

  • ViewObjects Order by clause with DECODE

    Hello!
    I am using Jdeveloper 11g, version 11.1.1.2.0.
    The problem I'm having is this.
    If I use a DECODE statement in view objects ORDER BY clause, I get an error: "java.util.regex.PatternSyntaxException: Unmatched closing ')' near index 2".
    Let me give an example. I'll be using EmployeesView view object, which is using Employees entity from HR schema.
    This is a part of view objects XML.
    <ViewObject
    xmlns="http://xmlns.oracle.com/bc4j"
    Name="EmployeesView"
    Version="11.1.1.55.36"
    SelectList="Employees.EMPLOYEE_ID,
    Employees.FIRST_NAME,
    Employees.LAST_NAME,
    Employees.EMAIL,
    Employees.PHONE_NUMBER,
    Employees.HIRE_DATE,
    Employees.JOB_ID,
    Employees.SALARY,
    Employees.COMMISSION_PCT,
    Employees.MANAGER_ID,
    Employees.DEPARTMENT_ID"
    FromList="EMPLOYEES Employees"
    BindingStyle="OracleName"
    CustomQuery="false"
    PageIterMode="Full"
    UseGlueCode="false"
    OrderBy="Employees.MANAGER_ID">
    As you can see in this case, the Order by clause is very simple. This works like a charm.
    But, if put something like this "DECODE(Employees.MANAGER_ID, NULL, 1, 2)" in the Order by, I get an internal parsing error.
    I replicated this error on my home machine as well as on my work machine. I'm using the same version of Jdeveloper on both.
    Has anyone else stumbled upon this problem and solved it?
    Any thoughts would be greatly appreciated :)
    Kristjan

    The second example works, but the first one doesn't, unfortunately :/
    Also, the example I gave is unfortunately just that, a proof-of-concept example that there is a problem with DECODE if it is written inside the Order by clause.
    My real DECODE use case is a bit different. Like this: "DECODE(attribute, 'N', 1, 2) ASC".
    Since posting my original question, I did some research-by-example work and I discovered that this is not just a problem of DECODE, but more like a problem of brackets and commas.
    No database function that uses more than one parameter can be used in Order by clause.
    The reason is, if a function with more than one parameter is used, commas inside brackets have to be used. Something along the lines of: "database_function(param1, param2, ...)".
    The parser seems to have a problem with this kind of expressions.
    Is there a work around?
    Kristjan
    p.s.: Thank you for your quick response.

  • Using DECODE Function to change data

    I am trying to use the Decode function in a SQL statement to find a field that has a specific type, and when it finds that type, I want to blank out the results in a different field.
    For example:
    DECODE(ADDR_TYPE,'HOME',PHONE='') HOME_PHONE

    something like:
    SQL> with t as
      2   (select 219 id,
      3           'BUS' addr_type,
      4           '505-555-5555' phone
      5      from dual
      6    union
      7    select 219 id,
      8           'HOME' addr_type,
      9           null   phone
    10      from dual
    11    union
    12    select 220 id,
    13           'BUS' addr_type,
    14           '101-111-1111'   phone
    15      from dual
    16    union
    17    select 220 id,
    18           'HOME' addr_type,
    19           null   phone
    20      from dual
    21    union
    22    select 223 id,
    23           'BUS' addr_type,
    24           '202-222-2222'   phone
    25      from dual
    26    union
    27    select 224 id,
    28           'HOME' addr_type,
    29           '303-333-3333'   phone
    30      from dual
    31    union
    32    select 225 id,
    33           'BUS' addr_type,
    34           null   phone
    35      from dual
    36    union
    37    select 226 id,
    38           'HOME' addr_type,
    39           null   phone
    40      from dual)
    41  select a.id,
    42         a.addr_type,
    43         decode(a.addr_type,'BUS',phone,null) phone
    44    from (select id, addr_type, phone,
    45                 row_number() over (partition by id order by id, decode(addr_type,'BUS',1,2)) rn
    46            from t) a
    47   where a.rn = 1;
            ID ADDR PHONE
           219 BUS  505-555-5555
           220 BUS  101-111-1111
           223 BUS  202-222-2222
           224 HOME
           225 BUS
           226 HOME
    6 rows selected.
    SQL>

  • How to use Decode Function in Webi / Designer - BOE XI 3.1

    Hi All,
    I have a SQL query which needs to include in the webi report.
    Below is the query :
    SELECT
    SECURITY.SEC_CUSIP_NO "CUSIP", 
    SECURITY.STY_SEC_TY_CD "SECURITY TYPE",
    SECURITY.SEC_DERIVED_DESC_TX "SECURITY DESCRIPTION",
      SECURITY.sec_dep_teleg_de "FED DESCRIPTION",
      SEC_STND_PR "STANDARD/FACTORED PRICE",
      SEC_STND_PR_EFF_DT "STANDARD/FACTORED PRICE Date",
      SECURITY.SEC_YIELD_PR "YIELD PRICE",
      SECURITY.SEC_YIELD_PR_DT "YIELD RICE EFFECTIVE DATE",
      STND_PR_VND_VENDOR_CD "PRICE SOURCE",
      SEC_MATURITY_DT "MATURITY DATE",
      SEC_ISSUE_DT "ISSUE DATE",
                 CASE WHEN SECURITY.STY_SEC_TY_CD IN ('BA','CD','CDD','CDE','CDM','CDV','CP','CPD') THEN
                    (position.PSN_AVAIL_PAR_VL + position.PSN_COLLAT_PAR_VL) * (SECURITY.SEC_STND_PR) / 100
                 ELSE
                    (position.PSN_AVAIL_PAR_VL + position.PSN_COLLAT_PAR_VL) * (  (  SECURITY.SEC_YIELD_PR * DECODE (SECURITY.SEC_PRIN_FT, 0, 1, SECURITY.SEC_PRIN_FT))) / 100
                    * DECODE(SECURITY.STY_SEC_TY_CD, 'AMP', DECODE(NVL(SECURITY.SEC_MULTIPLIER_UNIT_VL,0), 0, 1, SECURITY.SEC_MULTIPLIER_UNIT_VL), 'MMP', DECODE(NVL(SECURITY.SEC_MULTIPLIER_UNIT_VL,0), 0, 1, SECURITY.SEC_MULTIPLIER_UNIT_VL), 'AMPT', DECODE(NVL(SECURITY.SEC_MULTIPLIER_UNIT_VL,0), 0, 1, SECURITY.SEC_MULTIPLIER_UNIT_VL), 1 )
                 END
            ) "MARKET VALUE"
    FROM SECURITY SECURITY
       ,   position position
    WHERE STND_PR_VND_VENDOR_CD = 'VT'
    AND SEC_MATURITY_DT > SYSDATE-1
    and SECURITY.sec_sys_id=position.sec_sys_id
    I could create a report which has selected objects and defined where condition from the above query. I have also created a variable for 'when' & 'then' condition but stuck at else part which contains 'DECODE' function.
    Please suggestions how to write the same at the report or designer level.
    Thanks,
    Rameez Shaikh

    Hi Rameez,
    Looking at the query you can create the object directly in the universe, either create two objects one for inner decode and use it in outer case logic. In report it is nothing but nested if logic. For eg.  If(a=b;1;(if(a=c;2;3))
    Thanks
    Gaurav

  • Using DECODE Function in SQL

    I need to know if there is any way to use a range of values from
    database and decode to certain text. I am able to do with one
    value.
    for example:
    DECODE(column_name,'216767111','Unlimited',column_name)
    above argument works with one value only. How about a range,
    ex: 216767000 to 216767111. I need to use only SQL. No PL/SQL.
    Kinldly need some body's help
    Thanks
    Munis

    Which version of the database? If it's 8i+ then you can use
    the CASE function
    for example:
    (CASE WHEN column_name between 216767000 and 216767111
    THEN 'Unlimited' ELSE column_name END)
    This won't work in PL/SQL because they're introducing a CASE
    statement does soemthing different.
    rgds, APCHello Andrew
    Thank you for response. I am using 8i. 8.1.6. However using
    CASE, I get inconsistent data type, ORA-00932: inconsistent
    datatypes. I able to work it out with other response using
    DECODE(sign(. Do you have any idea why i am getting this error.
    If time permits, let me know

  • How to use decode function in oracle apex 3.2.1

    Hello Friends,
    how to use decode
    var_decode := 'decode'||'('|| var1 ||','|| -800000000000000||','||'.A'||','||
    appreciate your help.
    regards/kumar
    Edited by: kumar73 on Apr 23, 2010 12:25 PM
    Edited by: kumar73 on Apr 23, 2010 12:27 PM

    Hey just on this particular point, there's a handy PL/SQL method for escaping quotation characters which may reduce the complexity of the string.
    For example, if I had a string:
    I can't understand why quoting my 'quote' characters never seems to "work"!and I wanted to pass that into a variable, I could do this:
    vc_foo:= 'I can''t understand why my ''quote'' characters never seems to "work"!';or I could use the q function, whereby you enclose your string within a quote delimiter of your choice, like so:
    vc_foo:= q'^I can't understand why quoting my 'quote' characters never seems to "work"!^';
    note: I used the caret (^) character by convention but any valid character will do
    ...all of which leaves your original string more or less unadulterated.
    I find this particularly useful for generating dynamic SQL and dynamic PL/SQL, as it leave the query looking a tad more readable, although if you are chaining together multiple strings with double-pipes, it can make it a little muddier. I find it particularly useful if I'm going to deal with string data from, for example, a field with Irish-derived surnames such as "O'Reilly"...
    Give it a go!

  • Between clause with DECODE function.

    Hi All,
    I have one table which has object, date and quantity columns, Now based on date range I can find out the objects and quantity but the question is: I want a query which returns all the objects and should show quantity 0(zero or null) for those objects which don't falls under that date range. So I thought to use a decode function but it only uses the relational operation, I thought something like this but it's wrong,
    select object,decode(created_date,BETWEEN '01/01/2008' TO '08/01/2008',quantity,0) from table;
    Does anyone have any idea how can I make this work in single sql statement?
    Thanks for your help.

    select object,decode(created_date,BETWEEN '01/01/2008' TO '08/01/2008',quantity,0) from table;
    Does anyone have any idea how can I make this work in single sql statement?If you're still interested in using DECODE over Case when, please try this.
    Check for employees hired between 6/17/1987 and 9/30/1987
    SQL> select first_name||' '||last_name as emp_name, hire_date,
      2         decode(sign((to_date('06/17/1987','MM/DD/YYYY')-1)-hire_date)
      3           + sign((to_date('09/30/1987','MM/DD/YYYY')+1)-hire_date)
      4                   ,0,'Between','Not between') as IsBetween
      5    from employees
      6   where hire_date <to_date('01/01/1991','MM/DD/YYYY')
      7  /
    EMP_NAME                                       HIRE_DATE ISBETWEEN
    Steven King                                    17-JUN-87 Between
    Neena Kochhar                                  21-SEP-89 Not between
    Alexander Hunold                               03-JAN-90 Not between
    Jennifer Whalen                                17-SEP-87 BetweenMessage was edited by:
    Bobbydj

  • Get purchase order doc date using BAPI function module

    Hi,
    I have a .net windows application that uses BAPI_PO_GETDETAIL function module to get particular details of a PO in SAP. But i am not able to get the "Doc Date" for a particular PO. I am able to get all the details of items from the table "PO_ITEMS ". I used only 1 input parameter "PURCHASEORDER".
    Please help me to get this thing done
    .netframework : 4.0
    Language: C#
    Visual Studio: vs 2010
    Regards,
    Manosh Jacob

    Absolutely hynek petrak..
    Manosh Jacob You can go with the above technique.

  • Order By Using Decode Function

    Order by
    (DECODE
    (length(code),9,
    ('substr(code,6,1) ,substr(code,1,3)'),
    ('substr(code,8,1) ,substr(code,1,3) ,substr(code,5,1)'))
    ) desc
    The code length could be 9 chars with the following format :
    9 digits as
    001-08/09
    002-08/09
    The code length could be 9 chars with the following format :
    or 11 digits as
    002/A-07/08
    002/B-07/08
    The Required Out put is as Follow:
    002-08/09
    001-08/09
    002/B-07/08
    002/A-07/08
    Any Help pls..?
    Regards,
    Abdetu..

    SQL> r
      1  with td as ( select '002-08/09' code from dual union all
      2               select '002/A-07/08' from dual union all
      3               select '001-08/09' from dual union all
      4               select '002/B-07/08' from dual
      5             ) -- end testdata
      6  select code
      7  from   td
      8  order by decode(length(code), 9, substr(code,6,1) || substr(code,1,3),
      9                                substr(code,8,1) || substr(code,1,3) || substr(code,5,1)
    10*                ) desc
    CODE
    002-08/09
    001-08/09
    002/B-07/08
    002/A-07/08
    4 rows selected.
    SQL>
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • By using decode function, count mismatch between source and target

    Source query:
    select distinct
    frm_track_id,
    --ATTRIBUTE_NAME,
    SUBSTR(ATTRIBUTE_NAME,INSTR(ATTRIBUTE_NAME,'_',1,1)+1,INSTR(ATTRIBUTE_NAME,'_',1,2) - (INSTR(ATTRIBUTE_NAME,'_',1,1)+1)) LOCUS,
    frm_id,
    frm_maj_version,
    --'null' as ETL_LOAD_STATUS,
    --'null' as ETL_LOAD_DTE,
    --'null'as ETL_LOAD_STATUS2,
    DECODE(attribute_name,( select attribute_name from dual where attribute_name like '%_allele1'), OUTPUT_ANSWER_VAL, null) ORIGINAL_LOC_ALLELE1
    --DECODE(attribute_name, (select attribute_name from dual where attribute_name like '%_allele2'), OUTPUT_ANSWER_VAL, null) ORIGINAL_LOC_ALLELE2,
    --DECODE(attribute_name, (select attribute_name from dual where attribute_name like '%_ser1'), OUTPUT_ANSWER_VAL, null) ORIGINAL_LOC_SER1,
    --DECODE(attribute_name, (select attribute_name from dual where attribute_name like '%_ser2'), OUTPUT_ANSWER_VAL, null) ORIGINAL_LOC_SER
    from iidb_stg.stage_fn_base_translate
    where attribute_name in ( 
    'loc_a_allele1','loc_a_allele2','loc_a_ser1','loc_a_ser2', 
    'loc_b_allele1','loc_b_allele2','loc_b_ser1','loc_b_ser2', 
    'loc_c_allele1','loc_c_allele2','loc_c_ser1','loc_c_ser2', 
    'loc_dp_ser1','loc_dp_ser2', 
    'loc_dpa1_allele1','loc_dpa1_allele2', 
    'loc_dpb1_allele1','loc_dpb1_allele2', 
    'loc_dq_ser1','loc_dq_ser2', 
    'loc_dqa1_allele1','loc_dqa1_allele2', 
    'loc_dqb1_allele1','loc_dqb1_allele2', 
    'loc_dr_ser1','loc_dr_ser2', 
    'loc_drb1_allele1','loc_drb1_allele2', 
    'loc_drb3_allele1','loc_drb3_allele2', 
    'loc_drb4_allele1','loc_drb4_allele2', 
    'loc_drb5_allele1','loc_drb5_allele2' 
    and frm_track_id=308678
    order by 1,2
    result set:
    frm_track_id
    LOCUS
    frm_id
    frm_maj_version
    ORIGINAL_LOC_ALLELE1
    308678
    a
    2005
    1
    205
    308678
    b
    2005
    1
    3502
    308678
    c
    2005
    1
    401
    308678
    dqb1
    2005
    1
    301
    308678
    dqb1
    2005
    1
    null
    308678
    drb1
    2005
    1
    403
    308678
    drb1
    2005
    1
    null
    Target Query:
    select distinct
    FRM_TRACK_ID,
    LOCUS,
    FRM_ID,
    FRM_MAJ_VERSION,
    --ETL_LOAD_STATUS,
    --ETL_LOAD_DTE,
    --ETL_LOAD_ID,
    --ETL_LOAD_STATUS2,
    ORIGINAL_LOC_ALLELE1
    --ORIGINAL_LOC_ALLELE2,
    --ORIGINAL_LOC_SER1,
    --ORIGINAL_LOC_SER2
    from
    IIDB_STG.OPS_FN_SBJCT_TYPING
    where FRM_TRACK_ID=308678
    order by 1,2
    result set:
    frm_track_id
    LOCUS
    frm_id
    frm_maj_version
    ORIGINAL_LOC_ALLELE1
    308678
    a
    2005
    1
    205
    308678
    b
    2005
    1
    3502
    308678
    c
    2005
    1
    401
    308678
    dqb1
    2005
    1
    null
    308678
    drb1
    2005
    1
    403

    In Source, you are selecting from  iidb_stg.stage_fn_base_translate, however in target query you are selecting from IIDB_STG.OPS_FN_SBJCT_TYPING. the only condition in both where clause is of FRM_TRACK_ID=308678, so i assume that the missing 2 records are not present in
    IIDB_STG.OPS_FN_SBJCT_TYPING table. Modifying the target query might not resolve issue but you have to check why these two records are missing from this table in first place.

Maybe you are looking for

  • Cannot Add Approved App To A Web Page - App Does Not Show in the App Part Section.

    Hi all,   I have successfully add an App from the SharePoint App Store to my SharePoint Site which was developed using SharePoint 2013. The added app was successfully Approved then when I try to add that app using the App Part to a web page I cannot

  • I get a problem on Report doing in migration ,Round Changes to Trunc in sql

    Hi Actually problem is in migration process, from siebel 7.8 get migrated to OBIEE 10.1.3.4.0 problem we have 10 reports that show in sql as ROUND function in seibel that same report run in obiee it sql shows that in TRUNC in obiee i need the ROUND f

  • Acrobat deleted by mistake

    Hi, by mistake I have deleted my Adobe Acrobat program, I have the license no, how do I best get it reinstalled?

  • Is the whole OS universal?

    With reference to this: http://discussions.apple.com/message.jspa?messageID=4868806 Can I boot an Intel mac Mini from a bootable firewire drive image from my PPC PowerMac?

  • Wifi, Bluetooh and iSight not working MacBook Pro

    I have a mid 2009 MacBook Pro Unibody. 8Gb Ram  Mavericks OS. I powered down one evening, everything normal.  Next day I rebooted it to find that I had lost Wifi, Bluetooth and isight.  Oh, and the fan runs at high speed constantly. Ptheise computer