display data in readable format

Select * from user_tables;
TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                       STATUS     PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS
------------------------------ ------------------------------ ------------------------------ ------------------------------ -------- ---------- ---------- ---------- ---------- -------------- ----------- ----------- ----------- ------------ ----------
FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
--------------- --- - ---------- ---------- ------------ ---------- ---------- ----------- ------------------------- ------------------- ---------- ---------- ----- -------- ----------- --------- --- ------------ - - --- ------- -------- --- ---
DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS DRO
--------------- -------- --- ------------------------------ -------- -------- ---
JOB_GRADES                     USERS                                                                                        VALID            10                     1        255          65536                       1  2147483645
                YES N          6          5            0          0          0           9                         0                   0          1          1     N ENABLED            6 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                DISABLED YES                                DISABLED DISABLED NO

ERROR                          USERS                                                                                        VALID            10                     1        255          65536                       1  2147483645
                YES N          1          5            0          0          0          84                         0                   0          1          1     N ENABLED            1 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                DISABLED YES                                DISABLED DISABLED NO

TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                       STATUS     PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS
------------------------------ ------------------------------ ------------------------------ ------------------------------ -------- ---------- ---------- ---------- ---------- -------------- ----------- ----------- ----------- ------------ ----------
FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
--------------- --- - ---------- ---------- ------------ ---------- ---------- ----------- ------------------------- ------------------- ---------- ---------- ----- -------- ----------- --------- --- ------------ - - --- ------- -------- --- ---
DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS DRO
--------------- -------- --- ------------------------------ -------- -------- ---

TEST_A                         USERS                                                                                        VALID            10                     1        255          65536                       1  2147483645
                YES N          3          5            0          0          0          16                         0                   0          1          1     N ENABLED            3 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                DISABLED YES                                DISABLED DISABLED NO

COLLECTIONS_EG                 USERS                                                                                        VALID            10                     1        255          65536                       1  2147483645
                YES N                                                                                                                             1          1     N ENABLED                        NO               N N NO  DEFAULT DISABLED NO  NO

TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                       STATUS     PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS
------------------------------ ------------------------------ ------------------------------ ------------------------------ -------- ---------- ---------- ---------- ---------- -------------- ----------- ----------- ----------- ------------ ----------
FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
--------------- --- - ---------- ---------- ------------ ---------- ---------- ----------- ------------------------- ------------------- ---------- ---------- ----- -------- ----------- --------- --- ------------ - - --- ------- -------- --- ---
DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS DRO
--------------- -------- --- ------------------------------ -------- -------- ---
                DISABLED YES                                DISABLED DISABLED NO

COUNTRIES                                                                                                                   VALID             0          0          0          0
                    N          4                                             0          19                         0                              1          1     N ENABLED            4 03-SEP-12 NO  IOT          N N NO          DISABLED YES NO
                DISABLED YES                                DISABLED DISABLED NO

DEPARTMENTS                    EXAMPLE                                                                                      VALID            10                     1        255          65536                       1  2147483645

TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                       STATUS     PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS
------------------------------ ------------------------------ ------------------------------ ------------------------------ -------- ---------- ---------- ---------- ---------- -------------- ----------- ----------- ----------- ------------ ----------
FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
--------------- --- - ---------- ---------- ------------ ---------- ---------- ----------- ------------------------- ------------------- ---------- ---------- ----- -------- ----------- --------- --- ------------ - - --- ------- -------- --- ---
DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS DRO
--------------- -------- --- ------------------------------ -------- -------- ---
                NO  N          8          5            0          0          0          19                         0                   0          1          1     N ENABLED            8 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                DISABLED YES                                DISABLED DISABLED NO

EMPLOYEES                      EXAMPLE                                                                                      VALID            10                     1        255          65536                       1  2147483645
                NO  N         20          5            0          0          0          66                         0                   0          1          1     N ENABLED           20 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                DISABLED YES                                DISABLED DISABLED NO
I want to display the data in readable format
Oracle 10g.

SQL > EST lines 8000;
SQL >

and
increase the size of the buffer for cmd

Tags: Oracle

Similar Questions

  • How to get the current date to display in the Spanish format.

    The coding is in format Adobe Acrobat, DC. The coding I have for the English today's date is:

    var d = new Date();

    sDate = util.printd var ("dd mmmm yyyy", d);

    this.getField("Text1").value = sDate;

    How can I get the current date displayed in this Spanish format: 07 December 2015

    Thank you

    It's a little complicated... But this code should do the trick:

    util.printd("dd", d) + " de " + util.printd("date(es){MMMM}", d, true) + " de " + util.printd("yyyy", d);
    

    Edit: Fixed the code... Did not notice the 'of' second before.

  • I need to display tomorrow's date in the format ' yyyy/mm/dd' in Captivate 8.

    I need to display tomorrow's date in the format ' yyyy/mm/dd' in Captivate 8.

    I understand that I must build a tip for this Action. Has someone done something similar and can post a screenshot of the completed tip Action?

    Thanks in advance!

    I think that means Lieve this article:

    http://www.Infosemantics.com.au/Adobe-Captivate/template/02-dynamic-date-functions

  • display data in a tabular format

    Dear Sir

    I followed the example on

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...

    which really helped me to solve the problem of New York.

    now my data shows but its display twice.

    Here is my code to display data.

    for (int count = 0; count)< 4;="">
    {
    ranks [count] = new VerticalFieldManager(VerticalFieldManager.NO_HORIZONTAL_SCROLL |)
    VerticalFieldManager.NO_VERTICAL_SCROLL);
                
    Add 21 rows of data in the column
    displayData = this.split (data, ' |');
    for (rowCount int = 0; rowCount)< displaydata.length="" ;="">
    {
                
    SB. Delete (0, sb.length ());
    SB. Append ("data");
    SB. Append (Count);
    SB. Append (",");
    SB. Append (RowCount);
    SB. Append("");
    SB = String (displayData [RowCount]);
    displayData [rowCount] = sb.toString ();
                  
                    
    SB. Append (displayData [RowCount]); ((/ /, 0, rowCount); //displayData [rowCount]);
    SB. Append("|");
                  
    ranks [count] .add (LabelField (sb.toString (new), LabelField.FOCUSABLE));
    }
    Add the line to the rowHolder.
    rowHolder.add (rows [count]);
    }
            
    dataScroller.add (rowHolder);
    Add (dataScroller);

    Help, please

    Rgds

    Nadir

    I think that you find wil this code gives you better results:

    How - to create a presentation of the rich UI at TableLayoutManager
    Article number: DB-00783
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...

    There is also a blog about this handler:

    http://supportforums.BlackBerry.com/T5/BlackBerry-Developer-s-blog/how-to-use-table-view-layout/BA-p...

  • Is he closer to display the data in graphic format in the OPS?

    Hello Experts,

    I'm working on a feasibility OFA study and I have a question: is there in the OPS, any approach to represent data in graphic format, such as the schema of the Terminal?

    As far as I know, ADF supports this kind of representation and it can be incorporated into the OAF page as region. But it seems to separate server for the ADF, which is not supported in my project (assuming we have only EBS server). And the situation is similar for embedded Analytics OBIEE approach.

    Would like to share your experience or the reference of this kind of solution? Appreciate your help in advance!

    Thank you and best regards,

    Clark

    You can use graphics in the OPS.

    Visit this link: Java Based Technology Blog Sushant: 14. Graphic design in the OPS

    Sushant-

  • Firefox not displaying only not the formatting of the page and do not play videos

    HI, I had this problem with Firefox for the past two days. It does not display the context and formatting of Web sites like Reddit, Mozilla and sometimes YouTube. He said several times that Web sites like youtube have an untrusted connection, and shockwave flash crashes. I tried to uninstall, clean and reinstall Firefox, I tried to fix it too... I have updated java, Flash and shockwave. Did a full scan of my computer with my Antivirus and Malwarebytes.

    None of these problems are on Chrome or Edge.

    The application databases

    Name: Firefox
    Version: 42.0
    Build ID: 20151029151421
    Update channel: output
    User Agent: Mozilla/5.0 (Windows NT 10.0;) WOW64; RV:42.0) Gecko/20100101 Firefox/42.0
    Windows multiprocessing: 0/1 (default: false)
    Safe mode: false

    Reports of incidents for the last 3 days

    Report ID: bp-b252c610-e860-4800-bb0e-4ef672151122
    Sent: 3 hours ago

    Report ID: bp-cdc8cb59-3c52-45b0-be02-7fb2e2151121
    Sent: 2 days ago

    All Crash reports (including 12 pending hangs in the given time interval)

    Extensions

    Graphics

    Description of the adapter: Intel(r) HD Graphics 530
    Adapter (GPU #2) Description: NVIDIA GeForce GTX 960 M
    Drivers: igdumdim64 igd10iumd64 igd10iumd64 igd12umd64 igdumdim32 igd10iumd32 igd10iumd32 igd12umd32
    Drivers (GPU #2): nvd3dumx, nvwgf2umx, nvwgf2umx, nvwgf2umx, nvd3dum, nvwgf2um, nvwgf2um, nvwgf2um
    RAM card: unknown
    RAM (#2 GPU) card: 4095
    Asynchronous Pan/Zoom: no
    Device ID: 0x191b
    Device ID (GPU #2): 0x139b
    DirectWrite Enabled: false (10.0.10240.16430)
    Driver date: 24/08/2015
    Driver (GPU #2) date: 13/11/2015
    Driver version: 10.18.15.4279
    (GPU #2) driver version: 10.18.13.5900
    GPU #2 Active: false
    GPU accelerated Windows: 0/1 Basic (OMTC)
    SubSys ID: 10391025
    SubSys ID (GPU #2): 10391025
    Supports decoding H264 Hardware: false
    Vendor ID: 0 x 8086
    Vendor (GPU #2) ID: 0x10de
    WebGL Renderer: Google Inc. - ANGLE (Intel(r) HD Graphics 530 Direct3D11 vs_5_0 ps_5_0)
    windowLayerManagerRemote: true
    AzureCanvasBackend: skiing
    AzureContentBackend: Cairo
    AzureFallbackCanvasBackend: Cairo
    AzureSkiaAccelerated: 0

    Important change preferences

    Browser.cache.Disk.Capacity: 358400
    Browser.cache.Disk.filesystem_reported: 1
    Browser.cache.Disk.smart_size.first_run: false
    Browser.cache.Disk.smart_size.use_old_max: false
    Browser.cache.frecency_experiment: 2
    browser.download.importedFromSqlite: true
    browser.download.useDownloadDir: false
    browser.places.smartBookmarksVersion: 7
    browser.sessionstore.upgradeBackup.latestBuildID: 20151029151421
    Browser.Startup.homepage_override.buildid: 20151029151421
    Browser.Startup.homepage_override.mstone: 42.0
    DOM.apps.Reset - permissions: true
    dom.mozApps.used: true
    extensions.lastAppVersion: 42.0
    font.internaluseonly.Changed: false
    GFX. Direct2D.disabled: true
    GFX. Direct3D.last_used_feature_level_idx: 0
    GFX. Driver - init.appVersion: 42.0
    GFX. Driver - init.deviceID: 0x191b
    GFX. Driver - init.driverVersion: 10.18.15.4279
    GFX. Driver - init.feature - d2d: true
    GFX. Driver - init.feature - d3d11: true
    GFX. Driver - init.status: 2
    layers. Acceleration.Disabled: true
    Media.GMP - th - adobe.abi: x 86-msvc
    Media.GMP - th - adobe.enabled: false
    Media.GMP - th - adobe.lastUpdate: 1448119635
    Media.GMP - th - adobe.version: 15
    Media.GMP - gmpopenh264.abi: x 86-msvc
    Media.GMP - gmpopenh264.enabled: false
    Media.GMP - gmpopenh264.lastUpdate: 1448117718
    Media.GMP - gmpopenh264.version: 1.5.1
    Media.GMP - manager .buildID: 20151029151421
    Media.GMP - manager .lastCheck: 1448223560
    Media.Hardware - video-decoding successful: false
    network.cookie.prefsMigrated: true
    Network.Predictor.cleaned - up: true
    places.database.lastMaintenance: 1448151756
    places. History.expiration.transient_current_max_pages: 104858
    plugin.disable_full_page_plugin_for_types: application/pdf,application/vnd.fdf
    plugin.importedState: true
    plugin. State.Java: 2
    plugin. State.np_wtapp: 0
    plugin. State.np32dsw: 2
    plugin. State.npctrl: 2
    plugin. State.npdeployjava: 1
    plugin. State.npfoxitphantompdfplugin: 0
    plugin. State.npintelwebapiipt: 0
    plugin. State.npintelwebapiupdater: 0
    plugin. State.npitunes: 0
    plugin. State.NPSPWRAP: 0
    privacy.sanitize.migrateFx3Prefs: true
    Security.default_personal_cert: automatic selection of
    Security.disable_button.openCertManager: false
    Security.disable_button.openDeviceManager: false
    Security. OCSP.enabled: 0
    Storage.vacuum.Last.index: 0
    Storage.vacuum.Last.places.sqlite: 1448151756

    Important preferences locked

    JavaScript

    Incremental GC: true

    Accessibility

    Enabled: false
    Prevent accessibility: 0

    Versions of the library

    NSPR
    The expected minimum version: 4.10.10
    Version: 4.10.10

    NSS
    The expected minimum version: 3.19.4 based ECC
    Version: 3.19.4 based ECC

    NSSSMIME
    The expected minimum version: 3.19.4 based ECC
    Version: 3.19.4 based ECC

    NSSSSL
    The expected minimum version: 3.19.4 based ECC
    Version: 3.19.4 based ECC

    NSSUTIL
    The expected minimum version: 3.19.4
    Version: 3.19.4

    Experimental features

    You can check for problems with the current versions of the plugin Shockwave Flash and try this:

    See also:

  • Websites show dates in US format - if I use Internet Exporer dates show correctly in the English format.

    I am running FF 3.6.25 on Windows 2000. My date format and the Windows regional settings are set correctly in the United Kingdom.

    When I go on a site that has a date column, the date is formatted incorrectly in the American style (for example 30/12/2011). If I use Internet Explorer to reach the same sites the date is properly formatted in the British style (for example 30/12/2011). How can I set the display style in Firefox?

    Thanks for any advice you can offer.

    Keith

    You can check the order of the installed languages and ensure that en - us is on top...

    • Tools > Options > content > languages
  • I have a registration error trying to download a disc. It is said, your operating system Date and time format do not match the expected for PM Fastrack run format.

    Error in saving of the PM FASTrack.
    Impossible to analyze the dayYour operating system Date and time format do not match the expected for PM FASTrack run format. The format should be mm/dd/yyyy hh: mm:. The format is

    It's my complete error message. The time is set in this format on the computer. How should I do?

    Hello Murphy,

    Thanks for posting your question on the Forums of community of Microsoft.
    From the description of the question, I understand this format date and time do not match for PM FASTrack run.
    Let me go ahead and help you with the issue.
     
    You did changes to the computer before the show?
     
    I suggest for the link and follow the steps in the article, and check if this can help:
    Change the display of dates, times, currencies, and measures
     
    Also, check out the support links:
    PM FASTrack support.
     
    I hope this helps. If you have any other queries/issues related to Windows, write us and we will be happy to help you further.
  • Date.MinValue to format date and time in the MAF

    Hello

    For the amx:inputdate component, I want to display the date and time format. I need to be able to select the date and time.

    Can someone help me please in obtaining it. If items available, please share me.

    Thank you

    Rita

    If you just want to show the date or time, or both, then you change the attribute 'type' to date. MinValue

    To date. MinValue on iOS, a native component selector is used for this purpose. On Android, there is a date component. MinValue AMX used.

    You can check the link below for how it will look like

    https://wikis.Oracle.com/display/ADFMobileDesign/component+-+input+date

  • Query to display data with total

    Hi team,

    I have the whee requirement I need to display data with total and the total general.

    Examples of data include:

    with t as 
    (select 'chris' nm , 10 no ,'FT' Emplmt, 'PF' ProFund , 'Reg' Status ,to_Date ('05/02/2014','mm/dd/yyyy') dt , 2456 sal, 10 days , 50 intrst ,55 intrs1 ,60 intrs2 from dual
    union all
    select 'chris' nm , 10 no ,'FT' Emplmt, 'PF' ProFund , 'Reg' Status ,to_Date ('06/10/2014','mm/dd/yyyy') dt , 1000 sal, 30 days , 50 intrst ,55 intrs1 ,60 intrs2 from dual
    union all
    select 'chris' nm , 10 no ,'FT' Emplmt, 'PF' ProFund , 'NonReg' Status ,to_Date ('06/10/2014','mm/dd/yyyy') dt , 20 sal, -5 days , 1 intrst ,1 intrs1 ,1 intrs2 from dual
    union all
    select 'john' nm , 11 no ,'PT' Emplmt, 'PF' ProFund , 'Reg' Status ,to_Date ('05/02/2014','mm/dd/yyyy') dt , 1153 sal, 10 days , 50 intrst ,55 intrs1 ,60 intrs2 from dual
    union all
    select 'john' nm , 11 no ,'PT' Emplmt, 'PF' ProFund , 'Reg' Status ,to_Date ('05/16/2014','mm/dd/yyyy') dt , 1000 sal, 8 days , 40 intrst ,45 intrs1 ,50 intrs2 from dual
    )
    select * from t 
    

    Need the output like below format

    Chris FT 10 PF Reg 02/05/2014 2456 10 50 55 60

    Chris FT 10 Reg 10/06/2014 1000 PF 30 50 55 60

    Chris 10 FT PF NonReg 10/06/2014 20 - 5 1 1 1

    5456 35 101 111 121 subtotal

    John PT PF Reg 02/05/2014 1153 11 10 50 55 60

    John PT Reg 16/05/2014 1000 PF 11 8 40 45 50

    2153 18 90 100 110 subtotal

    7609 total 53 191 211 231

    Could you please give some thought to get the result as above.

    Thank you!

    something like this:

    with t as (select "chris" nm, 10 no, "Pi" Emplmt, "PF" ProFund "Reg" Status, to_Date (May 2, 2014 "," mm/dd/yyyy") dt, 2456 sal, 10 days, 50 intrst, intrs1 55 intrs2 60 double)

    Union of all the

    Select "chris" nm, 10 no, "Pi" Emplmt, "PF" ProFund "Reg" Status, to_Date (June 10, 2014 "," mm/dd/yyyy") dt, intrst 50, intrs1 55, 1000 sal, 30 days, 60 intrs2 of the double

    Union of all the

    Select "chris" nm, 10 no, "Pi" Emplmt, ProFund "PF", "NonReg" State, to_Date (June 10, 2014 "," mm/dd/yyyy") dt, 20 sal,-5 days, 1 intrst, 1 intrs1, 1 intrs2 of the double

    Union of all the

    Select "Jean" nm, 11 no, "PT" Emplmt, "PF" ProFund "Reg" Status, to_Date (May 2, 2014 "," mm/dd/yyyy") dt, 1153 sal, 10 days, 50 intrst, intrs1 55 intrs2 60 double

    Union of all the

    Select "Jean" nm, 11 no, "PT" Emplmt, "PF" ProFund "Reg" Status, to_Date (16 may 2014 "," mm/dd/yyyy") dt, 1000 sal, 8 days, intrst 40, 45 intrs1, 50 intrs2 of the double

    )

    SELECT decode (REUNION (nm), 1, 'Total', decode (grouping (State), 1, "partial": nm, nm)) nm

    , no, emplmt, profund, status, dt, sum (sal), sum (days), sum (intrst), sum (intrs1), sum (intrs2)

    T

    Rollup Group (nm, (no, emplmt, profund, status, dt));

    HTH

  • How to get the date in the format dd/mm/yyyy?

    Hello
    for this query:
    > select to_date (to_char (sysdate), ' dd/mm/yyyy') of double;
    I wanted to get a date in the format dd/mm/yyyy, but this query is not in the right format to date.
    How to get it?

    Why you are converting a date (it's a date in your table, right) tank and back to a date. When you want to display a date a certain way, you use to_char and specify the mask format to display the date as to_char (sysdate, 'dd-mm-yyyy'). Internally, dates are stored as bytes 7, you use to_char only for display purposes.

  • Display data in the form of values separated by commas - need help

    Hi all

    I have some data formatted in the way below. The ID of the drug are the primary keys of the table and the first 9 digits in the drug ID are the same. They can be separated based on the last two digits.

    Type of drug drug ID
    00603107554 respiratory
    00603107556 cough and cold
    Antitussive-00603107558


    I want that data to be formatted as
    Type of drug drug ID
    006031075 respiratory, cough and colds, Antitussive

    I want to cut the last two characters, and format data. And the types must be displayed in the form of values separated by commas. Can someone help me?

    Thanks in advance

    Rambeau
    WITH t AS (SELECT '00603107554' Drug_ID, 'Respiratory' Drug_Type FROM DUAL
               UNION
               SELECT '00603107556', 'Cough and Cold' FROM DUAL
               UNION
               SELECT '00603107558', 'Antitussive' FROM DUAL)
        SELECT Drug_id, SUBSTR (SYS_CONNECT_BY_PATH (Drug_Type, ','), 2) Drug_Types
          FROM (SELECT SUBSTR (drug_id, 1, LENGTH (drug_id) - 2) drug_id,
                       Drug_Type,
                       ROW_NUMBER ()
                       OVER (PARTITION BY SUBSTR (drug_id, 1, LENGTH (drug_id) - 2)
                             ORDER BY Drug_Type)
                          rn
                  FROM t)
         WHERE CONNECT_BY_ISLEAF = 1
    START WITH rn = 1
    CONNECT BY PRIOR rn = rn - 1 AND PRIOR drug_id = drug_id
    
    DRUG_ID     DRUG_TYPES
    006031075     Antitussive,Cough and Cold,Respiratory
    

    just a note, I wonder if blushadow could consider adding techniques agg string to its very useful faq section because it seems a good
    request.

    Published by: pollywog on April 14, 2011 06:42

    Published by: pollywog on April 14, 2011 06:43

  • Excerpt from SQL data with specific format.

    All,

    I have the oracle database version 10.2.0.4 in which I need to extract data from a table using the format below.

    1.1 st 3 positions of the postal code, followed by
    2.1 st letter of the name, followed by
    3.1 st 2 consonants in the name of the street, followed
    4 2 (for companies)

    I can use the function substr to 1 and 2 above.
    For 3, I tried regexp_substr. but the output includes vowels too. I don't know how to proceed. Is there another function or is there another way to do it?

    I am concatenating 3 columns and display data as below.
    for example
    Col1            Col2         Col3     
    FLOOR INC  24540       67 FRANKLIN TPKE STE 114 
    
    Displayed as 
    245FFR2     
    234AAS2 
    Help, please.
    -- testdata:
    with yourtable as
    (
      select 'abcdefg' name from dual union all
      select '1aBexea' name from dual
    )
    -- query for first two consonants:
    select substr(regexp_replace(regexp_replace(name,'[^a-zA-Z]',''),'[aeiouAEIOU]',''),1,2)
    from yourtable;
    

    Explanation:
    -Internal Regexp removes everything except the letters.
    -Outer Regexp removes vowals and keep the consonants.
    -substr selects the first two consonants.

  • Date as YYYYMM format

    Hello people,
    How can I get the date as '201006' format. I tried to_char (trunc(sysdate,'MM')-1, 'fmYYYYMM') but its not working. Can someone tell me how to do this. Thank you very much

    Hello

    Is the problem you get only 5 characters of output, not 6?
    If so, lose the "fm":

    SELECT     to_char ( trunc (sysdate, 'MM') - 1
              , 'YYYYMM'     -- No 'fm' here
    FROM     dual
    ;
    

    Output (6 characters):

    201006
    

    "fm" means "change or not padding is displayed", where the 0 to in figures 1 month (days and hours, minutes and seconds) count as padding. By default, padding is displayed, so the first "fm" it stops.

    I hope that answers your question.
    If not, post a clear description of the problem, with a stand-alone script that people can run to recreate the problem and the full error message (if any)

  • Date number of Format for date fields in dashboard pages.

    We have two guests of field date in our dashboard pages for which we need to show the default values.
    The SQL logic, we used for this is:

    Select case when 1 = 2 then "time Dim - effective". Day of another cobalt current_date

    When you click on the Preview button, the command prompt displays the current date in the format MM/DD/YYYY value.
    But when the same prompt is placed in the dashboard page, its projection upwards to the YYYY-MM-DD format.
    And when we choose the date in the calendar in the dashboard, the format is DD/MM/YYYY which is as expected.
    If we want the values by default also to be shown in the format MM/DD/YYYY.
    How can this problem be solved...

    Thank you
    Swetha

    Hi Swetha,
    Create a variable of the server default for this server vairable guests with this sql SELECT To_Char(SYSDATE,'MM-DD-YYYY') FROM dual (instead of sysdate, you can use your date column)

    Thank you
    saichand.v

Maybe you are looking for