Select last occorence for each field of view where not there a timestamp

I have a view TEST with the following field Field1 , Field2, Field3, ....
Sample TEST
Field1 .................Field2
1 ...................... Rep7
2 ...................... Rep5
3 ...................... Rep4
1 ...................... Rep1
2 ...................... Rep3
3 ...................... Rep6
I want create a select that give the following result take a distinct field1 with the last occorence of field2
For each field1 I want take the last field2
sample of above the result is
Field1..................Field2
1 ...................... Rep1
2 ...................... Rep3
3 ...................... Rep6
Edited by: user9011634 on 19-gen-2010 16.55

Well, as i told you before, UNLESS the view has an order by statement in it you're out of luck.
You will NOT get consistently ordered results UNLESS you have an order by statement.
So you can try the code posted for you before, and it may work 90+ percent of the time, but i don't know many places where 90% consistency is good enough.
*note, 90% is an arbitrary number, i can only tell you that it will not be 100% (and that's typically the required correctness rate any shop i've ever worked in).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Select last value for each day from table

    Hi!
    I have a table that stores several measures for each day. I need two queries against this table and I am not quite sure how to write them.
    The table stores these lines (sample data)
    *DateCol1                 Value       Database*
    27.09.2009 12:00:00       100           DB1
    27.09.2009 20:00:00       150           DB1
    27.09.2009 12:00:00       1000          DB2
    27.09.2009 20:00:00       1100          DB2
    28.09.2009 12:00:00       200           DB1
    28.09.2009 20:00:00       220           DB1
    28.09.2009 12:00:00       1500          DB2
    28.09.2009 20:00:00       2000          DB2Explanation of data in the sample table:
    We measure the size of the data files belonging to each database one or more times each day. The value column shows the size of the database files for each database at a given time (European format for date in DateCol1).
    What I need:
    Query 1:
    The query should return the latest measurement for each day and database. Like this:
    *DateCol1       Value      Database*
    27.09.2009        150          DB1
    27.09.2009       1100          DB2
    28.09.2009        220          DB1
    28.09.2009       2000          DB2Query 2:
    The query should return the average measurement for each day and database. Like this:
    *DateCol1       Value      Database*
    27.09.2009       125          DB1
    27.09.2009      1050          DB2
    28.09.2009       210          DB1
    28.09.2009      1750          DB2Could someone please help me to write these two queries?
    Please let me know if you need further information.
    Edited by: user7066552 on Sep 29, 2009 10:17 AM
    Edited by: user7066552 on Sep 29, 2009 10:17 AM

    For first query you can use analytic function and solve it.
    with t
    as
    select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss') dt,       100 val,           'DB1' db from dual union all
    select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'),       150,           'DB1' from dual union all
    select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'),       1000,          'DB2' from dual union all
    select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'),       1100,          'DB2' from dual union all
    select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'),       200,           'DB1' from dual union all
    select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'),       220,           'DB1' from dual union all
    select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'),       1500,          'DB2' from dual union all
    select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'),       2000,          'DB2' from dual
    select dt, val, db
      from (
    select row_number() over(partition by trunc(dt), db order by dt) rno,
           count(*) over(partition by trunc(dt), db) cnt,
           t.*
      from t)
    where rno = cntFor second you can just group by
    with t
    as
    select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss') dt,       100 val,           'DB1' db from dual union all
    select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'),       150,           'DB1' from dual union all
    select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'),       1000,          'DB2' from dual union all
    select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'),       1100,          'DB2' from dual union all
    select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'),       200,           'DB1' from dual union all
    select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'),       220,           'DB1' from dual union all
    select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'),       1500,          'DB2' from dual union all
    select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'),       2000,          'DB2' from dual
    select trunc(dt) dt, avg(val) val, db
      from t
    group by trunc(dt), db
    order by trunc(dt)

  • SQL Selecting the first and last entries for each day

    Hello SQL experts,
    I hope you can help with this.. I have a table (could have 1M or more rows in it) see structure below. I am looking to get the first and last date/times for each employee for each day. I also need the location GUID for the first read.
    EmployeeGUID (uniqueidentifier datatype)
    LocationGUID (uniqueidentifier datatype)
    DateTime (DateTime datatype)
    12345678-0000-0000-0000-000000000000
    11111111-0000-0000-0000-000000000000
    04/12/2014 07:00:01
    12345678-0000-0000-0000-000000000000
    22222222-0000-0000-0000-000000000000
    04/12/2014 10:40:05
    12345678-0000-0000-0000-000000000000
    22222222-0000-0000-0000-000000000000
    04/12/2014 17:04:02
    44422222-0000-0000-0000-000000000000
    22222222-0000-0000-0000-000000000000
    04/14/2014 08:00:00
    44422222-0000-0000-0000-000000000000
    22222222-0000-0000-0000-000000000000
    04/14/2014 14:00:03
    44422222-0000-0000-0000-000000000000
    33333333-0000-0000-0000-000000000000
    04/15/2014 07:49:00
    44422222-0000-0000-0000-000000000000
    11111111-0000-0000-0000-000000000000
    04/15/2014 09:00:01
    This would be the ideal output (I can do without the TotalTimeInHours):
    EmployeeGUID (uniqueidentifier datatype)
    LocationGUID (uniqueidentifier datatype)
    FirstRead (DateTime datatype)
    LastRead (DateTime datatype)
    TotalTimeInHours
    12345678-0000-0000-0000-000000000000
    11111111-0000-0000-0000-000000000000
    04/12/2014 07:00:01
    04/12/2014 17:04:02
    Total in hours between the first and last read.
    44422222-0000-0000-0000-000000000000
    22222222-0000-0000-0000-000000000000
    04/14/2014 08:00:00
    04/14/2014 14:00:03
    44422222-0000-0000-0000-000000000000
    33333333-0000-0000-0000-000000000000
    04/15/2014 07:49:00
    04/15/2014 09:00:01
    I would post what I have tried so far but I have been trying many different types of queries over the last few days. In short I need the employees first and last reads for each date. They could have many entries per date or just 1. I am certain that this
    is a trivial thing for a SQL expert but not trivial for me :).
    Thank you in advance!

    Thank you!
    This is almost what I need. The LocationGUID has to be included in the output. When I include it, I have to put it in the Group By clause. When I do that the reads are based on the LocationGUID (see below).
    ** I added a few more data entries and included the LocationGUID in the output.
    ***** SQL ***********
    CREATE TABLE test(  EmployeeGUID  uniqueidentifier, LocationGUID  uniqueidentifier, DateTimeCol  DateTime )Insert into test values
    ('12345678-0000-0000-0000-000000000000','11111111-0000-0000-0000-000000000000','04/12/2014 07:00:01')
    ,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/12/2014 10:40:05')
    ,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/12/2014 17:04:02')
    ,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/12/2014 19:00:00')
    ,('44422222-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/14/2014 08:00:00')
    ,('44422222-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/14/2014 14:04:03')
    ,('44422222-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/15/2014 07:49:00')
    ,('44422222-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/15/2014 09:00:01')
    ,('12345678-0000-0000-0000-000000000000','11111111-0000-0000-0000-000000000000','04/13/2014 10:40:05')
    ,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/13/2014 17:04:02')
    ,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/13/2014 19:00:00')
    ;with mycte as (
    SELECT *, row_number() OVER(partition by EmployeeGUID, Cast(DateTimeCol as date)  Order by  DateTimeCol) rnASC,
     row_number() OVER (partition by EmployeeGUID, Cast(DateTimeCol as date)  Order by  DateTimeCol DESC) rnDESC
    FROM    test)
    Select EmployeeGUID ,Cast(DateTimeCol as date) dt,LocationGUID,
    Max(Case when rnASC=1 Then DateTimeCol End) minDateTimeCol
    ,Max(Case when rnDESC=1 Then DateTimeCol End ) maxDateTimeCol
    ,Datediff(minute, Max(Case when rnASC=1 Then DateTimeCol End) ,Max(Case when rnDESC=1 Then DateTimeCol End ) )/60.0  TotalTimeInHours
    from mycte
    Group by EmployeeGUID, LocationGUID,Cast(DateTimeCol as date)
    Order by dt,EmployeeGUID
    drop TABLE test
    **** OUTPUT **********
    EmployeeGUID
    dt
    LocationGUID
    minDateTimeCol
    maxDateTimeCol
    TotalTimeInHours
    12345678-0000-0000-0000-000000000000
    2014-04-12
    11111111-0000-0000-0000-000000000000
    2014-04-12 07:00:01.000
    NULL
    NULL
    12345678-0000-0000-0000-000000000000
    2014-04-12
    22222222-0000-0000-0000-000000000000
    NULL
    2014-04-12 19:00:00.000
    NULL
    12345678-0000-0000-0000-000000000000
    2014-04-13
    11111111-0000-0000-0000-000000000000
    2014-04-13 10:40:05.000
    NULL
    NULL
    12345678-0000-0000-0000-000000000000
    2014-04-13
    22222222-0000-0000-0000-000000000000
    NULL
    2014-04-13 19:00:00.000
    NULL
    44422222-0000-0000-0000-000000000000
    2014-04-14
    22222222-0000-0000-0000-000000000000
    2014-04-14 08:00:00.000
    2014-04-14 14:04:03.000
    6.066666

  • Fill table using different statements for each field (newbie question)

    Hi all, I'm about to fill table table1 (field1, field2, etc.) using different statements (and maybe variables) for each field.
    My statements are too different to combine them into one query, but my example is simple:
    statement 1:
    SELECT ttt AS field1 FROM dual
    statement 2:
    SELECT yyy AS field2 FROM dual
    Each statement returns one value. Maybe I need some variable for each value, so var_field1 = field1, var_field2 = field2, etc.
    As a result I have to fill table table1 using my variables, so it must be some procedure.
    I know I can do it using one statement below, but I have more than 100 queries, so they should be executed one by one.
    with t1 as(
    select (SELECT 'ttt' FROM dual) field1, (SELECT 'yyy' FROM dual) field2 from dual
    select * from t1;
    Could you please show me some example, how this procedure should be written?
    Thanks ahead.

    This hasn't got anything to do with Oracle Reports, but here we go anyway. Your query can simply be:
    with t1 as(
    select 'ttt' field1, 'yyy' field2 from dual
    select * from t1;
    FIE FIE
    ttt yyy
    1 row selected.But maybe your example was an over simplification of your problem.

  • JDBC to Lotus Notes, only 255 bytes be read for each field. Any clue?

    Hi,
    I am programming with JDBC to Lotus Notes. I can extract data from .nsf files but for each field, only 255 bytes can be read, all the rest got truncated. I ran the ResultSetMetaData.DisplayColumnSize(), it returns 255.
    What is the problem? How can I extract larger strings (such as 700 bytes)? I tried bloc data type, it doesn't help.
    In the API docs, there is a RowSetMetaData that has a SetColumnSize() method, but I can not find an implemented package of it, also not sure it will work. Any suggestion will be deeply appreciated!
    Thanks!
    William

    You must declare the filed Rich Text, not Only Text, because the Method GetString only get 255... although your filed have more caracters...
    If you declare rich Text you must use tgetAsciiStream Method...
    suppose the filed 2 is Rich Text...
                 byte[] buffer = new byte[4096];
                 int size;
                 InputStream strin = rs.getAsciiStream(2);
                 if(strin == null){
                    System.out.println("notas es null\n");
                 else {
                    for(;;){
                        try {
                        size = strin.read(buffer);
                        if(size <= 0){
                           break;
                        System.out.print(new String(buffer,0,size));
                        } catch (java.io.IOException e){
                           e.printStackTrace();

  • Separate chart for each field

    I have a table with 74 numerical fields for a given date.  The table looks something like
    RecordDate Field1
    Field2 Field3
    .... Field74
    I would like a line chart for each field with the value on the Y axis and date on the X axis.  That part is easy enough.
    The problem is that if I put 74 lines on the same chart it will be unintelligible.  Unfortunately I think the best way to observe trends in the data over time is a line chart for each.
    I know that I could manually add a separate chart for each one.  However, I'd like to dynamically add a chart for each field.  We may potentially add Field75 down the road, so avoiding reengineering the report each time is desirable.  Is something
    like this possible?
    Thanks!

    Hi Mateoc15,
    If I understand correctly, you want to specify a Chart Area for a Series in order to increase the readability of the chart.
    In Reporting Services, the bar, polar, or shape series can only be combined with series of the same chart types in the same chart area. If you are using a Polar or Shape chart, you can consider using a separate chart data region for each field that you wish
    to show.
    For the details, please refer to the link:
    Specify a Chart Area for a Series (Report Builder and SSRS)
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Error Message-- For Balancing field "Profit Center" is not filled

    Hi All,
    When I do Shipment Start get Error-Message for Balancing field "Profit Center" is not filled!
    A PGI for the DNXXXXXXXX is not possible!
    Can u please help me how to resolve this issue ?
    WM Baby

    Hi,
    AS per configuration , there is prifit centre assignment  .Enter the profit centre in the field of profit centre by the help opf F4.
    Regards,
    Andra

  • I have install last update for i pod(ios5) but during installation there was one problem....i have restore my ipod and now i have lost all my buyed music!!Is not possible download it....?What are the details, including any error messages, related to your

    I have install last update for i pod(ios5) but during installation there was one problem....i have restore my ipod and now i have lost all my buyed music!!Is not possible download it....?What are the details, including any error messages, related to your question?

    Have you not got the music on your computer and/or on backups on, for example, external drives or CDs/DVDs ?

  • TS1702 I bought an in-app purchase for toy defense, but it is not there.  What do I do?

    I bought an in-app purchase for toy defense, but it is not there.  What do I do?

    Contact iTunes
    Apple - Support - iTunes - Contact Us

  • Selecting many records for each material...

    Hi all,
    I have an internal table that contains a list of materials. I want to loop over that list and retrieve a group of purchase reqs from EBAN for each material...appending each group of rews to my req table for each pass over the material list. Sample code;
    LOOP AT GT_MATERIALS INTO WA_MATERIALS.
    SELECT MENGE LFDAT
        INTO CORRESPONDING FIELDS OF TABLE GT_EBAN_FIELDS
        FROM EBAN
        WHERE MATNR EQ WA_MATERIALS-MATNR.      
        ???DO I DO AN APPEND OF SOME KIND HERE???
    ENDLOOP.
    Regards,
    Mat

    Hi Mathew,
    From performance point of view, the SELECT QUERY should not be under a loop. So you can do the following :
    <b>SORT GT_MATERIALS.
    IF not gt_materials is initial.</b>
    SELECT MENGE LFDAT
    INTO CORRESPONDING FIELDS OF TABLE GT_EBAN_FIELDS
    FROM EBAN
    <b>FOR ALL ENTRIES IN GT_MATERIALS</b>
    WHERE MATNR EQ GT_MATERIALS-MATNR.
    <b>ENDIF.</b>
    Also if the structure of table GT_EBAN_FIELDS has only two fields MENGE, LFDAT then please remove INTO CORRESPONDING FIELDS, instead use INTO TABLE GT_EBAN_FIELDS. This is becz INTO CORRESPONDING FIELDS would affect the performance.
    Best regards,
    Prashant

  • Selecting last value for a given date

    I've read some of the other threads on the this tope, but can't find a resolution.
    My query is supposed to get the last values for the given two days (start date and end date) and I return the difference between the two values. The query as it is only works for days where there is an entry for 12:00 pm. On some days, it will therefore return nothing. But I'm not sure how to get it to choose the last value for the given day and still remain a fast query.
    Here is a sample of the query with dates that return a result.
    SELECT max_query.sgnl_id as sgnl, max_query.max_val - min_query.min_val result_val
       FROM
      (SELECT t1.sgnl_id, t2.smpl_dte, t1.pv_id,
        MAX(t2.integ_since_val) AS max_val
         FROM diag.blm_acct t2, diag.pv_sgnl_id_assc t1
        WHERE t2.smpl_dte = TO_DATE ('11/15/2008 12:00:00 PM', 'MM-DD-YYYY HH:MI:SS AM')
        AND t1.pv_id = t2.pv_id
      AND t2.pv_id        IN
        (SELECT pv_id
           FROM diag.pv_sgnl_id_assc
          WHERE sgnl_id IN
          (SELECT sgnl_id
             FROM diag.series_sgnl_rec_asgn
            WHERE series_id = 'Series5'
    GROUP BY t1.sgnl_id, t2.smpl_dte, t1.pv_id
      ) max_query  ,
      (SELECT pv_id,
        MAX(integ_since_val) AS min_val
         FROM diag.blm_acct
        WHERE smpl_dte = TO_DATE ('11/10/2008 12:00:00 PM', 'MM-DD-YYYY HH:MI:SS AM')
      AND pv_id        IN
        (SELECT pv_id
           FROM diag.pv_sgnl_id_assc
          WHERE sgnl_id IN
          (SELECT sgnl_id
             FROM diag.series_sgnl_rec_asgn
            WHERE series_id = 'Series5'
    GROUP BY pv_id
      ) min_query WHERE max_query.pv_id  = min_query.pv_id
       ORDER BY max_query.sgnl_idThe data set in the table is quite large, but the above query returns only 49 results (one for each signal in 'Series5').
    I tried the following statement by itself to get the last value, but it takes quite a long time to execute (increased the overall query time from 1 sec to 400+ sec when used in the query above):
    SELECT DISTINCT trunc(smpl_dte) as the_day,
             first_value(integ_since_val) over (partition by trunc(smpl_dte) order by smpl_dte desc) as last_val_per_day
      FROM diag.blm_acct WHERE pv_id = 3 and trunc(smpl_dte) = to_date('05/18/2008', 'MM-DD-YYYY ')Any thoughts?

    Well here is an example of the output I'm trying to generate:
    SGNL                              RESULT_VAL
    CCL_Diag:BLM00:Slow60PulsesTotalLoss        52.843439255
    CCL_Diag:BLM101:Slow60PulsesTotalLoss        55.7883452511etc...
    Here is the table structure:
    describe diag.blm_acct;
    Name                           Null     Type                                                                                                                                                                                         
    BLM_ACCT_ID                    NOT NULL NUMBER(12)                                                                                                                                                                                   
    PV_ID                          NOT NULL NUMBER(38)                                                                                                                                                                                   
    SMPL_DTE                       NOT NULL DATE                                                                                                                                                                                         
    INTEG_OVER_VAL                          BINARY_DOUBLE()                                                                                                                                                                              
    INTEG_SINCE_VAL                         BINARY_DOUBLE()                                                                                                                                                                              
    INTEG_TYPE_ID                           NUMBER(3)     
    describe diag.PV_SGNL_ID_ASSC
    Name                           Null     Type                                                                                                                                                                                         
    PV_ID                          NOT NULL NUMBER(38)                                                                                                                                                                                   
    SGNL_ID                        NOT NULL VARCHAR2(75)   
    describe diag.SERIES_SGNL_REC_ASGN
    Name                           Null     Type                                                                                                                                                                                         
    SERIES_ID                      NOT NULL VARCHAR2(50)                                                                                                                                                                                 
    SGNL_ID                        NOT NULL VARCHAR2(75)                                                                                                                                                                                 
    DISP_ORD_NBR                            NUMBER                                                                                                                                                                              The main problem I'm having is how to replace this line of code:
    WHERE t2.smpl_dte = TO_DATE ('11/15/2008 12:00:00 PM', 'MM-DD-YYYY HH:MI:SS AM')with something that will get the last value (integ_since_val) in the diag.blm_acct table for the 11/15 date.
    Edited by: Solerous on Feb 18, 2009 11:32 AM - I figured out how to output the table data

  • Select one record for each member of the group

    Hi,
    am having a table where in i will be having data for so many group members. i need to fetch data for a particular group members whose number of rows of data may be more in numbers (but i want only one row of data for each member of the group)
    here is the query for fetching all rows of data
    select RI.RESOURCE_NAME,TR.MSISDN,TR.ADDRESS1_GOOGLE, TR.MSG_DATE_INFO, FROM TRACKING_REPORT TR, RESOURCE_INFO RI
    WHERE TR.MSISDN IN (SELECT MSISDN FROM RESOURCE_INFO WHERE GROUP_ID ='1' AND COM_ID=2 ) AND RI.MSISDN=TR.MSISDN
    order by MSG_DATE_INFOoutput of this query is...
    >
    ddd     12345          13-Mar-10 19:43:03
    eee     54321     Tamil Nadu, India      13-Mar-10 19:39:48
    ddd     12345          13-Mar-10 19:32:58
    eee     54321     Tamil Nadu, India      13-Mar-10 19:30:07
    ddd     12345          13-Mar-10 19:23:08
    eee     54321     Tamil Nadu, India      13-Mar-10 19:20:14
    fff     98765          13-Mar-10 19:19:22
    ddd     12345          13-Mar-10 19:13:01
    eee     54321     Tamil Nadu, India      13-Mar-10 19:09:50
    ddd     12345          13-Mar-10 19:02:56
    eee     54321     tn,ind      13-Mar-10 18:59:49
    ddd     12345          13-Mar-10 18:53:08
    eee     54321     tn,ind      13-Mar-10 18:49:50
    ddd     12345          13-Mar-10 18:42:56
    eee     54321     tn,ind      13-Mar-10 18:39:50
    ddd     12345          13-Mar-10 18:33:00
    eee     54321     tn,ind      13-Mar-10 18:29:50
    ddd     12345          13-Mar-10 18:22:54
    eee     54321     tn,ind      13-Mar-10 18:19:50
    ddd     12345          13-Mar-10 18:12:56
    eee     54321     tn,ind      13-Mar-10 18:09:50
    ddd     12345          13-Mar-10 18:02:54
    eee     54321     tn,ind      13-Mar-10 18:00:02
    fff     98765     Tamil Nadu, India      13-Mar-10 17:59:26
    fff     98765     Tamil Nadu, India      13-Mar-10 17:54:26
    ddd     12345          13-Mar-10 17:52:56
    eee     54321     tn,ind      13-Mar-10 17:49:50
    fff     98765     Tamil Nadu, India      13-Mar-10 17:49:25
    fff     98765     Tamil Nadu, India      13-Mar-10 17:44:26
    ddd     12345          13-Mar-10 17:42:56
    >
    from this output i want only one latest record for each member(ddd,eee,fff). i.e
    >
    ddd     12345          13-Mar-10 19:43:03
    eee     54321     Tamil Nadu, India      13-Mar-10 19:39:48
    fff     98765          13-Mar-10 19:19:22
    >
    how to modify the query to achieve this...?

    Hi,
    This is not giving the result which i want...
    table is
    CREATE TABLE TRACKING_REPORT
      ID               NUMBER,
      MSISDN           NUMBER(12)                   NOT NULL,
      X                NUMBER(15,8)                 NOT NULL,
      Y                NUMBER(15,8)                 NOT NULL,
      TIME_STAMP       DATE,
      MSG_DATE_INFO    DATE                         DEFAULT sysdate,
      ADDRESS1_GOOGLE  VARCHAR2(400 BYTE),
      ADDRESS2_GOOGLE  VARCHAR2(400 BYTE),
      ADDRESS_MLINFO   VARCHAR2(400 BYTE),
      REQ_ID           VARCHAR2(30 BYTE)
    CREATE TABLE RESOURCE_INFO
      RESOURCE_ID    NUMBER,
      MSISDN         NUMBER,
      RESOURCE_NAME  VARCHAR2(25 BYTE),
      ADDRESS        VARCHAR2(100 BYTE),
      COM_ID         VARCHAR2(20 BYTE),
      ADMIN_ID       NUMBER,
      TIME_STAMP     DATE                           DEFAULT SYSDATE,
      GROUP_ID       NUMBER
    )

  • Selection screen control for a field in the report painter report

    Hi,
    Could you please advice me as to how we can add exclude selection functionality for a field on the selection screen of a report made by trhough report painter report.
    Your prompt reply will be really appreciated.
    Thanks,
    Ramesh.

    look at this code and try
    select-options : S_NODEID for ZNODETAB-ZNODEID.
    at selection-screen on value-request for s_nodeid-low
    perform f4_nodeid using 'S_NODEID-LOW'.
    at selection-screen on value-request for s_nodeid-low
    perform f4_nodeid using 'S_NODEID-HIGH'.
    end-of-selection.
    FORM f4_nodeid  USING    p_field.
      declare it_node.
    select znodeid from ZNODETAB into table it_node.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ZNODEID'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = p_field
          value           = space
          value_org       = 'S'
          display         = 'F'
        TABLES
          value_tab       = it_node
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    endform

  • [sound] Select audio canal for each application [solved]

    Hi all
    After a long and unsuccessful search on the net I decide to post my question here.
    I have a motherboard with the HDA chipset (4 output in the back) and I want to choose for each application the output.
    For example : my music on the Master output (plugged to amp),  my video on the Suround output (plugged to a helmet), all the other apps on the Side output (plugged to speakers) ...
    I am actually whith ALSA and Pulseaudio, but I am ready to change all to do that (except the ditrib )
    Thanks in advance
    (sorry if my english is poor, I am french)
    Last edited by sauliwx (2014-09-12 13:43:09)

     My bad, clipboard must have been turned off or I simply confused the links. Here the correct one, once again. Runtime arguments allow you to specify a pcm with parameters set upon execution:
    speaker-test -c 2 -t wav -D plug:"dmix:{CARD DG DEV 0}"
    # CARD D is one argument and DEV 0 the other. The original dmix takes more arguments
    # see /usr/share/alsa/pcm/dmix.conf
    # The one I proposed takes also channels number as runtime argument like so
    speaker-test -c 8 -t wav -D plug:"dmix:{CARD SB DEV 0 SUBDEV -1 FORMAT S32_LE RATE 192000 CHANNELS 8}"
     The more important thing is dsnoop, otherwise you might have problems when recording. This kind of configuration may end up similar to this proposed one. Similar when it comes to logical structure that is. You might want to try build your configuration into the latter one. Instead of this:
    default {
    # use pulse as default
    type pulse
    fallback "sysdefault"
    hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
     try this based on your part:
    default {
    type asym;
    playback.pcm "green";
    capture.pcm "dsnoop1";
    fallback "sysdefault"
    hint {
    show on
    description "Default ALSA Output (currently green)"
     You had no asym type plugin in there.
    Edit: "fallback" might not only be unnecessary, it might conflict or cause an error within the configuration. Untested.
    Last edited by emeres (2014-09-17 16:13:40)

  • Select different style for each border of a rectangle

    Hi,
    I just wanted to have a Rectangle (or some other component) which one must have different style for each of its borders.
    For example I want the top and the right border with a thickness of 2 and others with a thickness of 0 (so we can only see those two borders).
    How can I do it ?
    I tried with stroke (but stroke is for all borders, we can't specify which style for which border).
    Thanks,
    Jeff

    Well it is not clear what he is looking for just rect or a component with specific border. I havnt used flex 4 so i am not sure how to get it working for that
    , but i am sure it will work on the same lines.
    I have also given another option to create a it using lineTo() and moveTo().But this should only be used if this rect is not going to be used as a container.
    I think i should elaborate...
    Create a custom component using UIComponent. In updateDisplayList() after super.updateDisplayList() call a method say drawRect(). In this drawRect() use lineTo() and moveTo() to draw the rectangle. you would have to use the component's height and width to draw the rect.
    Let me know if you need more clearification...

Maybe you are looking for

  • HTTP 500 Error while using XML HTTP Port for idoc

    Hi, I am trying to send CRM idocs via XML Http instead of usual t-rfc. After standard idoc - pi configs i get the below error. transferring the IDoc by HTTP, the return code with the message '500Error during parsing of SOAP header' has occurred. In B

  • GR Price different from PO price

    Hi Experts, We are continuously having a scenario wherein the per unit price at time of GR is showing more than then PO per unit price. The new price is relevant and fair too. As an example: In PO per unit price is Rs 150/-, quantity 100 units. So to

  • 32L4300 mystery video port, any clue what cable?

    Anyone here with a model 32L4300 or any of that related series. On the left side of the set,  the very top input, above the HDMI is a port labeled IN ViDEO 1 (audio). The input is unusual. It's partly plastic (yellow) and it does not look like any ot

  • Export Filter - processing in batches

    I'm writing an export filter that uses an external tool to process the photos. The tool can/should be multithreaded and I want to take advantage of this by processing the images in groups of 2 or 4 or 8 (or whatever). This means that I gather the pat

  • How to track my iphone

    how to track my iphone