Pls help : How To select fields and data from user_table for each tablename

Please help with the query to generate a output which selects the code,meaning,inuse for each table in the user_table that has "CODED" as a part of table name.
User table has some 800 table that contains CODED in the tablename.
Desc of the table:
DESCPTION:
Name Null? Type
SHORT_NAME NOT NULL VARCHAR2(20)
CODE NOT NULL VARCHAR2(4)
MEANING NOT NULL VARCHAR2(240)
IN_USE VARCHAR2(1)
NOTES VARCHAR2(2000
UNITS NOT NULL VARCHAR2(1)
AMOUNT NOT NULL VARCHAR2(3)
CONVERTED VARCHAR2(1)
RUN_NAME VARCHAR2(30)
But all the table have code, meaning,in_use fields.
O/P format :
TABLE_NAME CODE MEANING IN_USE
Help me pls.

Not 100% sure what you want. If you want to see all the tables that have all three of those columns, then you could do something like:
SELECT table_name, 'CODE', 'MEANING', 'IN_USE'
FROM user_tab_columns
WHERE column_name = 'CODE' and
      table_name like '%CODED%'
INTERSECT
SELECT table_name, 'CODE', 'MEANING', 'IN_USE'
FROM user_tab_columns
WHERE column_name = 'MEANING' and
      table_name like '%CODED%'
INTERSECT
SELECT table_name, 'CODE', 'MEANING', 'IN_USE'
FROM user_tab_columns
WHERE column_name = 'INUSE' and
      table_name like '%CODED%'If you want to select those three columns from each of the tables, then you could do something like this.
Create a command file called, for example, makesel.sql that looks like:
SET PAGES 0 lines 500 trimspool on feedback off;
spool sel.sql;
prompt spool selout.txt;
SELECT 'SELECT '''||table_name||''', code, meaning, in_use FROM '||
       table_name||';'
FROM (SELECT table_name
      FROM user_tab_columns
      WHERE column_name = 'CODE' and
            table_name like '%CODED%'
      INTERSECT
      SELECT table_name
      FROM user_tab_columns
      WHERE column_name = 'MEANING' and
            table_name like '%CODED%'
      INTERSECT
      SELECT table_name
      FROM user_tab_columns
      WHERE column_name = 'INUSE' and
            table_name like '%CODED%')
prompt 'spool off;'
spool off;
@sel.sqlAt the sqlplus prompt run the file using @makesel.sql. This will create another file called sel.sql containing the commands to select those three columns from each table that has all three columns, then after the new file is created, it runs the file (@sel.sql). The output will be spooled to a file called selout.txt.
HTH
John

Similar Messages

  • Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.

    Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I  am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
    Pls explain me the steps for adding data from xml to B1 quotation step by step.
    thanks and regards
    Priya

    Hi,
    Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
    Thanks,
    Gordon

  • Help, how to restore backed-up data from old 3GS to my new 3GS?

    Hi I recently got a replacement phone, and when i synced it to iTunes, the prompt to restore my backed-up data came up. However when I tried to restore, it prompted me to update my new phone's software to 3.1 first.
    So now, after updating my software, how do I restore the data from my old phone?
    Coz the first prompt does not appear anymore.
    Would appreciate your feedback, thanks!

    Upgrade to 3.1 first, do not sync or backup. After you upgrade, reconnect & select restore from previous backup & all your data will be put back on the new phone.
    When you right click on your phone under devices in the right column, one of your choices will be restore from backup.
    Message was edited by: wjosten

  • HT201250 Mac OS 10.6 - How to restore OS and Data from Time Machine Backup

    my exisitng iMac have a defective hard drive that i need to be replace. how do i restore the OS and data to the new hard disk? i have Time Machine backup from the previous hard disk. (note: the OS is 10.6, and i do not have the install disk)

    cindy1023 wrote:
    i had a hacker get in my computer, got all my info used my name and passwords to convert safari into windows on another computer? and APPLE IS THE ONE GAVE HER THE PASSWORD.
    There is no way to "convert" Safari into Windows.   And very unlikely for a hacker to get into a Mac. 
    But, ok, your system is all messed-up somehow.
    First, what version of OSX is on your Mac?  If you don't know, click the Apple icon at the upper-left of the screen and select About This Mac.  You'll see a display like this:
    We need the Version number.
    Second question: do you have backups made with Time Machine (on an external HD or the like) that you want to restore, or do you want to start your Mac over fresh, the way it came from the factory?
    p.s. i dont have the disc it came with , my daughter set it up for me to get started !
    You may need that, depending on what version of OSX you're running, to restore the backups or start fresh.
    You really should have a copy of the original disc, as there's an Apple Hardware Test on it, tailored to the hardware on that Mac. You'll need it it there's ever a problem.  If your daughter can't send it,  call AppleCare (800-275-2273),and  give them your serial number -- they can send you a replacement for a nominal fee.
    Sorry, but it's late here, and I'm going to bed, but will be back tomorrow.

  • How to restore programs and data from time machine

    Need help restoring programs and data wirelessly from time machine

    Click here and follow the instructions; you can also use the Migration Assistant or Setup Assistant.
    (125408)

  • How to delete documents and data from your iphone

    iphone 5s has a lot of things listed in "documents and data" section- and in the "other" section of itunes when updating phone- is there a way to know what is on there so i can delete it?  itunes does not give more information...

    These are 2 different things and have to be address 2 different ways.
    The other, that shows up in iTunes on the bar is memory the device is not recovering, for what every reason.
      To reclaim that you need to wipe the iPhone and setup as new.
    The Documents and Data in the iCloud storage.
      Tap the Doc or data type
      then swipe right to left on the data and press delete

  • Select top 2 sal from emp for each deptno - urgent

    I want to retrieive the top 2 sal for each deptno; Can you please help
    Thanks in advance

    I don't know if this is what you are looking for:
    scott@DBA> ed
    Wrote file afiedt.buf
      1  select empno,deptno,sal,drank
      2  from (select empno,deptno,sal,dense_rank() over(partition by deptno order by sal desc) as drank
      3*       from emp)
    scott@DBA> /
         EMPNO     DEPTNO        SAL      DRANK
          7839         10       5000          1
          7782         10       2450          2
          7934         10       1300          3
          7788         20       3000          1
          7902         20       3000          1
          7566         20       2975          2
          7876         20       1100          3
          7369         20        800          4
          4109         20        800          4
          7698         30       2850          1
          7499         30       1600          2
          7844         30       1500          3
          7521         30       1250          4
          7654         30       1250          4
          7900         30        950          5
    15 rows selected.Get only the ones that are in rank 1 and 2
    scott@DBA> ed
    Wrote file afiedt.buf
      1  select empno,deptno,sal,drank
      2  from (select empno,deptno,sal,dense_rank() over(partition by deptno order by sal desc) as drank
      3        from emp)
      4* where drank in (1,2)
    scott@DBA> /
         EMPNO     DEPTNO        SAL      DRANK
          7839         10       5000          1
          7782         10       2450          2
          7788         20       3000          1
          7902         20       3000          1
          7566         20       2975          2
          7698         30       2850          1
          7499         30       1600          2
    7 rows selected.Create view for doing a simplified way to select data.
    scott@DBA> create view top_2_emp_by_sal as
      2  select empno,deptno,sal,drank
      3  from (select empno,deptno,sal,dense_rank() over(partition by deptno order by sal desc) as drank
      4        from emp)
      5  where drank in (1,2);
    View created.
    scott@DBA> select * from top_2_emp_by_sal;
         EMPNO     DEPTNO        SAL      DRANK
          7839         10       5000          1
          7782         10       2450          2
          7788         20       3000          1
          7902         20       3000          1
          7566         20       2975          2
          7698         30       2850          1
          7499         30       1600          2
    7 rows selected.Message was edited by:
    Delfino Nunez

  • Chart report Condition fields and Data fields

    Hi all,
    i have tried chart report by adding two condion fields and one data field, the report is more meaning full in this scenario. the first condition field is taken as x-axis, the 2nd condition fields is taken as legend.
    while adding more condition fields and data fields, i feel its not showing meaningfull data.
    can anyone explain how the condition fields and data fileds are manipulated by crystal report.
    i am using CR XI R2 Server.
    Thanks
    Padmanaban V

    i am using Crystal Report XI R2 RAS Embedded in my server.
    as we can add any number condition fields programatically using the method
    ConditionField.Add(FieldObj), i would like to know how these fields are manipulated internally by the RAS server.
    that means, what is the significance of condition fieldobject 1, condition fieldobject 2,condition fieldobject 3 etc...
    if i add more than two condition fields , RAS Chart Report always returns 0 as legend value for all legends.
    Thanks in advance
    Regards,
    Padmanaban V
    Edited by: Padmanaban Viswanathan on Dec 22, 2008 9:53 AM

  • Select DBase (.dbf) data from Oracle on Linux

    How to select DBase (.dbf) data from Oracle on Linux ?
    dbf files connected to Linux form NetWare server as 'ncpmount'.
    Oracle has access as oracle 'Directory' object.

    If you have an ODBC driver for it and are using Oracle 10g you can use Generic Connectivity. For more information on Generic Connectivity refer to the Chap 7 of the Heterogeneous Connectivity Administrator's Guide.
    http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10764/gencon.htm#1005900

  • HT201270 i have just updated my old 3GS and now when i am on restore the window is comming up and asking for a password. i have not set up a password for restore, please help how i can restore my date???

    i have just updated my old 3GS and now when i am on restore the window is comming up and asking for a password. i have not set up a password for restore, please help how i can restore my date???

    capriz wrote:
    i have just updated my old 3GS ...
    To what... iOS 7 is Not supported on the 3 GS

  • Select field and hide field at data source ganaration  for LO extrction

    Hi GURU,S
    Could any one tell me what is differce between select field and hide field at data source ganation in LO at r3 side.what happend if u select field and hide field.
    Regards.
    hari

    Hi Hari,
    If you choose Select fields, you'll be able to filter this IO in Selection tab of infopackage (set IO's value(s) to be loaded).
    In case of hide field you'll not have it in the transfer structure at all.
    Best regards,
    Eugene

  • Pls help - How can I add a typekit font to muse?

    As Muse doesn't come with all typekit fonts already included in the dropdown list of webfonts, I'd like to know how I can add a typekit font to the dropdown menu so I can use it for my website. I have Adobe creative cloud membership.
    I've searched the whole of the web and can't find anything about this at all - only about adding one of the existing muse typekit fonts which I already know how to do.
    Why doesn't Adobe include all typekit fonts with Muse when you're already a full creative cloud subscriber?

    Done!
    Date: Thu, 20 Dec 2012 03:13:17 -0700
    From: [email protected]
    To: [email protected]
    Subject: Pls help - How can I add a typekit font to muse?
        Re: Pls help - How can I add a typekit font to muse?
        created by morgan_in_london in Help with using Adobe Muse - View the full discussion
    You're very welcome - can I be cheeky and ask for a "correct answer" to be noted? :^D
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4935814#4935814
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4935814#4935814
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4935814#4935814. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Help with using Adobe Muse by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Prerequsites for deciding Key fields and data fields

    Hi
    I would like to know the criteria to decide upon KEY fields and Data fields for an infoprovider.

    Hi,
    What is a Key field in a Database and How should I choose one?
    Keys are crucial to a table structure for many reasons, some of which are identified below:
    They ensure that each record in a table is precisely identified.
    They help establish and enforce various types of integrity.
    They serve to establish table relationships.
    Datafields may be Charecteristics and it may be keyfigures
    Regards,
    Marasa.

  • How do I easily transfer data from Palm Desktop to iCal and Address Book?

    Hello,
    How do I easily transfer data from Palm Desktop to iCal and Address Book?
    I have a Palm Tungsten E handheld which just died.
    Luckily, all my data is backed-up on my Palm Desktop V4.2.1.
    I just bought an iPod-Touch, so I would like to easily transfer
    all my data (Addressbook, Calendar, etc) from the Palm Desktop
    on my Mac (OSX 10.5) to the equivalent Mac applications
    (Address Book, iCal) which will then allow me to view and update
    them on my iPod-Touch.
    How do I easily transfer data from Palm Desktop to iCal and Address Book?
    Thanks in advance for your help.
    David

    Hi David. The contact information is straightforward. Bring up your Address List in Palm Desktop, then select Export under file. You pick vCard as the format, and save the resulting file where ever. In Address Book, you then select Import --> vCards under file. You may need to edit things like birthdays by hand afterwards.
    I am still working on the Calendar information.
    - Chris

  • HT4623 I cannot see sw update button in general section,pls help how to update iOS in my iPad 2

    Hi I want to upgrade my iOS to 5 in my ipad2 but I cannot see nay upgrade button in the setting section.pls help how to upgrade my iOS now

    The Settings > General > Software Update option only appears when you have iOS 5+ installed, as you have iOS 4 you can only update to iOS 7 (that is the only version that you can update to) via your computer's iTunes, as described half-way down the page that you posted from. You will need the current version of iTunes on your computer : http://www.apple.com/itunes/download/
    Connect the iPad to your computer's iTunes and copy any purchases off the iPad to your computer via File > Devices > Transfer Purchases. You may also want to copy photos and any important documents off the iPad as well e.g. via the file sharing section at the bottom of the device's apps tab when connected to iTunes, via wifi, email, dropbox etc - they should be included in the backup, but it's best to have a copy of them outside of the backup just in case. You can then force a backup of the iPad via File > Devices > Back Up
    Then start the update by selecting the iPad on the left-hand sidebar, and on the Summary tab on the right-hand side clicking the Check For Updates button
    Updating to iOS 5+ : http://support.apple.com/kb/HT4972
    If you do update you can't then uninstall it

Maybe you are looking for

  • [SOLVED] KWin keyboard shortcuts no longer working

    My Kwin shortcuts (Maximize, tile-left, tile right) have stopped working since doing a pacman update yesterday. Any ideas on how to fix them? I am running Arch in a VirtualBox 4.3.10 VM. EDIT: Never mind, the problem was resolved for whatever reason

  • Have 3 itouch 2 will connect to internet 1 won't

    We have 3 touches, 2 will connect to wireless in house but one will not. settings are the same on all 3. One that won't, will detect wireless house but when trying to connect it comes back with "can not connect". Most of time it does not have the wir

  • PDF TO HTML

    I would like to know if it's possible with PHP [Not necessary PHP , but also like RUBY on Rail or python if it is] to convert a pdf file to an html file. What exactly i want 1) On Web server I put my pdf file in a dictionry 2) Using PHP (Or any open

  • Installing Adobe XI, I receive the error message 1714

    Installing a new version of Adobe XI standard, I receive the error message 1714 - older version of Adobe XI can not be removed. My old version is 8, what do I do?

  • I Can't Use The New Backup 3.0!

    I have downloaded the new Backup 3.0 and it looks excellent. But I can't use it! The bottom of the new Backup opening screen stretches down below the bottom of my screen and there is no button visible for me to click on to continue. There are also no