How do i keep my distinct values in this query?

Hi, I have the following query:-
WITH data AS(SELECT  99.99 retail_value, 6545 sales_value, 7 tran_type, 2001 sale_date from dual union all
             SELECT  776.99 retail_value,774 sales_value,   8 tran_type, 2007 sale_date  from dual union all
             SELECT  929.99 retail_value, 56 sales_value, 8 tran_type, 2006 sale_date  from dual union all
             SELECT  44.99 retail_value, 35 sales_value,   8 tran_type, 2003 sale_date  from dual union all
             SELECT  776.99 retail_value,17 sales_value,   7 tran_type, 2008 sale_date  from dual union all
             SELECT  44.99 retail_value, 2 sales_value,   7 tran_type, 2007 sale_date  from dual),
     commercial_model AS(SELECT 1 com_id, 7 tran_type, 2001 valid_from, 2010 valid_to from dual union all
                         SELECT 1 com_id, 8 tran_type, 2001 valid_from, 2006 valid_to from dual union all
                         SELECT 2 com_id, 8 tran_type, 2001 valid_from, 2003 valid_to from dual union all
                         SELECT 2 com_id, 7 tran_type, 2001 valid_from, 2008 valid_to from dual)      
     SELECT a.*, b.* FROM
         data a,
           (select distinct tran_type from  commercial_model
             where com_id = nvl(NULL, com_id)
             ) b
     WHERE b.tran_type=a.tran_type Which works ok until i need to put a clause in to ensure that the sale_date is between the commercial model valid period i.e ( AND a.sal_date BETWEEN b.valid_from AND b.valid_to)
How can i incorporate this into my query, without losing the distinct tran_type in the inline view?
Many thanks

Not getting you clearly.
Where do you want to use this condition?
AND a.sal_date BETWEEN b.valid_from AND b.valid_toAnd, after using this condition what is your expected output?
Regards.
Satyaki De.

Similar Messages

  • How to get distinct values from this view

    I had created a view to get to display from 2 tables.But i got duplicate values in this.
    Please give any solution for this view code.
    CREATE OR REPLACE VIEW TRADEQUOTEHISTORY_VIEW
    (BOND_ID, BOND_NAME, COMM_PER_SHARE, QUOTE_DATE_TIME, TYPE,
    STOCK_PRICE, BID_PRICE, ASK_PRICE, ACTUAL_HEDGE, SOURCE_ORDER_ID,
    SOURCE_ORDER_NAME, NOTES, SIDE_ID, BIDNUKED, ASKNUKED,
    REALSTOCK, LAST_UPDATED_DATE)
    AS
    SELECT bi.bond_id, bi.bond_name,
    ( (bs.comm_per_share * bi.cv_cnvs_ratio * bs.hedge)
    / (bi.px_pos_mult_factor)
    nq.quote_date_time, bi.market_sector_des, nq.stock_price,
    nq.bid_price, nq.ask_price, nq.actual_hedge, so.source_order_id,
    so.source_order_name, nq.notes, bs.side_id,
    ( bs.bid_price
    + ( (csv.lastprice - bs.stock_price)
    * bi.cv_cnvs_ratio
    * bs.hedge
    / bi.px_pos_mult_factor
    ( bs.ask_price
    + ( (csv.lastprice - bs.stock_price)
    * bi.cv_cnvs_ratio
    * bs.hedge
    / bi.px_pos_mult_factor
    csv.lastprice,
    bs.last_updated_date
    FROM mtsc_bondinfo bi,
    mtsc_basissheet bs,
    mtsc_newquoteorder nq,
    mtsc_sourceorder so,
    mtsc_stock_v csv
    WHERE bi.bond_id(+) = bs.bond_id
    AND bs.bond_id(+) = nq.bond_id
    AND csv.bondid = bs.bond_id
    AND so.source_order_id(+) = nq.source_order_id
    UNION
    SELECT bi.bond_id, bi.bond_name,
    ( (bs.comm_per_share * bi.cv_cnvs_ratio * bs.hedge)
    / (bi.px_pos_mult_factor)
    nq.quote_date_time, bi.market_sector_des, bs.stock_price,
    bs.bid_price, bs.ask_price, bs.hedge, so.source_order_id,
    so.source_order_name, nq.notes, bs.side_id,
    ( bs.bid_price
    + ( (csv.lastprice - bs.stock_price)
    * bi.cv_cnvs_ratio
    * bs.hedge
    / bi.px_pos_mult_factor
    ( bs.ask_price
    + ( (csv.lastprice - bs.stock_price)
    * bi.cv_cnvs_ratio
    * bs.hedge
    / bi.px_pos_mult_factor
    ),csv.lastprice,
    bs.last_updated_date
    FROM mtsc_bondinfo bi,
    mtsc_basissheet bs,
    mtsc_newquoteorder nq,
    mtsc_sourceorder so,
    mtsc_stock_v csv
    WHERE bi.bond_id(+) = bs.bond_id
    AND bs.bond_id(+) = nq.bond_id
    AND csv.bondid = bs.bond_id
    AND so.source_order_id(+) = nq.source_order_id
    ORDER BY last_updated_date DESC
    result is coming like this
    BOND_ID     BOND_NAME     ((BS.COMM_PER_SHARE*BI.CV_CNVS_RATIO*BS.HEDGE)/(BI.PX_POS_MULT_FACTOR))     QUOTE_DATE_TIME     MARKET_SECTOR_DES     STOCK_PRICE     BID_PRICE     ASK_PRICE     ACTUAL_HEDGE     SOURCE_ORDER_ID     SOURCE_ORDER_NAME     NOTES     SIDE_ID     (BS.BID_PRICE+((CSV.LASTPRICE-BS.STOCK_PRICE)*BI.CV_CNVS_RATIO*BS.HEDGE/BI.PX_POS_MULT_FACTOR))     (BS.ASK_PRICE+((CSV.LASTPRICE-BS.STOCK_PRICE)*BI.CV_CNVS_RATIO*BS.HEDGE/BI.PX_POS_MULT_FACTOR))     LASTPRICE     LAST_UPDATED_DATE
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79901.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     9     130     104     25     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     9     135     104     25     41     STREET MARKET     AN     110     79901.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     9     130     104     25     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     9     135     104     25     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     9     130     104     25     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     9     135     104     25     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     9     130     104     25     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     9     135     104     25     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     9     130     104     25     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     9     130     104     25     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     9     130     104     25     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     9     130     104     25     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     62812767.6093129     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     62812767.6093129     08/01/2007     Corp     9     300     400     25     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     62812767.6093129     09/01/2007     Corp     9     300     400     25     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     62812767.6093129     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     62812767.6093129     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     62812767.6093129     11/01/2007     Corp     9     300     400     25     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     62812767.6093129     17/07/2007 7:06:20 PM     Corp     9     300     400     25     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     62812767.6093129     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:55:15 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79901.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     80066.4     80066.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     9     130     104     25     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     9     135     104     25     41     STREET MARKET     AN     110     79901.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     9     300     300     25     41     STREET MARKET     AN     110     80066.4     80066.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     9     130     104     25     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     9     135     104     25     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     9     300     300     25     41     STREET MARKET     fgdf dfgf     110     80066.4     80066.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     80066.4     80066.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     80066.4     80066.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     9     130     104     25     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     9     135     104     25     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     9     300     300     25     41     STREET MARKET     HGH HHGHF     110     80066.4     80066.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     9     130     104     25     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     9     135     104     25     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     9     300     300     25     41     STREET MARKET     New Notes     110     80066.4     80066.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     80066.4     80066.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79966.4     79966.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     08/01/2007     Corp     9     130     104     25     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     08/01/2007     Corp     9     200     200     25     41     STREET MARKET     AN     110     79966.4     79966.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     09/01/2007     Corp     9     130     104     25     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     09/01/2007     Corp     9     200     200     25     41     STREET MARKET     fgdf dfgf     110     79966.4     79966.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79966.4     79966.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79966.4     79966.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     11/01/2007     Corp     9     130     104     25     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     11/01/2007     Corp     9     200     200     25     41     STREET MARKET     HGH HHGHF     110     79966.4     79966.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     17/07/2007 7:06:20 PM     Corp     9     130     104     25     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     17/07/2007 7:06:20 PM     Corp     9     200     200     25     41     STREET MARKET     New Notes     110     79966.4     79966.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     62812767.6093129     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79966.4     79966.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     5591906636.41908     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     5591906636.41908     08/01/2007     Corp     9     300     400     25     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     5591906636.41908     09/01/2007     Corp     9     300     400     25     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     5591906636.41908     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     5591906636.41908     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     5591906636.41908     11/01/2007     Corp     9     300     400     25     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     5591906636.41908     17/07/2007 7:06:20 PM     Corp     9     300     400     25     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     5591906636.41908     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:55:14 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79901.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     9     130     104     25     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     9     135     104     25     41     STREET MARKET     AN     110     79901.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     9     130     104     25     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     9     135     104     25     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     9     130     104     25     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     9     135     104     25     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     9     130     104     25     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     9     135     104     25     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     62812767.6093129     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     62812767.6093129     08/01/2007     Corp     9     300     400     25     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     62812767.6093129     09/01/2007     Corp     9     300     400     25     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     62812767.6093129     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     62812767.6093129     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     62812767.6093129     11/01/2007     Corp     9     300     400     25     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     62812767.6093129     17/07/2007 7:06:20 PM     Corp     9     300     400     25     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     62812767.6093129     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:49:17 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:49:04 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     9     130     104     25     41     STREET MARKET     AN     110     79896.4     79870.4     905     01/08/2007 12:49:04 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     9     130     104     25     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:49:04 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     01/08/2007 12:49:04 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:49:04 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     9     130     104     25     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     01/08/2007 12:49:04 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     9     130     104     25     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:49:04 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     01/08/2007 12:49:04 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79966.4     79966.4     905     01/08/2007 12:48:22 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     9     200     200     25     41     STREET MARKET     AN     110     79966.4     79966.4     905     01/08/2007 12:48:22 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     9     200     200     25     41     STREET MARKET     fgdf dfgf     110     79966.4     79966.4     905     01/08/2007 12:48:22 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79966.4     79966.4     905     01/08/2007 12:48:22 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79966.4     79966.4     905     01/08/2007 12:48:22 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     9     200     200     25     41     STREET MARKET     HGH HHGHF     110     79966.4     79966.4     905     01/08/2007 12:48:22 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     9     200     200     25     41     STREET MARKET     New Notes     110     79966.4     79966.4     905     01/08/2007 12:48:22 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79966.4     79966.4     905     01/08/2007 12:48:22 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:02:32 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     9     300     400     25     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:02:32 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     9     300     400     25     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:02:32 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:02:32 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:02:32 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     9     300     400     25     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:02:32 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     9     300     400     25     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:02:32 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:02:32 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:01:05 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     9     300     400     25     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 12:01:05 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     9     300     400     25     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:01:05 PM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 12:01:05 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:01:05 PM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     9     300     400     25     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 12:01:05 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     9     300     400     25     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:01:05 PM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 12:01:05 PM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 11:58:23 AM
    106     007903AK3 Corp     705563.241890625     08/01/2007     Corp     9     300     400     25     41     STREET MARKET     AN     110     80066.4     80166.4     905     01/08/2007 11:58:23 AM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     9     300     400     25     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 11:58:23 AM
    106     007903AK3 Corp     705563.241890625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     80066.4     80166.4     905     01/08/2007 11:58:23 AM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 11:58:23 AM
    106     007903AK3 Corp     705563.241890625     11/01/2007     Corp     9     300     400     25     41     STREET MARKET     HGH HHGHF     110     80066.4     80166.4     905     01/08/2007 11:58:23 AM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     9     300     400     25     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 11:58:23 AM
    106     007903AK3 Corp     705563.241890625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     80066.4     80166.4     905     01/08/2007 11:58:23 AM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79896.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79901.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     9     130     104     25     41     STREET MARKET     AN     110     79896.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     08/01/2007     Corp     9     135     104     25     41     STREET MARKET     AN     110     79901.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     9     130     104     25     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     9     135     104     25     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     9     130     104     25     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     11/01/2007     Corp     9     135     104     25     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     9     130     104     25     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     9     135     104     25     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     7925.450625     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     31/07/2007 10:55:09 PM
    106     007903AK3 Corp     89.025     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79901.4     79870.4     905     31/07/2007 5:53:25 PM
    106     007903AK3 Corp     89.025     08/01/2007     Corp     9     135     104     25     41     STREET MARKET     AN     110     79901.4     79870.4     905     31/07/2007 5:53:25 PM
    106     007903AK3 Corp     89.025     09/01/2007     Corp     9     135     104     25     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     31/07/2007 5:53:25 PM
    106     007903AK3 Corp     89.025     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79901.4     79870.4     905     31/07/2007 5:53:25 PM
    106     007903AK3 Corp     89.025     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     31/07/2007 5:53:25 PM
    106     007903AK3 Corp     89.025     11/01/2007     Corp     9     135     104     25     41     STREET MARKET     HGH HHGHF     110     79901.4     79870.4     905     31/07/2007 5:53:25 PM
    106     007903AK3 Corp     89.025     17/07/2007 7:06:20 PM     Corp     9     135     104     25     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     31/07/2007 5:53:25 PM
    106     007903AK3 Corp     89.025     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79901.4     79870.4     905     31/07/2007 5:53:25 PM
    106     007903AK3 Corp     89.025     08/01/2007     Corp     6     7     78     78     41     STREET MARKET     AN     110     79896.4     79870.4     905     31/07/2007 1:05:18 AM
    106     007903AK3 Corp     89.025     08/01/2007     Corp     9     130     104     25     41     STREET MARKET     AN     110     79896.4     79870.4     905     31/07/2007 1:05:18 AM
    106     007903AK3 Corp     89.025     09/01/2007     Corp     9     130     104     25     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     31/07/2007 1:05:18 AM
    106     007903AK3 Corp     89.025     09/01/2007     Corp     200     5     7     8     41     STREET MARKET     fgdf dfgf     110     79896.4     79870.4     905     31/07/2007 1:05:18 AM
    106     007903AK3 Corp     89.025     11/01/2007     Corp     4     6     6     8     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     31/07/2007 1:05:18 AM
    106     007903AK3 Corp     89.025     11/01/2007     Corp     9     130     104     25     41     STREET MARKET     HGH HHGHF     110     79896.4     79870.4     905     31/07/2007 1:05:18 AM
    106     007903AK3 Corp     89.025     17/07/2007 7:06:20 PM     Corp     9     130     104     25     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     31/07/2007 1:05:18 AM
    106     007903AK3 Corp     89.025     17/07/2007 7:06:20 PM     Corp     67     78     90     34     41     STREET MARKET     New Notes     110     79896.4     79870.4     905     31/07/2007 1:05:18 AM
    Regards
    Kishore B

    BOND_ID     BOND_NAME     ((BS.COMM_PER_SHARE*BI.CV_CNVS_RATIO*BS.HEDGE)/(BI.PX_POS_MULT_FACTOR))     QUOTE_DATE_TIME     MARKET_SECTOR_DES     STOCK_PRICE     BID_PRICE     ASK_PRICE     ACTUAL_HEDGE     SOURCE_ORDER_ID     SOURCE_ORDER_NAME     NOTES     SIDE_ID     (BS.BID_PRICE+((CSV.LASTPRICE-BS.STOCK_PRICE)*BI.CV_CNVS_RATIO*BS.HEDGE/BI.PX_POS_MULT_FACTOR))     (BS.ASK_PRICE+((CSV.LASTPRICE-BS.STOCK_PRICE)*BI.CV_CNVS_RATIO*BS.HEDGE/BI.PX_POS_MULT_FACTOR))     LASTPRICE     LAST_UPDATED_DATE
    109     018490AL6 Corp     18871.341129          Corp     27     139     166     87                    110     120752.494     120779.494     905     01/08/2007 12:55:26 PM
    109     018490AL6 Corp     18871.341129          Corp          null     null     null     null               110     120752.494     120779.494     905     01/08/2007 12:55:26 PM
    I am not inserting values into newquoteorder,but i got values from that table ask,bid,stock values, it shows that values as null

  • How can i implement the default value for this variable?

    In one of our Stored procs,we have a variable RECS_TO_DELETE, which determines the number of records to delete from various DELETEs that happen within this proc.
    The value for RECS_TO_DELETE variable should be obtained from a configuration table sys_config
    select
    rec_num into RECS_TO_DELETE
    from sys_config
    where
    sys_code=55;
    But if something goes wrong with sys_config table or the above SELECT INTO, our client wants to makes sure that RECS_TO_DELETE should have a default value of 1000.
    In the code, how will i implement having this default value of 1000 for RECS_TO_DELETE variable  in case the above SELECT INTO fails for some reason.

    Hi,
    You have to assign a value before the execution...
    DECLARE
        RECS_TO_DELETE NUMBER(9) := 1000;
    BEGIN
        SELECT rec_num
        INTO   RECS_TO_DELETE
        FROM   sys_config
        WHERE  sys_code = 55;
        DBMS_OUTPUT.put_line(RECS_TO_DELETE);
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
           DBMS_OUTPUT.put_line(RECS_TO_DELETE);
    END;
    /Regards,

  • How to find out the maximum value in a Query

    Dear all,
    Im creating a Query on 0SD_C03 where i have to disply Maximum value of a material..
    EX:
    MATERIAL BILLED VALUE
    x                   1000
    y                   3000
    z                   2500
    in a analyser i have to display only Y and 3000
    We are using BW 7.0 version
    Can any one help me out in this
    Thxs in Advance
    Venu

    Hi Venu,
    You may wish to refer the link below:
    http://help.sap.com/saphelp_nw04/helpdata/en/17/82853c2dc5c505e10000000a11405a/content.htm
    Assign points if this is helpful.
    Regards,
    Anil

  • How to find out the maximum value in a Query within single material

    Dear all,
    Im creating a Query on 0SD_C03 where i have to disply Maximum value of a material which is having more that one transaction..
    EX:
    MATERIAL BILLED VALUE
    x with BILLED VALUE 100
    x with BILLED VALUE120
    y with BILLED VALUE 50
    y with  BILLED VALUE 80
    z with BILLED VALUE 50
    z with BILLED VALUE 60
    in a analyser i have to display X with billed value 120 that is max in X material and
    Y with billed value 80 that is max in Y material and
    Z with billed value 60 that is max in Z material
    In a query all the values are summing up. I.e for X its 220 and Y its 130 and Z its110 but we dont want to get total sum value we want individual values and the maximim of those values.......... 
    We are using BW 7.0 version
    Can any one help me out in this
    Thxs in Advance
    Venu

    Venu,
    In your query try creating a formula, with the value of each record as the key figure in the formula.
    In the aggregation tab select maximum in the exception aggregation dropdown and then select material as the reference characteristic
    then when you include material in the rows it will only display the maximum value.
    cheers
    mark

  • How-To populate SELECT LIST default value from SQL Query

    OK, I've done my homework, and did not find my answer in the Forum, so here it is.
    I have a Page that displays fields from a SQL Query. The Page also has below that radiogroups, checkboxes, and Select Lists to allow the user to change values in the fields that are displayed at the top of the Region. I am able to pre-populate the radiogroups and checkboxes by performing a SELECT in the 'Source value or expression' of the Source area of the Page Item.
    However, I am unable to do the same for the Select List fields. Their default value ends up being the first value in the LOV ('-- None --' for NULL values). Source Used: Only when current value in session state is null. Source Type: SQL Query. Also, when I first go into the Page when running it, and check the Session State values, they are all null, so I don't understand why the field is not populated by the SQL Query statement as the radiogroups and checkboxes are.
    Any suggestions??? I've tried all sorts of combinations.

    Thank you for the suggestion.
    I had considered that, but cannot do so, because we are using Oracle Application Express more for development than for data containment.
    We have all our data in an Oracle 10.g DB which is separate from the OAEX server, and the OAEX app will reference that data via VIEWs and DB LINKs. We are doing so primarily as an added data security layer, where the data is housed separate from the app, in case the Web site is ever compromised. The data that can be viewed is restricted to a subset of the actual data that is available.
    Since the data is on a separate server, (I assume) we will not be able to set the source type to Database column, because (I asume) that is dependent upon the data being housed by the OAEX server.
    That still leaves me with having to populate the field with a SELECT statement from the Oracle DB. This unfortuneately is almost a show-stopper for me because of down-stream processing data requirements. Have not been able to come up with contingencies yet.

  • I just accidentally made a double purchase on an audiobook. I downloaded the first one and have the second repeat download on hold. How do I keep from being charged for this extra book I don't need?

    I accidentally made a double purchase on an audiobook. I am not sure what I did wrong but now I have one of the books downloaded and an identical purchase on hold to download...I don't want to pay for this book twice! How do I stop the download or how do I get this adjusted? When I looked in my purchases the book is there twice.

    Please pardon the intrusion…
    Hi,  Diavonex!
    Congratulations on advancing to Level 6!
    At the Water Cooler in the Level 6+ Lounge, we are throwing virtual confetti in celebration of your attainment of Level 6-dom. Would you care to join us at the Water Cooler?
    Towards the bottom of the index on the Apple Support Communities Home Page you soon will find the Lounge link available to you. It should work for you within the next 24 hours if all goes as it should.
    Hope to see you there soon!

  • Hi how will get subquery returns multiple values for main query

    Hi all ;
    here i given one sql query
    1)select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '|| initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
    b.name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
    from table1 a
    join table3 c on c.emptype = a.emptype
    left outer join table2 b on a.name = b.name
    where a.mgrid = 100;
    if i run this above query returning multiple values depend on sa.mgr values.
    like output coming like this
    yes:2000-anbarasan
    yes:2700-anb
    yes:2000-rasan
    yes:2807-anbarasan
    yes:2700-anbanu
    yes:2000-null
    2) this sub query i am passing with main query
    select sa.mgrid,sa.sal,(select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '||
    initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
    b .name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
    from table1 a
    join table3 c on c.emptype = a.emptype
    left outer join table2 b on a.name = b.name
    where a.mgrid = 100)" test " from table4 sa,table5 te ,table6 ft where sa.id(+)=te.id and sa.mgr=ft.mgr;
    my final out put required like this:
    mgrid sal test
    100 20000 yes:2000-anbarasan
    yes:2700-anb
    yes:2000-rasan
    yes:2807-anbarasan
    yes:2700-anbanu
    yes:2000-null
    but i am getting erro:
    1)missing paranths
    2)single row subquery return more then one row.
    hi kindly give me answer to me as soon as possible
    Edited by: anbarasan on Sep 29, 2008 9:48 PM

    I refuse to read all of that code and guess what error message you are getting. Apparently others feel the same way.
    Run the final SQL statement and then cut and paste the code and full error statement into a post.
    Also include your full version number to three decimal places.
    My refusal is not an unwillingness to help you but rather an unwillingness to spend 10 minutes reconstructing what you could have pasted in in a fraction of a second. We are all volunteers here and there are many people that need help. I hope you understand.

  • I keep getting an "untrusted connection" warning for nearly every url including my banks and have to go through the "confirm exception" etc steps. How can I keep having to go through this?????

    I keep getting the untrusted connection warning and have to go thru all these freaking steps to get access and it happens OVER and OVER again for the EXACT same sites. One example is below citibank.com. MY BANK. EVERY TIME.
    == URL of affected sites ==
    http://www.citibank.com

    Hi there, I was getting the same type problems whenever connecting to a secure site. The problem was caused by my PC's clock. I had manually set the date back a few years to test an app that I was developing. As soon as I corrected the time, all connections were OK again.

  • We have two iPhones, one iMac, and one iTunes account. Can someone tell me an yeast way to manage each iPhone separately- that is -- when we connect each iPhone how do we keep our contacts separated? this is a real problem. Thanks

    We have two iphones , one imac , and one itunes account. Hope someone can tell me an easy way to synch each iphone so that our contacts stay separate. I would like to share itunes music etc but not synch the same contacts to each phone...major problem... Thanks!

    You have a few options which are detailed here:
    http://support.apple.com/kb/ht1495

  • How do I keep my ipod from doing this?

    My iPod touch is at its latest firmware, 5.1.1, and it is glitching all the time. These photos happened within a week of each other. Sometimes you have to notice where the status bar is. The simple passcode that I had for all of these was 3278. Sometimes I couldn't type the 7 or 8. The first two screenshots, I just unlocked it, but all the others, I had to restart the iPod.
    Right here my password was "Apple." I typed A, then I realized that I couldn't type P. Somebody told me it is fixed in iOS 6, but my iPod, a 3g, has no more updates. Apple has even told me that the iPod 3g can't support any more updates. I don't believe that. My computer, from 1999, was updated to an update that it really shouldn't work, becuase it is too slow.  I don't like Apple's ways. If you buy a 3rd gen and they come out with a 5th, you should be able to upgrade. Like the AT&T videos. Upgrade when you want, not when you're told. If there is no solution, and my friends iPod I'm buying does this too, 4th gen, then I'm just going to switch to Android or Kindle or whatever. Apple just wouldn't be worth my time. Too confusing. I get an app on my iPad, plug it into iTunes, and it says it isn't autorized. I have my iPad synced with my mom's Apple ID and I used mine to get the app. So yeah. If it does this again, I'm switching to android.
    <Email Edited by Host>

    I would just try restoring it in iTunes on a computer http://support.apple.com/kb/HT1414.
    You can create a backup in iTunes beforehand if you're concerned about losing any data other than applications and music (which can just be resynced to the iPod).
    If there's something you don't like about Apple software or procedures you can always go to apple.com/feedback in stead of venting on forums where nobody can acutally do anything about it.

  • How To add postion specific email address to this query in oracle hrms

    Hi friends,
    I'm using the below query to send an email to the supervisor,employee and the HR manager
    I was able to add the first two mail address..
    for the third one,I mean HR manager... how do I get the email address
    I want to add the email address of the position --(from per_positions-->name--'HR-Manager' )
    I want to add the person's email address who is holding this position...
    can some one help me with this please
    SELECT paa.person_id, papf.full_name, papf.email_address, paa.date_end,
    paa.date_start, paaf.supervisor_id, papf2.email_address
    FROM per_absence_attendances paa,
    per_all_people_f papf,
    per_all_assignments_f paaf,
    per_all_people_f papf2
    WHERE paa.date_end = TRUNC (:p_date)
    AND paa.business_group_id = :p_buss_id
    AND papf.person_id = paa.person_id
    AND TRUNC (:p_date) BETWEEN papf.effective_start_date
    AND papf.effective_end_date
    AND TRUNC (:p_date) BETWEEN paaf.effective_start_date
    AND paaf.effective_end_date
    AND paaf.assignment_type = 'E'
    AND paaf.person_id = paa.person_id
    AND paaf.supervisor_id = papf2.person_id
    AND TRUNC (:p_date) BETWEEN papf2.effective_start_date
    AND papf2.effective_end_date

    What about this:
    SELECT det.person_id
    ,det.full_name
    ,det.email_address
    ,det.date_end
    ,det.date_start
    ,det.supervisor_id
    ,det.mgr_email_address
    ,det.hr_person_id
    ,hrper.email_address hr_person_email
    FROM (
    SELECT paa.person_id, papf.full_name, papf.email_address, paa.date_end,
    paa.date_start, paaf.supervisor_id, papf2.email_address mgr_email_address
    ,(SELECT paafhr.person_id
    FROM per_all_people_f papfhr
    ,per_all_assignments_f paafhr
    ,hr_all_positions_f pos
    WHERE papfhr.person_id = paafhr.person_id
    AND nvl(papfhr.current_employee_flag, 'N') = 'Y'
    AND paafhr.assignment_type = 'E'
    AND paafhr.primary_flag = 'Y'
    AND paafhr.position_id = pos.position_id
    AND pos.name = 'HR-Manager'
    AND trunc(:p_date) BETWEEN
    papfhr.effective_start_date and papfhr.effective_end_date
    AND trunc(:p_date) BETWEEN
    paafhr.effective_start_date and paafhr.effective_end_date
    AND trunc(:p_date) BETWEEN
    pos.effective_start_date and pos.effective_end_date) hr_person_id
    FROM per_absence_attendances paa,
    per_all_people_f papf,
    per_all_assignments_f paaf,
    per_all_people_f papf2
    WHERE paa.date_end = TRUNC (:p_date)
    AND paa.business_group_id = :p_buss_id
    AND papf.person_id = paa.person_id
    AND TRUNC (:p_date) BETWEEN papf.effective_start_date
    AND papf.effective_end_date
    AND TRUNC (:p_date) BETWEEN paaf.effective_start_date
    AND paaf.effective_end_date
    AND paaf.assignment_type = 'E'
    AND paaf.person_id = paa.person_id
    AND paaf.supervisor_id = papf2.person_id
    AND TRUNC (:p_date) BETWEEN papf2.effective_start_date
    AND papf2.effective_end_date) det
    ,per_all_people_f hrper
    WHERE hrper.person_id = hr_person_id
    AND trunc(:p_date) BETWEEN
    hrper.effective_start_date AND hrper.effective_end_date;

  • How can I use the join condition for this query?

    Hi, i am using a query which has a sun query in it, wen i am running tat query it is giving 9332 records, I changed the sub query logic and given an inner join, but it is giving only 4476 records. So, I changed it to left join but it is giving more records
    than usual now, say 10033 records.
    This is the code which is giving records 9332, which is correct
    select      distinct 
          b.SRC_PROV_ID
          ,COALESCE(a.SYSTEM_NAME, a.CTRCT_GRP_NAME, a.PROV_SMG_NAME) AS SYSTEM_NAME
    INTO  TINtoSystem
    from 
          RARE.dbo.EDW_MASTER a 
          Inner Join RARE.dbo.EDW_PROD_ID_XREF b 
                on a.SMG_ID = b.SMG_ID 
      where SRC_PLATFORM_CD = 'TX' 
          and a.SMG_ID in 
                select distinct 
                SMG_ID 
                from RARE.dbo.EDW_PROD_ID_XREF 
                where SRC_PLATFORM_CD = 'TX' 
                and SRC_PROV_ID in (select q.PROV_TAX_ID from PACT.dbo.SQS_EDW_Source q) 
    I have changed this code by giving inner join as, but its not giving the exact records of 9332, 
    select distinct
    b.SRC_PROV_ID
    ,COALESCE(a.SYSTEM_NAME, a.CTRCT_GRP_NAME, a.PROV_SMG_NAME) AS SYSTEM_NAME
    INTO TINtoSystem
    from
    RARE.dbo.EDW_MASTER a
    Inner Join RARE.dbo.EDW_PROD_ID_XREF b
    on a.SMG_ID = b.SMG_ID
    Inner Join Pact.dbo.SQS_EDW_Source q
    on b.SRC_PROV_ID = q.PROV_TAX_ID
    where b.SRC_PLATFORM_CD = 'TX'
    Can anyone tell, where it is missing, I used left join also but its giving more records then, need help

    Hi, If you insist inner joins then please try
    SELECT DISTINCT
    b.SRC_PROV_ID
    ,COALESCE(a.SYSTEM_NAME, a.CTRCT_GRP_NAME, a.PROV_SMG_NAME) AS SYSTEM_NAME
    INTO TINtoSystem
    FROM
    RARE.dbo.EDW_MASTER a
    Inner Join RARE.dbo.EDW_PROD_ID_XREF b
    on a.SMG_ID = b.SMG_ID
    inner join
    select distinct
    c.SMG_ID
    from RARE.dbo.EDW_PROD_ID_XREF as c
    where SRC_PLATFORM_CD = 'TX'
    and exists (select * from PACT.dbo.SQS_EDW_Source q where c.SRC_PROV_ID=q.PROV_TAX_ID)
    ) as d on a.SMG_ID = d.SMG_ID
    where b.SRC_PLATFORM_CD = 'TX'

  • Distinct values from dynamic internal tabls

    Hi All,
    I have a dynamic internal tables like <dy_table> , i want to get distinct  values from this internal tables,
    how to do that, structure of dynamic internal tables is dynamic acc. to user conditions.
    regards,
    Anuj

    Hi Anuj
    Just try this,
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = tb_fields_for_it
    IMPORTING
    ep_table = gp_dyn_table.
    ASSIGN gp_dyn_table->* TO <gt_table>.
    ASSIGN LOCAL COPY OF INITIAL LINE OF <gt_table> TO <fs_table>.
    LOOP AT tb_output.
    *To assign value for serial number.
    ASSIGN COMPONENT 1 OF STRUCTURE <fs_table> TO <ls_field>.
    <ls_field> = tb_output-sno.
    UNASSIGN <ls_field>.
    *To assign value for Sales Organization.
    ASSIGN COMPONENT 2 OF STRUCTURE <fs_table> TO <ls_field>.
    <ls_field> = tb_output-vkorg.
    UNASSIGN <ls_field>.
    *To assign Rate for its respective Condition type.
    LOOP AT tb_konp WHERE knumh = tb_output-knumh.
    READ TABLE tb_fieldcat1 WITH KEY fieldname = tb_output-kschl.
    IF sy-subrc EQ 0.
    lv_count = tb_fieldcat1-col_pos.
    ASSIGN COMPONENT lv_count OF STRUCTURE <fs_table> TO <ls_field>.
    IF tb_konp-konwa EQ '%'.
    tb_konp-kbetr = tb_konp-kbetr / co_10.
    <ls_field> = tb_konp-kbetr.
    ELSE.
    <ls_field> = tb_konp-kbetr.
    ENDIF.
    ENDIF.
    ENDLOOP.
    lv_count = lv_count + 1.
    APPEND <fs_table> TO <gt_table>.
    CLEAR <fs_table>.
    ENDLOOP.
    Hope this proves helpful to you.

  • How can i pass the one value for two bind parameters

    hi All,
    i have a search Query
    select Distinct CONSOLIDATION_SUMMARY_ID,CREATION_DATE,CREATED_BY,BATCH_ID,PROCESS_FLAG,ERROR_MESSAGE,CUSTOMER_ID,BILLING_FREQUENCY
    ,CONSOLIDATION_LEVEL,SOLD_TO_ORG_ID ,SHIP_TO_ORG_ID ,TRANSACTIONAL_CURR_CODE ,INVOICE_TO_ORG_ID ,PRICE_LIST_ID
    ,ORIG_SYS_DOCUMENT_REF,INVENTORY_ITEM_ID ,ORGANIZATION_ID ,ORDERED_ITEM ,ORDERED_QUANTITY ,UNIT_LIST_PRICE
    ,UNIT_SEELING_PRICE,ORDER_QUANTITY_UOM,ORDER_NUMBER ,ORDER_DATE ,INVOICE_NUMBER ,INVOICE_DATE
    ,FEE_CALCULATION_WORKSHEET_PDF ,TRADE_DETAILS_PDF ,INVOICE_REPORT_PDF ,PRICING_ATTRIBUTE_CONTEXT
    ,PRICING_ATTRIBUTE ,PRICING_ATTR_VALUE_FROM
    from xxcurrnx.xxcur_trade_consol_summary XXSTR
    WHERE XXSTR.BATCH_ID=NVL(:1,XXSTR.BATCH_ID)
    and XXSTR.CUSTOMER_ID=nvl(:2,XXSTR.CUSTOMER_ID)
    But i need to pass only one value to this query: throw the below code
    public void passTocusttrxn(String vcustid)
    System.out.println("The customer id in trxn vo:"+vcustid);
    XxcurtradeconsummaryVOImpl vOrdnumb=getXxcurtradeconsummaryVO1();
    vOrdnumb.setWhereClauseParam(0,vcustid);
    vOrdnumb.setWhereClauseParam(1,null);
    vOrdnumb.executeQuery();
    System.out.println("The executed query After is :"+vOrdnumb.getQuery());
    But it throws the below exception.
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    could you please tell me how can i achieve this.
    Thanks,

    hi Meher,
    i need to pass this value throug the Spell Parameter.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    XxcustdtlsmainAMImpl am=(XxcustdtlsmainAMImpl)pageContext.getApplicationModule(webBean);
    if(pageContext.getParameter("PCustID")!=null) // PCustID is the Spell parameter here
    if(pageContext.getParameter("PbtchID")!=null)
    if(pageContext.getParameter("PordNum")!=null)
    String vcustID=pageContext.getParameter("PCustID");
    String vOrdNum=pageContext.getParameter("PordNum");
    System.out.println("The cust id in PR:"+vcustID);
    System.out.println("The cust id in PR:"+vOrdNum);
    am.passTocustlinetrxn(vcustID);
    how this vcustID value will passed to the search Code.
    if(pageContext.getParameter("BatchID")!=null && !pageContext.getParameter("BatchID").equals(""))
    String BchID=pageContext.getParameter("BatchID");
    int vInBtchID=Integer.parseInt(BchID);
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(0,vInBtchID);
    System.out.println("The Batch ID is :"+vInBtchID);
    f=1;
    }else
    srchVO.setWhereClauseParam(0,null);
    if(pageContext.getParameter("CustmeCode")!=null && !pageContext.getParameter("CustmeCode").equals(""))
    System.out.println("i am im customer code ");
    String vCustID=pageContext.getParameter("CustmeCode");
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(1,vCustID);
    System.out.println("The customer code is "+vCustID);
    f=1;
    }else
    srchVO.setWhereClauseParam(1,null);
    if(f==1)
    srchVO.executeQuery();
    Regards,

Maybe you are looking for