How to get specific data in a column.

I have a column in a table where I saved the addresses of files.

As following




Address_column
---------------------------
D:\oracle\inventory_sheets.csv
C:\oracle\sales\sheets.csv
C:\Desktop\training_material\ presentation.pps.



I want to get only the names of files that are moved to the end, but it is uncertain.

Can someone help me. How can I do this using the SQL query or any other way.

Thank you.
D'Aoust

Something like this:

SQL> WITH test_tab AS
  2       (SELECT 'D:\oracle\inventory_sheets.csv' file_loc
  3          FROM DUAL
  4        UNION ALL
  5        SELECT 'C:\oracle\sales\sheets.csv'
  6          FROM DUAL
  7        UNION ALL
  8        SELECT 'C:\Desktop\training_material\presentation.pps'
  9          FROM DUAL)
 10  SELECT SUBSTR (file_loc, INSTR (file_loc, '\', -1, 1) + 1) file_name
 11    FROM test_tab
 12  /

FILE_NAME
--------------------------------------------------------------------------------
inventory_sheets.csv
sheets.csv
presentation.pps

SQL> 

Kind regards
JO

Tags: Database

Similar Questions

  • Can someone show me how to get the data of this vi in four columns in a spreadsheet file.

    I'm trying to get the data into four columns on a worksheet. The data consists of two channels and two measures, a maximum voltage and a voltage after x seconds. I enclose the code. Any help would be great. Thank you.


  • How to get the Date, month, year of the DateTimePicker

    Hi, I am using the DateTimePicker.

    There are several question about this command:

    1. how to get the Date, month and year?

    -With the help of myDateTime.value, I get this string ' Wed May 08 14:45 ICT 2013 '-> I have to manually analyze this? Because I need in format yyyy/mm/dd. Or can set the format of dateTimePicker.value?

    2 format on dateTimePicker self (on the user interface) is d/m/YY, I can't change to another format?

    Thank you

    dateTimePicker.value return a QDateTime not a string.

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__datetimepicker.html#property-value

    See more:

    https://developer.BlackBerry.com/Cascades/reference/QDateTime.html#date

    https://developer.BlackBerry.com/Cascades/reference/QDate.html

    You can get

    day = dateTimePicker.value.date().day()
    month = dateTimePicker.value.date().month()
    year= dateTimePicker.value.date().year()
    dateYYYYMMDD = dateTimePicker.value.date().toString(Qt::ISODate)
    dateYYYYMMDD2 = dateTimePicker.value.date().toString("YYYY/MM/DD")
    dateYYYYMMDD3 = dateTimePicker.value.toString("YYYY/MM/DD")
    
  • How to get the value of a column in sql query?

    Hi, anyone knows how to get the value of a column in sql query?

    Here is my code, the value must be 1350079224397 in my PB, but I get 0

    QString query ("SELECT version FROM db_version");

    QVariant result = sda.execute (query);
    QVariantMap versionMap = result.toList () such () .toMap ();
    If (! versionMap.IsEmpty ())
    {
    qDebug()<"Version: "=""><>
    }

    OK, I have the solution

    QString query ("SELECT version as version FROM db_version");

  • How to get the date for the first Monday of each month

    Dear members,

    How to get the date for the first Monday of each month.

    I wrote the following code

    SELECT decode (to_char (trunc (sysdate + 30, 'MM'), 'DAY'), 'MONDAY', trunc (sysdate + 30, 'MM'), NEXT_DAY (trunc (sysdate + 30, 'MM'), "LUN")) FROM DUAL

    But he looks at complex bith.

    Abhishek

    Published by: 9999999 on 8 March 2013 04:30

    Use the IW format - it will make independent NLS solution. And all you need is truncated 7th day of each month using IW:

    select  sysdate current_date,
            trunc(trunc(sysdate,'mm') + 6,'iw') first_monday_the_month
      from  dual
    /
    
    CURRENT_D FIRST_MON
    --------- ---------
    08-MAR-13 04-MAR-13
    
    SQL> 
    

    Here is the list of the first Monday of the month of this year:

    with t as(
              select  add_months(date '2013-1-1',level-1) dt
                from  dual
                connect by level <= 12
             )
    select  dt first_of_the_month,
            trunc(dt + 6,'iw') first_monday_the_month
      from  t
    /
    
    FIRST_OF_ FIRST_MON
    --------- ---------
    01-JAN-13 07-JAN-13
    01-FEB-13 04-FEB-13
    01-MAR-13 04-MAR-13
    01-APR-13 01-APR-13
    01-MAY-13 06-MAY-13
    01-JUN-13 03-JUN-13
    01-JUL-13 01-JUL-13
    01-AUG-13 05-AUG-13
    01-SEP-13 02-SEP-13
    01-OCT-13 07-OCT-13
    01-NOV-13 04-NOV-13
    
    FIRST_OF_ FIRST_MON
    --------- ---------
    01-DEC-13 02-DEC-13
    
    12 rows selected.
    
    SQL> 
    

    SY.

  • How to get the data in the table if the date is less - than two months from the current date?

    Hi all

    I have a requirement in to retrieve table data. If any of the basic date in the column data.

    I have a date field (expiration date) I need to display data which expires two months.

    Please give me a solution.

    Concerning

    Shankar

    Hi, Shankar,

    Sorry, we don't know what you want.

    If you want something which, when executed on March 13, 2014, finds all the lines where expires and is located between March 13, 2014 and may 13, 2014, inclusive,

    SELECT *- or whatever the columns that you want to

    FROM table_x

    WHERE expire > = TRUNC (SYSDATE)

    Maturity AND< add_months="" (trunc="" (sysdate)="" ,="" 2)="" +="">

    ;

    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: https://forums.oracle.com/message/9362002

  • How to get a date to the timestamp of a file XML format

    Hello

    I'm trying to get a date from an external XML file. My XML file looks like this:


    <>http://www.NI.com/LVData">
        8.6.1
        
            Date of birth
            31/03/1983
        
     

    I can get the system to retrieve the correct XML element that shows the nested and elements , but I have no way to retrieve correctly the date. It seems as if she interprets my date seconds since 1904. I try to keep the "readable" for the end user XML, so it is important to keep this date in standard U.S. date format. I eventually uses this date to calculate the age of something. I labour code to subtract a timestamp in the format of the date to the current date and time, but I can't access it when I get back from XML.

    Starting from XML schema, it looks like the timestamp element requires a cluster... but there is no documentation on what to spend. Any ideas how to get back an XML date in this format in a simple and clean?

    Here's my current VI:

    Thank you

    Ryan

    Cambridge, MY

    Quick Tip on "bundle by name.  You don't need to consolidate all these constants where the values correspond to what is the constant of cluster at the top.  The cluster constant defines the data structure and the starting values.  Simply group the values for specific change items.

    Example of tone would be a bit cleaner.  Although the format string should use a capital T.

    As always with dealing with the time, complications could arise due to dealing with time zones and leap years.  Zones shouldn't matter for the calculation of the years since you are rounded up to years.  Although you probably want to round down rather than round at most closely. (I forgot this part in my example).  The problem with leap years when you would be only in a certain number of days of the anniversary, he would round up the age.  The number of rounded days would depend on how much on leap days that nobody has seen in their lifetime.

  • How to get the data to uppercase

    Hi all

    I have a table with 100 columns, all character only (varchar2) type. In the data that have already inserted with tiny...

    Can here, my question is how I get all the data to uppercase only...

    I'm trying as select upper (t.*) in tablename t; He is in error... no idea please help me...

    Thanks and greetings

    Stéphane

    or you can create queries like this without having to type all of the columns;

    Select 'select'. listagg ('upper('|| c.COLUMN_NAME||')) (',',') within the Group (order 1) |' from TABLENAME'

    of dba_tab_cols c

    where c.TABLE_NAME = 'TABLENAME '.

    ----

    Ramin Hashimzade

  • How to get rid of this redundant column in report

    I'm with a simple query using report 6i but having problems to get the format I want. If someone can give me a heads up, I would be very grateful.

    I used the report with the following query wizard
    Select fis_year, pay_no, check_amt and pay_date of table A

    set up 2 groups
    Group: G_fis_year
    Group: G_pay_no
    Sum (check_amt) at G_fis_year
    Sum (check_amt) at G_pay_no

    These are the test data
    data:
    fis_year,pay_no,  check_amt,pay_date
    2009,     001,     345,     01/02/2009
    2009,     001,     786,     01/02/2009
    2008,     002,     678,     03/08/2008
    2008,     003,     789,     06/04/2008
    }

    power required:
    fis_year   pay_no    total_check_amt  check_date   
    2009          001     1131             01/02/2009 
    
    
    2008          002     678           03/08/2008
              003     789          06/04/2008 
    But I'm getting
    fis_year   pay_no    total_check_amt  check_date   
    2009          001     1131             01/02/2009 
                             01/02/2009   ===> how to get rid of this redundant date when they are the same
    
    2008          002     678           03/08/2008
              003     789          06/04/2008 
    wanwan

    Hello
    Report style: left group

    You can use this query:

    Select fis_year, pay_no, pay_date, sum (check_amt)
    the name of the table
    Group of pay_date, fis_year, pay_no
    order of pay_no

    Page layout:
    create report wizard-> write the query select fis_year--> then click then--> select remaining all the fields and click Next
    after u, compile and run the report, you will get you are out.

    * in the data model first group g_fis_year--> fis_year column properties--> order of break must be DESCENDING.

    Answer me after that u got the output

  • How to get api data to Analytics?

    Hi, I want to use the response to generate data for my js to customize and create a new report that does not build in obiee.

    Is there an api response data to call? How to get it?

    You have the Web service interface that allows you to run LSQL and retrieve data: http://docs.oracle.com/cd/E28280_01/bi.1111/e16364/methods.htm#BIEIT180

    Or if you just want to do a record in JS, you can always do in an analysis: using view narrative, you can pass the data from your analysis to a JS object and use any JS code, you want to do the rendering (OBIEE analysis is nothing other than the Web page in the end...)

  • How to extract specific data from the user to view?

    Hello

    I have a requirement I need to display only the Session_user-specific data in the table. Scenario is that if the user belongs to a specific region should be able to see data for that specific region only.

    I think passing the session_user view query name but don't know if it of possible or not. If possible how to do this.

    What is the best way to achieve this?

    Thank you

    Angelica

    Hello

    If you use the ADF for authentication security, the user name is then accessible from the context of the ADF in British Colombia ADF. You can then

    1. create a view of the criteria in British Colombia ADF to a specific view

    2. set the display criteria to use a variable binding

    3. use groovy to add the value of the bind variable

    -set the type of value of 'Expression '.

    -Add adf.context.securityContext.userName

    4. go in the Module--> Application data model

    5 Select the instance of the View object

    6. press on "change."

    7. Select the view test

    If you download the example in this article: Oracle ADF: security for everyone so you see that users have a profile page containing data for the authenticated user. Sound by using the method described above

    If you do not use ADF security you can always use this approach. Instead of providing the value of the variable bind using Groovy you can run the view object using executeWithParams operation in this case, you can read the value of the authenticated user to the side view ADF. The binding variable would not be set to the Expression in this case though.

    Frank

  • How to get the dates of discontinuity

    If there is discontinuity in dates how we write the query...
    I need to get the dates and the dates of discontinuity.
    I / p:

    item_no first_date second_date
    1 January 1, 10 Aug 1, 10

    1-01 - 7.-10 1er January 11

    1 February 1, 11 1 July 11
    "
    "
    "
    o/p:

    1 1 January 10 01 - aug - 10

    1 02-aug-10 (first_date + 1) 31-aug-10(second_date-1) - dates of discontinuity

    1-01 - sep - 10 (second_date) 1st January 11

    1 January 2, 11 January 31, 11

    1 February 1, 11 1 July 11

    '
    '
    '
    Please let me know is possible
    SQL> select  *
      2    from  tbl
      3  /
    
            ID FIRST_DAT SECOND_DA
    ---------- --------- ---------
             1 01-JAN-10 01-AUG-10
             1 01-SEP-10 01-JAN-11
             1 01-FEB-11 01-JUL-11
    
    SQL> with t1 as (
      2              select  tbl.*,
      3                      lag(second_date) over(partition by id order by first_date) prev_second_date
      4                from  tbl
      5             ),
      6       t2 as (
      7               select  *
      8                 from  tbl
      9              union all
     10               select  id,
     11                       prev_second_date + 1,
     12                       first_date - 1
     13                 from  t1
     14                 where prev_second_date + 1 < first_date
     15             )
     16  select  *
     17    from  t2
     18    order by id,
     19             first_date
     20  /
    
            ID FIRST_DAT SECOND_DA
    ---------- --------- ---------
             1 01-JAN-10 01-AUG-10
             1 02-AUG-10 31-AUG-10
             1 01-SEP-10 01-JAN-11
             1 02-JAN-11 31-JAN-11
             1 01-FEB-11 01-JUL-11
    
    SQL>  
    

    SY.

  • How to get the data center moref moref VM in c# using

    Hi all

    Could someone tell how to get managedobjectreference of data center using the VM moref? or any other easy way is? If anyone has examples of code in c# please share with me?

    Thank you

    Vijaya

    You can get the data center in which the virtual machine resides by the following search:

    VM Moref-> Parent (vmFolder)

    Moref folder VM-> Parent (data center)

    Parent of the virtual computer object will always be the vmFolder and the vmFolder object will always be a data center.

    For more details on the model of article inventory of vSphere, take a look at this blog post - http://www.doublecloud.org/2010/03/vsphere-inventory-structure-deep-dive/

  • How to get the date - 7 days (week)

    Hi all

    I am beginner in Java and JSP

    I'm JSP search form (VO) where I need to set a default value for the start_date - 7 days

    OK I get this display today date but how to get that displays a date-7 days?


    < %
    DateFormat df = new SimpleDateFormat ("JJ. MM.yyyy");
    Date date = new Date();
    String default = 'StartDate =' + df.format (new Date());
    % >

    ID
    Thank you

    Simple approach if you're not worried about leap years: -.

    Date todayMinus7 = new Date(System.currentTimeMillis() - 7 * 24 * 60 * 60 * 1000);
    

    Alternatively take a look at the GregorianCalendar class and the add() method.

  • Query to get the data of the column and the metadata in the same set of results.

    Is it possible to build a query to get the values of the columns in a table and also be able to get some metadata (data type, data_length, data_precision, data_scale) for columns in the same set of results.

    If I use a join, have a common value to join on the two tables?

    you use a cross join, not requiring common values.

    create table T (n number, d date, v varchar2(30));
    insert into T values (1,sysdate,'ABC');
    commit;
    
    select C.column_name, c.data_type, c.data_length,
    case c.column_id
     when 1 then to_char(T.N)
     when 2 then to_char(T.D)
     when 3 then T.V
    end VALUE
    from USER_TAB_COLUMNS C, T
    where C.table_name='T'
    order by c.column_id;
    

Maybe you are looking for

  • HP 8300 Elite SFF hard disk transplant

    I currently have a HP Elite SFF-8200 and two hard drives set up with all the software work properly. I would rather have to do it all over again if I can! I have come to take delivery of a new 8300 Elite SFF and I would both the 8200 HARD drives, tra

  • Display disk utility are in a conflict of space available

    I have notice that only 15% of my 1 TB drive is available. Disk utility displays 474 GB available, but the bar of 163. When I read the information on Mac HD, it is said 469,89 GB available. What is going on? What can I do to resolve the conflict? dis

  • Activation for Windows 7 problem

    Bought a new computer and the store loaded on 64-bit OEM Windows 7 Home Premium. They do not activate it but gave me the box with the DVD inside and outside (in very small print) are the product key. When I enter the product key in an attempt to acti

  • BlackBerry Smartphones how can I download ringtones backup?

    The ones I bought initially disappeared. I have just completed the purchase of three new and would like to know how to save their place on my laptop so that if they disappear once never again I can send them to the BlackBerry without having to purcha

  • apex_item does not

    new to apexusing 4.0using the emp tablecreating a report (classic, interactive) is not seriousI use the following query:SELECT apex_item.checkbox(1,empno,'UNCHECKED') "",EmpNo,EnameWCPBut the report states:apex_item. CheckBox(1,empno,'UNCHECKED')7839