get all the date of end of months between two dates

Hi all, I'll try to find together the date of end of months between two dates.
I have the following data in a table

WITH AS's Data1
(
SELECT To_Date('4/30/2009','mm/dd/yyyy') dt, 'TEST' lname FROM dual UNION ALL
SELECT To_Date('5/01/2009','mm/dd/yyyy') dt, "TEST2" lname FROM dual UNION all
SELECT To_Date('5/02/2009','mm/dd/yyyy') dt, "TEST3" lname FROM dual UNION all
SELECT To_Date('5/03/2009','mm/dd/yyyy') dt, "TEST4" lname FROM dual UNION all
SELECT To_Date('5/04/2009','mm/dd/yyyy') dt, "TEST5" lname FROM dual UNION all
SELECT To_Date('5/05/2009','mm/dd/yyyy') dt, "TEST6" lname FROM dual UNION ALL
SELECT To_Date('5/31/2009','mm/dd/yyyy') dt, 'TEST7' lname FROM dual UNION all
SELECT To_Date('6/01/2009','mm/dd/yyyy') dt, 'TEST' lname FROM dual

)

I would like to write an application that gives you all the end date for months between two dates
for example, if you give the date 9/1/4 and 5/6/9, the output should be
DT          LNAME
-------------------
4/30/2009   TEST
IF I give you the dates 01/04/09 AND 01/06/09, THEN output should be
DT          LNAME
-------------------
4/30/2009   TEST
5/31/2009   TEST7
as you can see, I want all the end dates of months between two dates by giving the output.

If I give you 06/05/09 and 05/06/09, and then does so no output because there is no end of month between these two dates.
Similarly, if I give you 30/04/09 and 30/04/09 then output should be 30/04/09 because it is an end of month date

anyone can help to write a query. Thank you very much

Jin
Not sure if you need subquery, analytical functions for this.
According to me, which should solve your purpose.

WITH data1 AS
(
SELECT To_Date('4/30/2009','mm/dd/yyyy') dt, 'TEST' lname FROM dual UNION ALL
SELECT To_Date('5/01/2009','mm/dd/yyyy') dt, 'TEST2' lname FROM dual UNION all
SELECT To_Date('5/02/2009','mm/dd/yyyy') dt, 'TEST3' lname FROM dual UNION all
SELECT To_Date('5/03/2009','mm/dd/yyyy') dt, 'TEST4' lname FROM dual UNION all
SELECT To_Date('5/04/2009','mm/dd/yyyy') dt, 'TEST5' lname FROM dual UNION all
SELECT To_Date('5/05/2009','mm/dd/yyyy') dt, 'TEST6' lname FROM dual UNION ALL
SELECT To_Date('5/31/2009','mm/dd/yyyy') dt, 'TEST7' lname FROM dual UNION all
SELECT To_Date('6/01/2009','mm/dd/yyyy') dt, 'TEST' lname FROM dual 

)
select distinct last_day(dt) dt,lname
  from data1
 where dt between &start_date and &end_date
   and last_day(dt) <= &end_date
also, i have another request. how would i do this without using the data i provided. lets say,
 i tell you, give me alll the months end between two dates using dual in the from clause of a query.
how would you do this in a query or pl/sql? thanks again

Can be like that

with data1 as(
select &start_date+level-1 dt from dual
connect by level <= &end_date-&start_date+1)
select distinct last_day(dt)
  from data1
 where dt between &start_date and &end_date
   and last_day(dt) <= &end_date
 order by last_day(dt)

See you soon!
Bobin

Published by: Buga added query for updated the need

Tags: Database

Similar Questions

  • get all the dates in a beach in oracle resultset

    Hello
    I need to know how to do all the dates in a date range in Oracle11g query resultset.

    It should be something similar to the following pseudocode

    Select "All DATES" of? where date between TO_DATE('date-val','format') and TO_DATE ('date-val', ' format').

    It may require a different logic, but if I give a range like 5 February 2011, March 2, 2011
    It must return me all dates in this range in the result set.
    IE resultset = February 5, 2011, February 6, 2011,... February 28, 2011, March 1, 2011, 2 March 2011

    Hello

    You are looking for something like this?

    SQL> with a as (select to_date('05-FEB-2012','dd-MON-yyyy') start_date,
      2                   to_date('02-MAR-2012','dd-MON-yyyy') end_date from dual)
      3  select a.start_date + level - 1 dt
      4  from a
      5  connect by level <=  to_date('02-MAR-2012','dd-MON-yyyy') -
      6    to_date('05-FEB-2012','dd-MON-yyyy') + 1
      7  order by level;
    
    DT
    -----------
    05-FEB-2012
    06-FEB-2012
    07-FEB-2012
    08-FEB-2012
    09-FEB-2012
    10-FEB-2012
    11-FEB-2012
    12-FEB-2012
    13-FEB-2012
    14-FEB-2012
    15-FEB-2012
    
    DT
    -----------
    16-FEB-2012
    17-FEB-2012
    18-FEB-2012
    19-FEB-2012
    20-FEB-2012
    21-FEB-2012
    22-FEB-2012
    23-FEB-2012
    24-FEB-2012
    25-FEB-2012
    26-FEB-2012
    
    DT
    -----------
    27-FEB-2012
    28-FEB-2012
    29-FEB-2012
    01-MAR-2012
    02-MAR-2012
    
    27 rows selected.
    
    SQL>
    
  • socket InputStream does not get all the data, please help

    I've been doing stuff of network on blackberry for quite awhile, but still using the http connection.

    I have to use the socket for a piece of my application connection, but could not do the work.

    This code is what I do

    String url =

    "socket: / / ' + rmserver + ': ' + rmport;

    Socket SocketConnection = Connector.open (url) (SocketConnection);

    socket.setSocketOption (SocketConnection.KEEPALIVE, 1);

    OutputStream = socket.openOutputStream ();

    InputStream = socket.openInputStream ();

    send something here using outputstream

    int

    If (f > 0) {}

    do somwthing

    }

    AV is always 0.

    I don't know that my server sends data successfully. I run the network packet capture tool etheal on the MDS Server, I can see given reached MDS Server, but they never come to my device app.

    The outputstream works very well, I can send data from my application and my server code gets all of them.

    Where should I check? If it is http, I can turn on the debugging http on MDS log and see all network traffic, but for the socket connection, data packet is not connected (or I missed where it is).

    Is someone can you please tell me where I should go to understand why?

    Please try the suggestion to remove the check mark on InputStream.available.

  • PowerCLI Script to get all the data in a row store...

    Hi all

    What I'm trying to accomplish is to get this type of output:

    Cluster, host, WWN1, WWN2, Datastore1, Datastore2,..., data store DatastoreX

    So 1 row for each host, with attached all warehouses of data in the same row

    Number of data warehouses can vary from 1 to 30.

    So far, I have created this script:

    $clusters = Get-Cluster | sort
    
    
    
    $StorageInfo = @()
    
    
    
    foreach ($cluster in $clusters){
        Write-Host $cluster
        
        $VMHosts = Get-Cluster $Cluster | Get-VMhost | sort
        foreach ($VMHost in $VMHosts){
            $Vendor = "" 
            $VMhostname = $VMHost.Name
            $WWN1 = "{0:x}" -f ($vmhost.ExtensionData.config.storagedevice.HostBusAdapter | Where { $_.Key -match "FibreChannelHba" })[0].PortWorldWideName
            $WWN2 = "{0:x}" -f ($vmhost.ExtensionData.config.storagedevice.HostBusAdapter | Where { $_.Key -match "FibreChannelHba" })[1].PortWorldWideName
            
            if ( ($vmhost.ExtensionData.config.StorageDevice.ScsiLun | Where { $_.Key -match "Disk"}).count -gt 1 ){
                $Vendor = ($vmhost.ExtensionData.config.StorageDevice.ScsiLun | Where { $_.Key -match "Disk" -and $_.Model -notmatch "Block Device"})[0].Vendor
                } else { 
                $Vendor = ($vmhost.ExtensionData.config.StorageDevice.ScsiLun | Where { $_.Key -match "Disk" -and $_.Model -notmatch "Block Device"}).Vendor
                }
            
            $Datastores = $VMHost | Get-Datastore | sort
            foreach ($Datastore in $Datastores){
                        
                $myObj = @()
                $myObj = "" | Select Farm,HostName,WWN1,WWN2,Vendor,Datastore
                $myObj.Farm = $Cluster.Name
                $myObj.HostName = $VMhostname
                $myObj.WWN1 = $WWN1
                $myObj.WWN2 = $WWN2
                $myObj.Vendor = $Vendor
                $myObj.Datastore = $Datastore.name
                               
                $StorageInfo += $myObj
                }
            }
        }
        
    $StorageInfo | convertto-csv -NoTypeInformation | Out-File ./Storage-info.csv    
    
    
    

    But this gives me a line by the data store, as well as several lines for each host.

    Could someone point me to a method how to proceed?

    Thank you and best regards,

    Harold

    You can use the Join function

    Something like that

    $clusters = Get-Cluster | sort
    $StorageInfo = @()
    
    foreach ($cluster in $clusters){
        Write-Host $cluster
        $VMHosts = Get-Cluster $Clusters | Get-VMhost | sort    foreach ($VMHost in $VMHosts){
            $Vendor = ""
            $VMhostname = $VMHost.Name
            $WWN1 = "{0:x}" -f ($vmhost.ExtensionData.config.storagedevice.HostBusAdapter | where { $_.Key -match "FibreChannelHba" })[0].PortWorldWideName
            $WWN2 = "{0:x}" -f ($vmhost.ExtensionData.config.storagedevice.HostBusAdapter | where { $_.Key -match "FibreChannelHba" })[1].PortWorldWideName
    
            if ( ($vmhost.ExtensionData.config.StorageDevice.ScsiLun | where { $_.Key -match "Disk"}).count -gt 1 ){
                $Vendor = ($vmhost.ExtensionData.config.StorageDevice.ScsiLun | where { $_.Key -match "Disk" -and $_.Model -notmatch "Block Device"})[0].Vendor
            } else {
                $Vendor = ($vmhost.ExtensionData.config.StorageDevice.ScsiLun | where { $_.Key -match "Disk" -and $_.Model -notmatch "Block Device"}).Vendor
            }
    
            $Datastores = [string]::Join(',',($VMHost | Get-Datastore | sort | %{$_.Name}))
    
            $myObj = "" | Select Farm,HostName,WWN1,WWN2,Vendor,Datastore
            $myObj.Farm = $Cluster.Name
            $myObj.HostName = $VMhostname        $myObj.WWN1 = $WWN1        $myObj.WWN2 = $WWN2        $myObj.Vendor = $Vendor        $myObj.Datastore = $Datastores
            $StorageInfo += $myObj    }
    }
    
    $StorageInfo | convertto-csv -NoTypeInformation | Out-File ./Storage-info.csv 
    
  • Not to get all the data

    Hello

    I have the query below, but the output for the not available column data appears not all data with a condition_id which is not null.

    Does anyone have ideas that I might need to try?
    SELECT I.SKU_ID, 
     I.DESCRIPTION, 
     TO_CHAR(I.EXPIRY_DSTAMP, 'DD-Mon-YYYY') expiry_dt, 
     SUM(CASE WHEN I.CONDITION_ID IS NOT NULL THEN QTY_ON_HAND ELSE 0 END) AS Unavailable, 
     SUM(CASE WHEN I.CONDITION_ID IS NULL THEN QTY_ON_HAND ELSE 0 END) AS Available, 
     P_ILV.SUM_QTY_DUE + (NVL(P_ILV.SUM_TL,0) * NVL(S.USER_DEF_NUM_3,0)) AS Sum_Qty_Due, 
     ROUND(ITXN_ILV.AVG_QTY, 2) AS Avg_Qty, 
     ROUND(SUM(CASE WHEN I.CONDITION_ID IS NULL THEN QTY_ON_HAND ELSE 0 END)/CASE WHEN ITXN_ILV.AVG_QTY = 0 THEN 1 ELSE ITXN_ILV.AVG_QTY END,2) AS Days_Worth_Stock 
    
    FROM INVENTORY I 
    JOIN SKU S 
    ON (I.SKU_ID = S.SKU_ID AND I.DESCRIPTION = S.DESCRIPTION) 
    JOIN (SELECT P.SKU_ID, SUM (CASE WHEN P.TRACKING_LEVEL NOT LIKE 'C%' THEN P.QTY_DUE ELSE 0 END) AS SUM_QTY_DUE, 
      SUM(CASE WHEN P.TRACKING_LEVEL LIKE 'C%' THEN P.QTY_DUE ELSE 0 END) SUM_TL 
     FROM PRE_ADVICE_LINE P 
    WHERE P.QTY_RECEIVED IS NULL 
    GROUP BY P.SKU_ID) P_ILV 
    ON (S.SKU_ID = P_ILV.SKU_ID) 
    JOIN (SELECT ITXN.SKU_ID, SUM(ITXN.UPDATE_QTY)/(CEIL(TO_DATE($P{To_Date},'DD-Mon-YYYY') - TO_DATE($P{From_Date},'DD-Mon-YYYY')) + 1) AVG_QTY 
     FROM INVENTORY_TRANSACTION ITXN 
    WHERE ITXN.CODE = 'Shipment' 
     AND ITXN.DSTAMP BETWEEN TRUNC(TO_DATE($P{From_Date},'DD-Mon-YYYY')) AND TRUNC(TO_DATE($P{To_Date},'DD-Mon-YYYY')+ 1) - 1/86400 
    GROUP BY ITXN.SKU_ID) ITXN_ILV 
    ON (S.SKU_ID = ITXN_ILV.SKU_ID) 
    GROUP BY TO_CHAR(I.EXPIRY_DSTAMP, 'DD-Mon-YYYY'), I.SKU_ID, I.DESCRIPTION, P_ILV.SUM_QTY_DUE, NVL(P_ILV.SUM_TL,0), NVL(S.USER_DEF_NUM_3,0), ITXN_ILV.AVG_QTY, 2 
    ORDER BY I.SKU_ID
    Thank you, Sam.

    Published by: Sam Mardell on May 8, 2009 06:25

    OK Sam, here's the modified query, try this please:

    SELECT I.SKU_ID,
         S_ILV.DESCRIPTION,
         TO_CHAR(I.EXPIRY_DSTAMP, 'DD-Mon-YYYY') expiry_dt,
         SUM(CASE WHEN TRIM(I.CONDITION_ID) IS NOT NULL THEN QTY_ON_HAND ELSE 0 END) AS Unavailable,
         SUM(CASE WHEN TRIM(I.CONDITION_ID) IS NULL THEN QTY_ON_HAND ELSE 0 END) AS Available,
         P_ILV.SUM_QTY_DUE + (NVL(P_ILV.SUM_TL,0) * NVL(S_ILV.USER_DEF_NUM_3,0)) AS Sum_Qty_Due,
         ROUND(ITXN_ILV.AVG_QTY, 2) AS Avg_Qty,
         ROUND(SUM(CASE WHEN I.CONDITION_ID IS NULL THEN QTY_ON_HAND ELSE 0 END)/CASE WHEN  ITXN_ILV.AVG_QTY = 0 THEN 1 ELSE ITXN_ILV.AVG_QTY END,2) AS Days_Worth_Stock
      FROM INVENTORY I
      JOIN (SELECT S.SKU_ID, MAX(S.DESCRIPTION) DESCRIPTION, SUM(S.USER_DEF_NUM_3) USER_DEF_NUM_3
                FROM SKU S
               GROUP BY S.SKU_ID) S_ILV
         ON (I.SKU_ID = S_ILV.SKU_ID)
      LEFT JOIN (SELECT P.SKU_ID, SUM (CASE WHEN P.TRACKING_LEVEL NOT LIKE 'C%' THEN P.QTY_DUE ELSE 0 END) AS SUM_QTY_DUE,
          SUM(CASE WHEN P.TRACKING_LEVEL LIKE 'C%' THEN P.QTY_DUE ELSE 0 END) SUM_TL
        FROM PRE_ADVICE_LINE P
       WHERE P.QTY_RECEIVED IS NULL
       GROUP BY P.SKU_ID) P_ILV
       ON (I.SKU_ID = P_ILV.SKU_ID)
     LEFT JOIN (SELECT ITXN.SKU_ID, SUM(ITXN.UPDATE_QTY)/(CEIL(TO_DATE($P{To_Date},'DD-Mon-YYYY') -  TO_DATE($P{From_Date},'DD-Mon-YYYY')) + 1) AVG_QTY
          FROM INVENTORY_TRANSACTION ITXN
       WHERE ITXN.CODE = 'Shipment'
          AND ITXN.DSTAMP BETWEEN TRUNC(TO_DATE($P{From_Date},'DD-Mon-YYYY')) AND TRUNC(TO_DATE($P{To_Date},'DD-Mon-YYYY')+ 1) - 1/86400
         GROUP BY ITXN.SKU_ID) ITXN_ILV
       ON (I.SKU_ID = ITXN_ILV.SKU_ID)
     GROUP BY TO_CHAR(I.EXPIRY_DSTAMP, 'DD-Mon-YYYY'), I.SKU_ID, S_ILV.DESCRIPTION, P_ILV.SUM_QTY_DUE, NVL(P_ILV.SUM_TL,0), NVL(S_ILV.USER_DEF_NUM_3,0), ITXN_ILV.AVG_QTY, ROUND(ITXN_ILV.AVG_QTY, 2)
     ORDER BY I.SKU_ID
    

    Published by: Seanmacgc on May 12, 2009 10:37

  • I need to get all the data VLAN of Vcenters worth of clusters

    Hiya,

    I know that my goodwill is probabily come up a little short but well I'll ask!

    I have multiple vcenters, with hundreds of VLANs (literally)

    What I have to do is extract, by cluster:

    Name of the cluster

    Beaches of available within the cluster network

    VLAN ID

    As I say, if someone can provide a script to do this, it would be much appreciated.

    Concerning

    Stu

    Of course, capture the output in a variable and run this variable to the Export-Csv cmdlet.

    $report = foreach($cluster in Get-Cluster){
        foreach($esx in (Get-VMHost -Location $cluster)){
            foreach($pg in (Get-VirtualPortgroup -VMHost $esx)){
                Select -InputObject $pg @{N="Cluster";E={$cluster.Name}},
                @{N="VMHost";E={$esx.Name}},
                @{N="Portgroup";E={$pg.Name}},
                @{N="VLAN";E={$pg.VlanId}},
                @{N="IP";E={
                        $adapter = Get-VMHostNetworkAdapter -VMHost $esx | where {$_.PortgroupName -eq $pg.Name}
                        if($adapter){
                            [string]::Join(',',($adapter.IP | %{$_}))
                        }
                    }}
            }
        }
    }
    
    $report | Export-Csv "C:\Temp\report.csv" -NoTypeInformation -UseCulture
    
  • All the dates in a month gave a date

    Hi... maybe it's simple, but I'm not able to get my mind around.

    Given a date, how to get all the dates this month, from beginning to end this month, in order... just by using a SQL SELECT statement... not PL/SQL

    Thank you

    Published by: dcentgye on October 1st, 2008 16:13

    Here's the way->

    satyaki>
    satyaki>select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    
    Elapsed: 00:00:00.61
    satyaki>
    
    satyaki>
    satyaki>select trunc(to_date('&dt','DD-MON-YYYY'),'MONTH') + rownum - 1
      2  from dual
      3  connect by rownum <= trunc(add_months(to_date('&dt','DD-MON-YYYY'),1),'MONTH') -
      4                       trunc(to_date('&dt','DD-MON-YYYY'),'MONTH');
    Enter value for dt: 23-AUG-2008
    old   1: select trunc(to_date('&dt','DD-MON-YYYY'),'MONTH') + rownum - 1
    new   1: select trunc(to_date('23-AUG-2008','DD-MON-YYYY'),'MONTH') + rownum - 1
    Enter value for dt: 23-AUG-2008
    old   3: connect by rownum <= trunc(add_months(to_date('&dt','DD-MON-YYYY'),1),'MONTH') -
    new   3: connect by rownum <= trunc(add_months(to_date('23-AUG-2008','DD-MON-YYYY'),1),'MONTH') -
    Enter value for dt: 23-AUG-2008
    old   4:                      trunc(to_date('&dt','DD-MON-YYYY'),'MONTH')
    new   4:                      trunc(to_date('23-AUG-2008','DD-MON-YYYY'),'MONTH')
    
    TRUNC(TO_
    ---------
    01-AUG-08
    02-AUG-08
    03-AUG-08
    04-AUG-08
    05-AUG-08
    06-AUG-08
    07-AUG-08
    08-AUG-08
    09-AUG-08
    10-AUG-08
    11-AUG-08
    
    TRUNC(TO_
    ---------
    12-AUG-08
    13-AUG-08
    14-AUG-08
    15-AUG-08
    16-AUG-08
    17-AUG-08
    18-AUG-08
    19-AUG-08
    20-AUG-08
    21-AUG-08
    22-AUG-08
    
    TRUNC(TO_
    ---------
    23-AUG-08
    24-AUG-08
    25-AUG-08
    26-AUG-08
    27-AUG-08
    28-AUG-08
    29-AUG-08
    30-AUG-08
    31-AUG-08
    
    31 rows selected.
    
    Elapsed: 00:00:00.35
    

    Kind regards.

    LOULOU.

  • Hi, I am told by a website mFirefox is out of date so I can't get all the features. I continue to download an update, but it continues still to be. Could you please help me. Thank you.

    Hi, I am told by a website mFirefox is out of date so I can't get all the features. I continue to download an update, but it continues still to be. Could you please help me. Thank you.

    Download the latest version of Firefox to:

    Uninstalling Firefox

    Install Firefox on Windows

    Check and tell if its working.

  • I had a hard drive crash and had to move all the data again. Now, I get an error saying that my Visa is not an authorized version. How can I find the product key to reactivate?

    Vista Product Code question

    I had a hard drive crash and had to move all the data again.  Now, I get an error saying that my Visa is not an authorized version.  How can I find the product key to reactivate?  I don't have the sticker on the back and the software I have does not have the code?  I bought this laptop DELL at Best Buy a little more than a year.

    Thank you.

    Hello

    This problem may occur if you make a significant hardware change. See the link provided below.

    Error message when you start Windows Vista: "your activation period has expired".

    http://support.Microsoft.com/kb/925616

    If the OS came preinstalled Dell you may need to contact Dell technical support for assistance.
    http://support.Dell.com/support/topics/global.aspx/support/win7_support/win7_portal?c=us&CS=04&l=en&s=BSD

  • Using the CD to restore Vista A300 without all the data be deleted

    Hi there guys! After my drama wireless... I decided to go back to Vista a few months with XP... The thing is, I put my a300 vista recovery CD, and apparently the Toshiba Recovery CD erases all THE DATA on my hard drive...!

    Since I'm on XP, now I can't use the second option IE. system recovery so I have to use recovery "out-of-box", which seems to erase all my data.

    My hard drive has 3 partitions, C being the system partition. I want only to clear C and leave the other two safe for the sake of my data... but I chose the option that goes like "delete only the first partition" and the proceedings ended because of an error.

    Is there a another way to install Vista using the recovery CD without formatting of my partitions D and E?

    Thank you for your help in advance

    Before you reinstall Windows, you should back up your dates on external media, such as a DVD or external HARD disk.

    Then you can erase all data on the HARD drive and maybe you will get no error.

    For more assistance, you must send an error exactly.

  • You use the zoom of the band to select all the data points in the Strip

    I feel stupid this morning. I am a new user with 2011, but have not figured out how to copy a portion of the data. I can use the 2D axis system view to view my data. Can I use zoom band to get the part I need, but for the life of me I can't seem to copy the part. I put at the beginning and end and other flags, but the best I have is the starting point, one no point value and the end point. I don't get all the points between the flags. Am I supposed to mark somehow all the points in the zoom view? I did a search, but may not know what I am doing wrong.

    Robert

    WOW! If simple, yet I kept missing it. There is a difference between "Band Zoom" and "band of cursor. Thank you very much! Feeling little sheepish here now .

    Robert

  • How do I get all the SQL executed by my session?

    How do I get all the SQL executed by my session?

    Published by: user11300376 on 01/28/2013 11:27

    user11300376 wrote:
    I had tried, brings itself however only select table v $ session.

    Executed orders:

    SELECT * FROM MBS_ITEM;

    SELECT b.sql_id, b.sql_text
    SESSION $ v a, v$ sql b
    WHERE a.sql_id = b.sql_id;

    The output result:

    SQL_ID SQL_TEXT
    1 4qg3bft0w37rt SELECT b.sql_id, b.sql_text FROM session $ v a, v$ sql b WHERE a.sql_id = b.sql_

    The listed application is good, but does not limit the output of your session - it should return data from all sessions.

    You must add an AND condition in the WHERE clause to limit your session. You can try this (untested)

     where audsid=(select userenv('sessionid') from dual);
    

    You can also perform a SQL trace and tkprof to obtain data to SQL executed the trace start and end of the trace.

  • To get all the Table names

    Hi all

    I have almost 70 procedures in my database.
    I want to get all the names of the different tables used in the procedures of 70.
    Is this possible?

    Note:
    All the table names are prefixed by the name of schema as DEVSRC.table_name.


    Please advice

    Thank you
    JO

    Johney says:
    Hi, VT

    A doubt.

    This query will give the names of the tables to only select stmt used in the procedure

    or

    List of table names that accompany in all DML operations inside the procedure?

    Thank you
    JO

    It will give all the table to be used in select or any DML...

    You can also view by creating a temp proc

    SQL> drop procedure proc_test;
    
    Procedure dropped.
    
    SQL> select name, referenced_name, dependency_type from user_dependencies
      2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
    
    no rows selected
    
    SQL> create or replace
      2  PROCEDURE proc_test
      3  IS
      4  v_ID    number;
      5  v_PRID  number;
      6  v_PRLID number;
      7  v_DATERECEIVED date;
      8  Cursor C1 is
      9  select * from table_c;
     10   BEGIN
     11   open c1;
     12     LOOP
     13      FETCH c1 INTO v_ID,v_PRID,v_PRLID,v_DATERECEIVED;
     14      EXIT WHEN c1%NOTFOUND;
     15      insert into table_b values(v_ID,v_PRID,v_PRLID,v_DATERECEIVED);
     16      Commit;
     17     END LOOP;
     18   CLOSE C1;
     19   END;
     20  /
    
    Procedure created.
    
    SQL> select name, referenced_name, dependency_type from user_dependencies
      2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
    
    NAME
    ------------------------------
    REFERENCED_NAME                                                  DEPE
    ---------------------------------------------------------------- ----
    PROC_TEST
    TABLE_B                                                          HARD
    
    PROC_TEST
    TABLE_C                                                          HARD
    
    SQL> 
    

    Concerning

    Umesh

  • How can I get all the instruments that the GB ios?

    Hello everyone, as the title, I bought mainstage 3, due to the limited space, ssd, I can't download all the content in my macbook!

    Do you know what content packages that include all the data tools for ios, I need to download?  so I can make music in parallel (ios and mac).

    Thank you!

    If you download the GarageBand 2.1 application to your Mac as described in this tip to the user: How to get iOS GB loops in GarageBand for Mac.

    and then find the library of instruments inside as described here:

    https://discussions.Apple.com/message/29804266#29804266

    You can see a list of files .cst for sounds used by GarageBand software instruments:

    Library/Track\ settings/software support/Instrument\ of GarageBand\ 2.1/Payload/MobileGarageBand.app/Library.bundle/Application\

    I see these fixes in GarageBand 2.1:

    Keyboard / to THE Keyboard.cst

    Drummer/great room GB.cst

    GB.cst drummer/Bluebird

    Drummer/Crate Digger GB.cst

    Drummer/Deep Tech GB.cst

    Drummer/Pile Driver GB.cst

    Drummer/Retro Rock GB.cst

    Drummer/Roots GB.cst

    GB.cst drummer / SoCal

    Drummer/Trap Door GB.cst

    Battery/Big Room.cst

    Drums/Bluebird.cst

    Battery/Classic drum Machine.cst

    Battery/Classic Studio Kit.cst

    Battery/case Digger.cst

    Battery/Deep Tech.cst

    Battery/Hip Hop drum Machine.cst

    Home/drums drum Machine.cst

    Battery/Live Rock Kit.cst

    Battery Driver.cst

    Battery/Retro Rock.cst

    Drums/Roots.cst

    Drums/SoCal.cst

    Battery/trap Door.cst

    Battery/Vintage Kit.cst

    Metronomes/metronome Click.cst

    Metronomes/metronome HiHat.cst

    Metronomes/metronome Sidestick.cst

    Metronomes/metronome Visual Only.cst

    Metronomes/metronome Woodblock.cst

    Sampler/Sampler.cst

    Smart Bass/Exoplanet.cst

    Smart Bass/Light Cycle.cst

    Smart Bass/Liverpool.cst

    Smart Bass/Muted.cst

    Smart Bass.cst/P-Bass

    Smart Bass/Picked.cst

    Smart Bass.cst Bass/Retro

    Sequence/Bass smart Bass.cst

    Smart Bass/Upright.cst

    Battery smart/Classic drum Machine.cst

    Battery Classic/intelligent Studio Kit.cst

    Battery smart/Hip Hop drum Machine.cst

    Home/battery smart drum Machine.cst

    Battery smart/Live Rock Kit.cst

    Battery smart/Vintage Kit.cst

    Smart Guitar/Acoustic.cst

    Smart Clean.cst guitar/Classic

    Smart Rock.cst guitar/hard

    Smart Rock.cst guitar/Roots

    Keyboard Smart/Classic Rock Organ.cst

    Piano.CST Smart Keyboard/Electric

    Piano.CST Smart Keyboard/large

    Smart Keyboard/Helix.cst

    Language.CST Smart keyboard/Machine

    Smart Keyboard/Polarize.cst

    Clav.CST Smart Keyboard/smooth

    Sailer.CST Smart Keyboard/solaire

    Smart Strings/Cinematic.cst

    Smart Strings/Modern.cst

    Smart Strings/Pop.cst

    Smart Strings/Romantic.cst

  • wiping my iPhone 6 remotely but keeping all the data in iCloud?

    SO, if I wipe all the data from my iPhone 6 will be all that data while remaining on my iCloud?

    IM sending it off to get fixed / replaced to my insurance company, but do not want to to have access to one of my photos, messages, etc.

    Help, please

    Thank you

    IF you clear the device, (which you must do in your case), all your data remains safely in iCloud, assuming that you back up one more time before deleting.

Maybe you are looking for

  • Why my Windows defender updates itself automatically? I last updated and also I do not Windows update to automatically install updates.

    Why my Windows defender updates itself automatically? I last updated and also I do not Windows update to automatically install updates.

  • How to recover attachments programmatically?

    Halo I am a new Blackberry Application programmer. I create a program that reads automatically from the store, using FolderListener. When I got FolderEvent event, I got the Message that is instanceof Multipart. I create BodyPart of Multipart, to acce

  • Problem with the disk free space.

    I use the power of fire 7100 (the 5.3.0.3 Version of FireSight 5.4.1.7 sensor Version). I have political problems that apply to the device. And is unable to update sensor for the newest version. Cisco support community help me! Thank you! They and I

  • Photoshop crashing due to MMXCore

    OK, it becomes tedious - Lightroom update 6.2.1 Photoshop Camera Raw update to 9.2, Mac OS X 10.10.5 (Yosemite) running - 32 GB of Ram. Sending a photo to photoshop from LR 6 creates a spontaneous accident in Photoshop. Totally unstable program after

  • Cannot display the server company

    I've recently updated to the cloud creative and Yosemite on a Mac desktop. Since the update I can access is no longer the server of the company through the command file open in Adobe programs. If I go to file > open in a program, the server is not av