How to find a substring of a data field and use it in a Group By expression?

Hi all

Please provide me with the syntax where I perform the substring of ITEMNAME database with the starting position 7 field and length of 3.

I must use this value of substring in a group by clause within a group to another clause.

Thanks in advance.

If suppose that your date is 07/05/2015

use

-get 2015

also get this done in the database if the report is large but in small case use this.

Let us know if you have questions more.

Thank you

~ KKT ~.

Tags: Business Intelligence

Similar Questions

  • How to find the path of reports to PDF and send them via JAVA?

    Hi expert,

    We have created many reports of OBIEE, how to find the way of reports to PDF and send them via JAVA?
    Catalog/shared /..., but it is a binary file that is not sent to the customers.

    Hey kobe,.

    You can try this:

    http://satyaobieesolutions.blogspot.com/2012/07/setting-up-iBOT-to-save-report-to.html

  • How can I make the popup with empty fields and create new record?

    I would use a popup create new record.
    I created an af:popup drag and drop a data control VO in jsff. Then, I created a button and place an af:showPopupBehavior. I was able to pop-up window by clicking on the button.
    However, the window filled with information from the record 1. and when I select a record in the table and click on the popup, the popup is filled with this record.
    How can I make the popup with empty fields and create a new record by recording the popup?
    Thank you

    Hello

    You must call the CreateInsert for the underlying ViewObject operation when opening the popup because it does not allow to clear the input field, you must have a new record created

    Frank

  • Date fields and time to autopopulate when opening the PDF

    I have an interactive PDF form with many fields. Two of them are the date and time. Users want that date fields and the time to complete the form to the current date and time (let's call it 'generic form') is open to fill. When they are made by filling out the form, they need to be activated for the reader so they can save it under a different name (Information of Dave). If they reopen "Information of Dave" for some reason, the date and time must not change. If they open the generic form for another client, then the new date and time should appear. I saw a discussion for Javascript to auto to a date, but not an hour. My Javascript skills are limited, so be specific enough about where to put the code.

    Work on a Mac on Snow Leopard using Acrobat Pro 10.1.7.

    Thanks in advance,

    Amy

    dateField var = this.getField ("CurrentDate");

    var timeField = this.getField ("CurrentTime");

    dateField.value = util.printd ("mm/dd/yyyy", new Date());

    timeField.value = util.printd ("HH: mm", new Date());

  • How to find the difference between two dates in time except Sunday

    Hi all

    I have a table, as shown below.
    SQL> select * from test;
    
    TR_ID                                              CREATE_TIME                                                                       CODE
    -------------------------------------------------- --------------------------------------------------------------------------- ----------
    S12341                                             05-JUN-12 12.20.52.403000 AM                                                      1003
    S12342                                             11-JUN-12 11.15.33.182000 AM                                                      1003
    S12342                                             07-JUN-12 12.00.36.573000 PM                                                      1002
    S12343                                             20-JUN-12 12.34.37.102000 AM                                                      1003
    S12343                                             15-JUN-12 11.34.27.141000 PM                                                      1002
    S12344                                             01-JUL-12 10.01.06.657000 PM                                                      1002
    S12344                                             06-JUL-12 12.01.04.188000 AM                                                      1003
    S12341                                             31-MAY-12 11.20.38.529000 PM                                                      1002
    I would like to know the difference between same tr_ids create_time, which should give out in hours except Sunday.

    For example:

    TR_ID: S12344
    1002_Create_time: July 1, 12 PM 10.01.06.657000 (i.e. Sunday)
    1003_Create_time: 12.01.04.188000 AM 6 July 12

    1002 create time is 22:00 Sunday.

    If the query must exclude only the hours of Sunday which is 10 p.m. to Monday 00 h which is 2 Hrs.

    I tried the sub query after doing a search on this forum but I am not getting the desired output.
    SELECT count(*) FROM (SELECT ROWNUM RNUM,tr_id,create_time CT_1002 FROM test c WHERE c.tr_id='S12344' and 
    ROWNUM <= (select (cast(a.create_time as date)-cast((select create_time from test b where a.tr_id=b.tr_id and code=1002) as date)) 
    from test a where a.code=1003 and a.tr_id=c.tr_id) + 1) d 
    WHERE to_char(cast((select create_time from test e where e.tr_id=d.tr_id and code=1002) as date) + RNUM - 1, 'DY') NOT IN('SUN');
    Need help to get the desired o/p

    Hello

    If I unederstand the problem correctly, that's what you want:

    WITH       got_extrema     AS
    (
         SELECT       tr_id
         ,       CAST (MIN (create_time) AS DATE)     AS start_date
         ,       CAST (MAX (create_time) AS DATE)     AS end_date
         FROM       test
         GROUP BY  tr_id
    )
    SELECT       tr_id
    ,       start_date, end_date          -- If wanted
    ,       24 * ( ( ( TRUNC (end_date,   'IW')          -- Count -1 day for every full week
                        - TRUNC (start_date, 'IW')
                 )
               / -7
                  )
                + LEAST ( end_date               -- If end_date is a Sunday
                            , TRUNC (end_date, 'IW') + 6     -- consider it 00:00:00 on Sunday
                     )
                - CASE
                          WHEN  start_date >= TRUNC (start_date, 'IW') + 6     -- If start_date is a Sunday
                   THEN  TRUNC (start_date, 'IW') + 6               -- consider it 00:00:00 Sunday
                   ELSE  start_date
                      END
                )     AS total_hours
    FROM      got_extrema
    ;
    

    I guess that you don't need to worry about fractions of a second. As you did in the code you have posted, I am to convert the TIMESTAMP to date values, because of DATE arithmetic and functions are so much better than what is available for timestamps.

    Basically, it's just to find the number of days between start_date and end_date and multiplying by 24, with these twists:
    (a) 1 day is deducted for each week between start_date and end_date
    (b) if End_date is a Sunday, none of the end_date himself hours are counted
    (c) If start_date is a Sunday, then all the start_date himself hours are counted. Why these hours should be counted? Because 1 day is already being deducted for the week which includes start_date, which contains only this Sunday.

    TRUNC (dt, 'IW') is the beginning of the ISO week containing dt; in other words, 00:00:00 the or before the dt last Monday. This is not the NLS parameters.

    Of course, I can't test without some sample data and the exact results you want from these data. You may need a little something more If start_date and end_date are both on the same Sunday.
    Whenever you have a problem, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) of all of the tables involved.
    Also post the results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.
    Always tell what version of Oracle you are using.
    See the FAQ forum {message identifier: = 9360002}

  • How to find the difference between two dates in the presentation layer

    Hi gurus,

    Hello to everyone. Today, I came with the new requirement.


    I need to know the difference between a date and the current date in the formula column application presentation layer.by.



    Thank you and best regards,
    Prates

    Hi Navin,

    TIMESTAMPDIFF function first determines the timestamp component that corresponds to the specified interval setting. For example, SQL_TSI_DAY corresponds to the day component and SQL_TSI_MONTH corresponds to the component "month".

    If you want to display the difference between two dates in days using SQL_TSI_DAY, unlike butterflies SQL_TSI_MONTH and so on...

    hope you understand...

    Award points and to close the debate, if your question is answered.

    See you soon,.
    Aravind

  • How to list all files within a data store and sent an email...

    Hello

    I know that within a data store there of are VM, but these virtual machines are right files?

    Some might create a virtual machine, remove the inventory but do not delete the folder/VM from the data store.

    Is thre anyway to get a script to list all records, not VM. s within a data store and be able to send emails?

    Thanks for your help,

    How about something like this:

    $VIServer = "YourVIServer".

    $EmailFrom = "Sender@Email".

    $EmailTo = "Recipient@Email".

    $Subject = "email subject".

    $SMTPServer = "YourSMTPServer".

    SE connect-VIServer $VIServer

    $datastores = get-Datastore

    {Foreach ($datastore to $datastores)

    $msg = "' nFolders in Datatore:"+ $datastore. " Name + "' not n".

    New-PSDrive-location $datastore - PSProvider data store name - VimDatastore-root '-' | Out-Null

    $folders = get-ChildItem Datastore:------|? {$_. ItemType - eq "File"}

    Remove-PSDrive Datastore. Out-Null

    {Foreach ($folder in $folders)

    $msg = "' t ' + $folder. Name + "' n '.

    }

    }

    Send-MailMessage-to $EmailTo - of $EmailFrom - $msg - SmtpServer $SMTPServer body-subject $Subject

    Disconnect-VIServer-confirm: $false

    This will send an email with an output similar to the following:

    Files in Datatore: local-esx100

    Test-VM

    ARandomFolder

    MoreFolders

    Files in Datatore: local-esx101

    Test-VM2

  • How to replace a "null" in the date field to zero

    Hi guys,.

    I'm a lil stuck with this problem.
    I have a requirement where I need to replace a null value in the date field to zero.
    For example,.

    Cancel_date Cancel_date
    20120301 20120301
    20120908 20120908
    value null-> > > > > 0


    Thank you
    Anita

    Hi, Anita,.

    0 is not a DATE, so you cannot view it in a DATE column.
    There is no '0' display problem in a VARCHAR2 column, so use TO_CHAR to display dates, even if the default format, it's exactly what you want.

    SELECT     NVL ( TO_CHAR (date_column, 'YYYYMMDD')
             , '0'             -- or '       0', if you want it right-justified
             )          AS date_string
    FROM     table_x
    ;
    

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

  • How to find the OS ppid in v$ session and V$ process

    Hello

    Oracle 11gDB

    I have this suspiscious process in my session of $ v which is always running and connected to a 'HR' scheme, even if the 'HR' application is also stopped and other HR related batch process.
    And he also told me that it came from the UNIX sun-server1. My problem is that I can not locate the PPID OS for this process when I login to the operating system to the Sun-server1.
    I tried to kill this session, but he maintains the connection. Even if I bounce the database, it come back.

    How to find the source of this process to the Sun-server1?

    I tried this script:
    SELECT     p.program, p.spid
    FROM v$session s, v$process p
    WHERE s.paddr = p.addr
    AND s.sid IN (39)
    Program                                                 Spid
    ============    ====
    ORACLE.EXE (SHAD)     6404
    But if I have a ps - ef | grep 6404 there is no existing process OS. No matter what other script that can identify the process id of the operating system?


    Thank you very much

    KinsaKaUy? wrote:
    Thanks Sb, what is your new name :)

    Who do you think is the culprit?

    root@sun-server1 # ps -ef|grep "May 16"
    v231sys  7065  7051   0   May 16 pts/1      11:16 /usr/jdk/jdk1.5.0_13/bin/sparcv9/java -server -Xms1024m -Xmx1024m -XX:MaxPermSi
    v231sys  7051     1   0   May 16 pts/1       0:00 /bin/sh startWebLogic.sh V231_ABDC
    root 13117 11928   0 12:56:30 pts/3       0:00 grep May 16
    v231sys  7229  7065   0   May 16 pts/1       1:17 /opt/SPLcobAS51/bin/cobjrun64 -Dcom.microfocus.cobol.cobjvm=sun_150_64 -DSPLCJV
    v231sys  6257  8518   0   May 16 pts/1       0:00 bash
    v231sys  7211  7065   0   May 16 pts/1       1:17 /opt/SPLcobAS51/bin/cobjrun64 -Dcom.microfocus.cobol.cobjvm=sun_150_64 -DSPLCJV
    

    When the process lasts more than 24 hours, you can get is no longer hours or minutes.
    You can use the utility "netstat" to connect the source & destination?

    If this isn't the case, random randomly start put to death via kill - 9 until you success!

  • Date field and amount of table format

    Hi all
    I'm working on jdev 11.1.2.1.0
    When the page loads I'm populating a table based on a query of the VO.
    In this table, I have a few fields (columns) of the date and the amount.
    I want to format these columns, how can I do?

    Appreciate your help.

    Thank you and best regards,
    Madhav K.

    For the Date field, you can try this:

    <>
    dateStyle = 'average' pattern = "dd-MMM-yyyy" / >

    And for many, it should work.

    I just tried, both work for me.

  • Script to fill in the date field and disable the form

    Hi all

    With little experience of Adobe I was tasked to create a set of PDF forms to use in my company. I drew using Pro forms, but I need a digital signature field that will fill a separate date field at the signing and also disable some of the fields in the form. For the moment I can get it to do one or the other, but I can't do both.

    Is there a script that I can use for these functions?

    Thank you

    KC

    As you have probably seen, there is an option on the signing tab to run a script when a digital signature is applied.

    Do what you have described what follows can be used (of course, you have to adapt the name of the field):

    this.getField("SignatureTime").value = util.printd ("mm/dd/yyyy", new Date()); Enter the date with the current date

    this.getField("Text1").readonly = true; The value of some fields read-only

    this.getField("Text2").readonly = true;

    this.getField("Text3").readonly = true;

    this.getField("Text4").readonly = true;

    etc.

  • How to get the value of prompt financial reports and use it as a header

    Hi gurus of the Oracle,.

    I have Hyperion Financial Reporting 11.1.1.3. I've created a report.

    I have the Products dimension on rows. And I also fast for the products.

    Let's say there are 3 products, product A, B and C, each has its own point of level 0 (for example, A1, A2, B1, C1)

    Currently in my situation, user will be prompted to select a list of products, and then the report will only show the level 0 of the product selected by the user. For example, the user select product has, then the report (or grid) displays A1 and A2 on the ranks. The user select product B, B1 will be displayed.

    My question is, I want to create a dynamic header report, so how can I get this prompt value and use it as a report header? For example: sale of product when the user choose the product, or sales of product B when the user choose produced B.


    Thanks a lot for your answer.

    Hello

    Here's the way to do this:
    1 insert a line (can be in line 1) in the report that produced as 'ask the user.
    2 always mark this as hidden line
    3. the user other lines like Level0 of product online 1
    4 use MEMBERALIAS in the header to use the product as dimension & row as row1

    It could be useful!

    Published by: user8628169 on June 22, 2011 10:53

  • Concatenate 2 data fields and the values on the same line

    Hello

    I'm pretty new to BI Publisher. I want to concatenate 2 data (product and ProductType) fields. These concatenated values so I want to put them on a single line.
    for example.
    the values should look like

    ProductType1.Product1, ProductType2.Product2, ProductType3.Product3...

    Thank you.

    Check the forum thread
    Re: Display of horizontal lines
    for a similar request.

    If you still face questions send your sample xml and rtf

  • How to find the majority of a data set

    Dear Oracle Guru

    I have a data set something like for example

    AMT of payment which includes data like this (45,53,46,45,52,45,63,45,44,45,41,45...)

    I find the majority payment amt .in my given example, it's 45... IE Maximum occurrences.

    I couldn't get it properly. I thought AVG and MEDIAN... but not really correct

    Is there any other method or function that is deceiving me


    Kindly help me out of this

    With the best regards
    RSS
    with t
    as
    (
    select 45 payment from dual union all
    select 53 payment from dual union all
    select 46 payment from dual union all
    select 45 payment from dual union all
    select 52 payment from dual union all
    select 45 payment from dual union all
    select 63 payment from dual union all
    select 45 payment from dual union all
    select 44 payment from dual union all
    select 45 payment from dual union all
    select 41 payment from dual union all
    select 45 payment from dual
    )
    SELECT DISTINCT payment
      FROM (
         SELECT payment, DENSE_RANK() over (order by cnt desc) rnk
           FROM (
              SELECT payment, count(*) over(partition by payment order by 1) cnt
                FROM t
                )
           )
     WHERE rnk = 1
    
  • How to find - including the table - the data insertion

    Hi all

    We have oracle 10g need to table name which records the last "data inserted the name of the table.

    Any help on this query,

    Thank you

    My understanding is correct

    1 sales man Insert customer details

    2. this information is stored in a DB with 200 + tables

    3. sales manager need a report for review and approve the details of the customer entered by sales man.

    4. you are asked to prepare this report

    5. you have no idea of what are the paintings to study to get information

    If this is true the correct way is the look in the design of your application document.

Maybe you are looking for