Check which table has no column with specific name over number of tables

Hello,
Withing my schema I have 66 tables, all of them have column last_update_date. Though not all have the column program_update_date. The problem is I want to go through all the tables and know which tables does not have the program_update_date column. It is to be noted that if the table does not have the program_update_date column query 2 will be used instead of query 1.
query1:
select last_extract_date,
to_char(min(greatest(nvl(*last_update_date*,'01-Jan-10'),nvl(*program_update_date*,'01-Jan-10'))),'DD-MON-YY HH24:MI:SS') mi,
to_char(max(greatest(nvl(*last_update_date*,'01-Jan-10'),nvl(*program_update_date*,'01-Jan-10'))),'DD-MON-YY HH24:MI:SS') ma
from table_names
group by last_extract_date
order by last_extract_date desc;
query2:
select last_extract_date,
     to_char(min(nvl(last_update_date,'01-Jan-10')),'DD-MON-YY HH24:MI:SS') mi,
     to_char(max(nvl(last_update_date,'01-Jan-10')),'DD-MON-YY HH24:MI:SS') ma
     from mispa_events
     group by last_extract_date
     order by last_extract_date desc ;
Please find the PLSQL code that should be used:
Declare
cursor C_1 is
select unique table_name from user_tables; table_names varchar2(240); Begin Open C_1; Loop Fetch C_1 into table_names; EXIT WHEN C_1%NOTFOUND;
EXECUTE IMMEDIATE('select last_extract_date,
to_char(min(greatest(nvl(last_update_date,''01-Jan-10''),nvl(program_update_date,''01-Jan-10''))),''DD-MON-YY HH24:MI:SS'') mi,
to_char(max(greatest(nvl(last_update_date,''01-Jan-10''),nvl(program_update_date,''01-Jan-10''))),''DD-MON-YY HH24:MI:SS'') ma
from ' || table_names ||'
group by last_extract_date
order by last_extract_date desc');
End Loop;
Close C_1;
COMMIT;
End;
Please help.
Thanks in advance.
Edited by: P.Sam on Jun 14, 2010 5:00 PM

why not use user_tab_columns
SQL> desc user_tab_columns
Name                                                              Null?    Type
TABLE_NAME                                                        NOT NULL VARCHAR2(30)
COLUMN_NAME                                                       NOT NULL VARCHAR2(30)
DATA_TYPE                                                                  VARCHAR2(106)
DATA_TYPE_MOD                                                              VARCHAR2(3)
DATA_TYPE_OWNER                                                            VARCHAR2(30)
DATA_LENGTH                                                       NOT NULL NUMBER
DATA_PRECISION                                                             NUMBER
DATA_SCALE                                                                 NUMBER
NULLABLE                                                                   VARCHAR2(1)
COLUMN_ID                                                                  NUMBER
DEFAULT_LENGTH                                                             NUMBER
DATA_DEFAULT                                                               LONG
NUM_DISTINCT                                                               NUMBER
LOW_VALUE                                                                  RAW(32)
HIGH_VALUE                                                                 RAW(32)
DENSITY                                                                    NUMBER
NUM_NULLS                                                                  NUMBER
NUM_BUCKETS                                                                NUMBER
LAST_ANALYZED                                                              DATE
SAMPLE_SIZE                                                                NUMBER
CHARACTER_SET_NAME                                                         VARCHAR2(44)
CHAR_COL_DECL_LENGTH                                                       NUMBER
GLOBAL_STATS                                                               VARCHAR2(3)
USER_STATS                                                                 VARCHAR2(3)
AVG_COL_LEN                                                                NUMBER
CHAR_LENGTH                                                                NUMBER
CHAR_USED                                                                  VARCHAR2(1)
V80_FMT_IMAGE                                                              VARCHAR2(3)
DATA_UPGRADED                                                              VARCHAR2(3)
HISTOGRAM                                                                  VARCHAR2(15)

Similar Messages

  • How to check which table is used

    After creating RFQ , i want to check which table is used  in creating RFQ.
    how can i see that data has gone or not into the database table.

    Hi
    See the Table EKKO and EKPO only
    with EKKO-BSTYP = A
    Regards
    Anji

  • How to check which user has the privilege to execute a stored procedure?

    I am using Oracle 7 and I would like to check which user has the privilege to execute a stored procedure. How can I check it? Is there any view I can query for?
    Alex Hung

    Please check DBA_SYS_PRIVS.
    SQL> select * from dba_sys_privs
    2 where grantee='HARY';
    GRANTEE PRIVILEGE ADM
    HARY EXECUTE ANY PROCEDURE NO
    ....

  • How to check which table is using my table

    Hi,
    I have a table say Temp_Rd.
    How do I check which table is using my table Temp_Rd??
    Which table is using my Temp_Rd as the dependencies in the sql database?
    Thank you very much.

    Oops, pardon me for asking the questions unclearly.
    Its like some table Foreign Key is references to my this table Temp_Rd.
    Eg,
    CONSTRAINT "FK_SomeTable" FOREIGN KEY ("ID")
         REFERENCES "Temp_Rd" ("ID")
    How do I know which are the some table?
    I hope I explain it better this time.
    Sorrie about it.

  • How Servlet container check which constructor has been implemented ?

    How Servlet container checks which constructor has been implemented ?

    http://forum.java.sun.com/thread.jspa?threadID=554796&tstart=0

  • Pro grammatically create three sub-folders with specific name under each of root folders in site collection level??

    Hi,
    i have a document library Named "Digital" in a site collection. In that document library i have bunch of customer folders with different customer name. My requirement is i need to create three sub-folders (like Images, Processed, Status) each of
    customer folders. so how can i automate to create sub-folders with specific name. can i use object model or power shell to achieve this one.
    Thanks in advanced!

    Hi Murugesa,
    Thanks for your help. i was trying to create folder inside document library using your code. but unfortunately i cant debug code and cannot create folder inside customers folder. Following is the code, basically i am creating a SharePoint project and adding
    an item as class file and deploying to share point site and then trying to debugging code, but break-point showing as yellow circle. i checked solution has been deployed to the server but still not creating any folder. It will be very helpful if you can describe
    all the steps. should i create console application?
    Appreciated !!
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.SharePoint;
    namespace Add_Sub_Folders
        class Create_Folders
            public void Sub_Folders()
                var foldersList = new List<string>();
                SPSecurity.RunWithElevatedPrivileges(delegate()
                    try
                        using (var site = new SPSite(SPContext.Current.Site.Url.ToString()))
                            using (var web = site.OpenWeb())
                                web.AllowUnsafeUpdates = true;
                                foreach (SPFolder folder in web.GetFolder("http://nyc01d1sptmp01:8080/Shared%20Documents/").SubFolders)
                                    if (folder.Url.ToString() != "Shared Documents/Forms" && folder.Url.ToString() != "Shared Documents")
                                        foldersList.Add(folder.Url);
                                        SPFolder subFolder = web.GetFolder(folder.Url);
                                        subFolder.SubFolders.Add("Draft");
                                        subFolder.SubFolders.Add("Status");
                                        subFolder.SubFolders.Add("Final");
                                    folder.Update();
                                web.AllowUnsafeUpdates = false;
                    catch (Exception ex)
                        ex.Message.ToString();

  • Sap adobeform sending pdf as attachment with specific name

    Hi Experts,
    Need your help in solving my problem !!
    My requirement is to send adobe form as mail attachment in PDF format, Which I am able to do.
    My Problem is PDF attachment should be generated with specific name.
    For example my scenario (below given screen shot),
    When i click on submit by email button, PDF will be attached to my mail,
    with some random name such as "d4811f8_45171.pdf" Instead it should be generated with
    fixed name such as "new_attach.pdf" or dynamic name using user name such as
    "Vishwa_attachment.pdf".
    Kindly help to achieve my needs.
    Any help will be greatly appreciated and rewarded.
    Thanks in advance,
    Regards,
    Vishwa

    Hi Naveen,
    please read through my query again, I should generate pdf when I click on "submit by email button".
    I am not using any function for conversion it will happen automatically.
    thanks,
    Vishwa

  • Error -43  when try playback on win7 64bits over the network QT that recide MacPro  osx 10.5 however i can play with VLC player, This happend when the QT is inside a Folder with name longer 8 chars other files has no problem with long names just the QT

    error -43  when try playback on win7 64bits over the network QT that recide MacPro  osx 10.5 however i can play with VLC player, This happend when the QT is inside a Folder with name longer 8 chars other files has no problem with long names just the QT  nfs sharing

    Never mind, I already found the solution myself.
    What I did wrong was:
    - not copying the master image to the nbi folder
    - selecting the netinstall-restore.dmg image as source to copy to my HD.
    The thing is, when you create a netinstall image for 10.5, the image itself is already included in the netinstall image so you don't have to do anything else.
    With the 10.4 image however, you also have to copy the master image to the NetBootSP0 directory.
    In the *.nbi folder contains an netinstall-restore.dmg file. But that is only to boot you to netrestore, it's not the image itself.
    Other alternative is to copy the images to another folder that you share with AFP and adjust the configuration of netrestore like described in this manual:
    http://www.shellharbourd.det.nsw.edu.au/pdf/misc/osxrestoringnet.pdf
    This manual was also how I figured out that I forgot to copy the image to the NetBootSP0 folder.

  • Check in new documents in DMS with specific access permissions

    Hi,
    we have an RFC which creates new documents in DMS.
    This calls one after another these FBs:
    - CVAPI_DOC_CREATE
    - CVAPI_DOC_CHECKIN
    - BAPI_DOCUMENT_CHANGE2 for a additional classification of the new document
    Now we have a new request from our customer: to give the document specific access permissions.
    We try the following:
    - manually check in a document template with the necessary permissons.
    - the permissions are given in a classification  ("O,MW-T-D*,IB,02/03/52/53")
    - This is named "authority characteristic" and is checked somewhere else, I do not really know how this works in detail ( but it works)
    - check in a new document with a reference to the template and in expectation that the new document has the same classification and therefore the same access permissions
    - If I do this manually in CV03N is does work
    - We do this with CVAPI_CHECK_IN_WITH_TEMPLATE - but this FB does not copy the classification ( only the description and the attached original documents , and the documentnumber of the new document is an mandatory parameter which is not allowd in our case since we use internal creation of document numbers)
    My question is: Is this a possible way to create new documents with specific permissions
    Is there a possibility to give the permissions to the documenttype instead of give them to every single document of this documenttype ?
    Thanks
    Kerstin

    My guess is that at some point you propagated the ACL entry for "everyone deny delete" to all your folders and sub-folders and their contents by selecting Apply to All in a GetInfo window. Try doing a search in the Leopard forums for
    ACL chmod
    and you'll find a whole raft of discussions about the problem and suggestions for fixes.
    Francine
    Francine
    Schwieder

  • How to build a dimension witch has a column with sdo_geometry type

    hello everybody;
    i'm working with owb 11g, i have designed my dimension and also my fact table.
    in the implemnation, i have created (designed, depolyed and populated) successfully some dimenstions without any problems.
    But when i arrived to create a spatial dimension which contains a column with sdo_geometry type, i have the following error;
    Error: ORA-30373: object data types are not supported in this context
    So how can y bypasse this problem.
    Is there any tutorial to "how create spatial dimension with owb"?
    i have googled for a long time but no solution up to now
    any help will be welcome
    Thank you at advance

    Sans,
    I am no Apex expert, but with a situation as "complex" as yours, have you thought about creating a VIEW that joins these 7/8 tables, placing an INSTEAD OF trigger on that view to do all the business logic in the database, and base your application on the view?
    This is the "thick-database" approach that has been gaining momentum of late. The idea is to put your business logic in the database wherever possible, and let the application (Form, Apex, J2EE, whatever) concentrate on UI issues,

  • How to check which Table & Field is populating Data source

    Hi,
    My requirment is to check from which Table and Which field the data is extracted in the data source
    Data Source : 0MAT_PLANT_ATTR
    Field in Data Source :  MINBE
    Now i want to check from where (Table/Field) in R/3 is populating the Field MINBE in Data source 0MAT_PLANT_ATTR
    How can i do that

    Hi,
    Since you have the extract structure and the extractor, you can try Extractor Checker RSA3.Execute ST05 (activating SQL Trace), switch on the trace and execute the extractor checker. Once the extractor checker presents the results
    switch off trace. The clcik on Display trace and you will see all the tables that were hit by the extractor checker to retrieve data and present it to you.
    Note: Set the break point in the Extractor Function module.
    View the ST05 Extended Trace list. The Object name shows the Tables accessed.
    Hope this helps.
    Thanks,
    JituK

  • Automatically populate custom list column with site name when list is created

    Hi All,
    I am using a CQWP to display selected contacts on subsites from one master contact list on the parent site. Each subsite is for a different project and is named according to the project number. In the master contact list I have a custom column called Projects
    that is populated with the various different project numbers that an individual contact is involved with.
    The CQWP on the subsite filters the results based on the Projects column of the master contact list. As it stands I have to manually input this job number into the CQWP's properties. What I would like to happen is for the project number (the subsite name)
    to automatically be input to the filter value.
    The closet I have come to reaching my desired behaviour is by adding a column to the Site Pages list called Title and setting the filter value to [PageFieldValue:Title]. This still doesn't get the automatic behaviour I require because I still have to input
    the project number into the Title column manually, but it is quicker than editing the CQWP properties.
    What I need to achieve is either a way of automatically populating this column with the subsite name or find a way for the CQWP to pick up the subsite name and filter its results accordingly.
    I have found this article http://www.andrewconnell.com/blog/Subclassing-the-Content-Query-Web-Part-Adding-Dynamic-Filtering which seems to be along the lines of what I want to achieve, but it is by no means a walk through and while I'm not completely
    unfamiliar with coding, I don't know enough to implement it without help.
    Any help would be greatly appreciated, I've been working on this for weeks on and off!
    Thanks in advance,
    Dan

    Hi,
    I believe the "Description" field type is Multiple Lines of Text. Sorting doesn't allow in this field type. In order to do the sorting, you would require to create additional column like single line of text column (note that it supports only 255
    chars and require to truncate the data if more than 255) and update the data using event receiver or workflow. and do the sorting with that column.
    kmhsad

  • Saving a pdf in an iframe with specific name

    Hi,
    in our application there is an iframe which displays different pdf depending of the situation. As source we use URLs.
    If the user want to save the pdf within the iframe it suggest always a default name. Is it possible that it suggest a specific name for each pdf? I can't find any attributes to deliver a desired name. Or maybe an iFrame is the wrong ui element for this demand?
    Thanks, regards
    Susanne

    Hi Susanne
    You can append time ahead of the pdf, so that name of pdf would never be same.
    code would be like this -
    java.util.Calendar calendar = java.util.Calendar.getInstance();
    String currentTimeInLong = "" + calendar.getTimeInMillis();
    and append this string ahead of your pdf. You can give a try.
    Regards,
    Sen

  • How to make a spot swatch with specific name by using AppleScript?

    Hi there,
    I am trying to create a script in AppleScript to make a new spot color swatch that must be the COLOR TYPE : SPOT (with specific values). I've got it to make a global process color but can't seem to make a spot swatch. I'm using the script below :
    tell application "Adobe Illustrator"
        set docColorSpace to color space of document 1
        if (docColorSpace is CMYK) then
            set SpotColor to {cyan:100.0, magenta:0, yellow:0.0, black:0.0}
        else
            set SpotColor to {red:0.0, green:174.0, blue:239.0}
        end if
        make new spot in document 1 with properties {name:"ADHESIVE", color:SpotColor}
    end tell
    I did find an entry in an old forum that did this using javascript, however, I am not experienced with this at all and have no idea what or how to use it on a mac platform. This script is listed below.
    #target illustrator
    var docRef = app.activeDocument;
    var newCMYK = new CMYKColor();
    newCMYK.cyan = 100;
    newCMYK.magenta = 0;
    newCMYK.yellow = 0;
    newCMYK.black = 0;
    var thisSpot = docRef.spots.add();
    thisSpot.name = 'ADHESIVE';
    thisSpot.color = newCMYK;
    thisSpot.colorType = ColorModel.SPOT;
    Any help would be greatly appreciated.
    Thank you!

    You are close but missing the last property listed in the JavaScript… It translates to… 'color type:spot color'
    tell application "Adobe Illustrator"
    set docColorSpace to color space of document 1
    if (docColorSpace is CMYK) then
    set SpotColor to {cyan:100.0, magenta:0, yellow:0.0, black:0.0}
    else
    set SpotColor to {red:0.0, green:174.0, blue:239.0}
    end if
    make new spot in document 1 with properties {name:"ADHESIVE", color:SpotColor, color type:spot color}
    end tell
    BTW… The use of JavaScript in the CS apps is more common because of its 'platform independence' There is a toolkit supplied along with the CS install.

  • New Column Still Defaulting To Value From Deleted Column With Same Name

    This is strange. I had a managed metadata column called "Document Category" attached to multiple content types and set to a default value (different in each library). Then I deleted the column (all instances from libraries and references from
    content types as well), and created a new site column with the same name, but a Choice field instead. The libraries that had a default value for the original column, are still populating new documents using the original default value, and it's showing up as
    something like 88;#Hospital Correspondence|4b1e8da6-8653-492a-3e45e6c56c38 . The column is still a choice field, so I don't even know why it allows this value. Does anyone know why this is happening or how to fix it?

    Hi  Vince,
    Thank you very much for sharing your solution here. It  would be helpful for others who encounter similar issue.
    Thanks again,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Eric Tao
    TechNet Community Support

Maybe you are looking for

  • I just installed 10.9.1 and EVERYTHING is crashing.

    Almost all my apps that are not from apple are crashing after 10.9.1 update Chrome Processing Fetch Eos utility Bbedit Skype Arkaos grand vj Blender Resolume Many others and background processes all crash immediately

  • Problem wich attach in e-mail

    Hello! I have problem with attach in e-mail for bidders. I create a bid invitation and attach any document. [Attach|http://www.4shared.com/file/67153110/5be21d31/attach01.html] So, i publish my bid invitation and a e-mail is send to bidder. But, i go

  • J2ee engine is taking more time to start

    I we r updating from  sp9 -sp14 where we have done updtae for java first .when we r doing the same on EP ,ie in final step (start j2ee engine) is taking more time .can some one can help regrads harinath

  • Fatal Error: Failed to open handle for AFLVCG61.msi

    Fatal error occured while installing Device Drivers CD. I have no clue Help. Message says Failed to open the handle for D:\components\max\AFLVCG61.msi. And, the details says: K:\NIInstallers\dev\1.1.2\src\UberInstaller\IniFileInfo.cpp(968): IInstalle

  • Update picking quantity in delivery for batch split items

    Hi, I'm trying to use the function module WS_DELIVERY_UPDATE to update the existing deliveries. I'm able to do batch split for the items in delivery using the same FM. I have also requirement to delete these items (batch split items). To delete these