Insert statement will not work if select statement has less number of colum

Hi,
One of my thread is already resolved on the following URL : unable to insert rows into the table
DROP TABLE TEMP;
CREATE TABLE TEMP AS SELECT * FROM CASE_101 WHERE 1=2;
DECLARE
S VARCHAR2(200);
STMT VARCHAR2(500);
begin
for C in (select TABLE_NAME INTO S from USER_TABLES where TABLE_NAME like 'CASE%' TABLE_NAME NOT like '%OLD' and Num_ROWS > 0 order by TABLE_NAME) loop
STMT := 'INSERT INTO TEMP SELECT * FROM ';
STMT:=STMT || C.TABLE_NAME;
EXECUTE IMMEDIATE STMT;
dbms_output.put_line(c.table_name);
end loop;
end;
i am facing now some different; almost all the tables have same number of columns except in few of tables have some additional columns. As above i am creating a table "TEMP" who has highest column temp(by doing some manual process). The table who has less columns than "TEMP" table : Insert statement will not work. 'INSERT INTO TEMP SELECT * FROM less_columns_table_name'.
Please let me know , how can i execute proper way.
Thanks.
Best Regards
Arshad

user13360241 wrote:
Hi,
One of my thread is already resolved on the following URL : unable to insert rows into the table
DROP TABLE TEMP;
CREATE TABLE TEMP AS SELECT * FROM CASE_101 WHERE 1=2;
DECLARE
S VARCHAR2(200);
STMT VARCHAR2(500);
begin
for C in (select TABLE_NAME INTO S from USER_TABLES where TABLE_NAME like 'CASE%' TABLE_NAME NOT like '%OLD' and Num_ROWS > 0 order by TABLE_NAME) loop
STMT := 'INSERT INTO TEMP SELECT * FROM ';
STMT:=STMT || C.TABLE_NAME;
EXECUTE IMMEDIATE STMT;
dbms_output.put_line(c.table_name);
end loop;
end;
i am facing now some different; almost all the tables have same number of columns except in few of tables have some additional columns. As above i am creating a table "TEMP" who has highest column temp(by doing some manual process). The table who has less columns than "TEMP" table : Insert statement will not work. 'INSERT INTO TEMP SELECT * FROM less_columns_table_name'.
Please let me know , how can i execute proper way.
Thanks.
Best Regards
Arshadmore often than not "TEMP" tables are NOT required & are highly inefficient in Oracle.
Either only specify explicit column in TEMP to get data,
or provide value for "extra" column in TEMP

Similar Messages

  • My number 5 key is not working and my password has a number 5 in it. How can I change my password when I'm signed in on another account or as guest user? I need help :(

    My number 5 key is not working and my password has a number 5 in it. How can I change my password when I'm signed in on another account or as guest user? I need help

    - If the "other" account has administrative privileges then just try changing the PW for your account.
    - Forgot Mac Password? How to Reset Your Mac Password (with or without CD)
    Change the Admin Password with Mac OS X Single User Mode
    Reset mac mini admin password: Apple Support Communities
    - If the problem is due to a bad KB just get a new KB

  • Insert Statement Will Not Work if a user has

    I am using a MySQL database to process my Java Server Page form.
    Simply, I always try to see if I can process information, first, via the command line client, then thru JSP.
    At the command line client I type:
    I type insert into tablename (favorite_quote) VALUES
    ('Sleepin' in 'da house!');
    That insert throws an error. SImply said, because of the bunches of single quotes... Is there any advanced statement or insert statement to solve this?
    If I do this:
    INSERT INTO tablename (favorite_quote) VALUES
    ('Java');
    It adds the record perfectly normal...
    I am REALLY new to Java, so any help on this issue would be great!
    BTW: Part of my Java Server Pages has:
    String favorite_quote =request.getParameter("favorite_quote");
    "INSERT INTO tablename (favorite_quote) VALUES " +
    "('"+userid+"')";
    Obviously that works fine unless anybody adds a ' or " isn't or what's, etc.
    I'm loving Java, I just REALLY need some help on solving this issue.
    Thank you so much! Any help would BE **WONDERFUL**!

    String favorite_quote
    te =request.getParameter("favorite_quote");
    PreparedStatement ps =
    = connection.prepareStatement(""INSERT INTO tablename
    (favorite_quote) VALUES (?)");
    ps.setString(1, "Sleepin' in 'da house!");
    ps.execute();oops a small error
    PreparedStatement ps = connection.prepareStatement("INSERT INTO tablename (favorite_quote) VALUES (?)");

  • I have no idea what to do. The iPod touch will not work w/ iTunes and has the apple symbol. It keeps flashing white.

    The ipod was restored to factory settings and now it wont do anything except show the apple symbol and flash white. Then iTunes says it can't connect because of an unknown error.

    Use the search function up to the right. There are a zillion basic setup guides with a simple Google search.

  • On the top of any web page, the hot spots will not work. It seems like the links in the header part of a page is turned off.

    On any web page (Facebook, Yahoo, this page) the links on the top of the page will not work. The hot spots seem dead. For this page the Desktop/Mobile/Firefox Home links will not work.

    The Yahoo Toolbar has been reported as causing that. Disable it or uninstall it.

  • I got a replacment iphone 4 but it will not work for me please help??

    i got a replacment iphone 4 but it will not work for me it has been charging for nearly 4 hours now but the screen still has the battery in the red and also will not connect to itunes is there something im doing wrong??

    You'll have to get it serviced or replaced again, contact Apple, usually a replaced device is under warranty for 90 days as well.
    Apple - Support - Service Answer Center

  • I down loaded the latest version on my iphone , not the phone will not work... the itune icon is on the screen with a plug symbol showing to plug in ....phone wont work ...help please

    I just down loaded the latest version to my iphon5s. Everything seemed to go well. Now the phone will not work. The screen has the iTunes icon on it with a arrow showing to plug in. its locked up  wont do anything . Turned on and off , the same picture shows up ...help please

    Your phone has entered recovery mode.  You will need to connect it to a computer with iTunes and restore it to factory settings.  Hopefully you have a backup (either iTunes or iCloud) to restore from.
    HTH

  • HT202159 Mountain Lion upgrade download stopped, now it states in purchased apps that 'an error has occured' and resume button is blank & will not work

    Mountain Lion upgrade download stopped, now it states in purchased apps that 'an error has occured' and resume button is blank & will not work. Tried to re download, but it states code has already been used

    Danielle...
    From the App Store menu bar top of your screen click Store > Check for Unfinished Downloads
    If that doesn't help, disable anti virus software and turn off the Firewall in System Preferences > Security & Privacy.
    Keep in mind, for downloading Mountain Lion from the App Store, a high speed (broadband) internet connection is strongly recommended by Apple as noted here > iTUNES STORE - MAC APP STORE - TERMS AND CONDITIONS
    If you need to reinstall OS X or repair the the startup disk using Mountain Lion Recovery, that requires broadband (high speed internet) access to the internet via Wi-Fi or an Ethernet connection. OS X is downloaded over the internet form Apple when OS X Recovery is used for reinstallation.

  • HT204291 After updating software on my Apple TV home sharing will not work. Both Apple TV and iMac have home sharing on but when Computer is selected on Apple TV I just get a message saying "turn home sharing on".  But it is.  How can I solve this problem

    I have just updated the software on my Apple TV since then home sharing will not work though I had not used it since installing iOS6 on my iPad 3.  Home sharing is shown to be on on the Apple TV and on on my iMac.  The Apple TV is connected to the router with an ethernet cable and all functions work correctly apart from my computer.
    I have done the following. 
    Switched off the Apple TV and rebooted, did the same with iMac
    Turned off home sharing then turned it on.
    Checked that home sharing is on on both devices.
    Selected Computer
    Get a message telling me to turn home sharing on - IT IS!
    Tried using airplay mirroring on the iPad but the airplay function is missing from iPad.
    It is so annoying since before iOS6 and updating the Apple TV software everything worked perfectly.  Any help would be very gratefully received.
    Thanks

    Hi Everyone,
    hope this message finds you all in time. The recent Apple TV update 5.1 is terrible. Apple knows it is which is why (thankfully for some relentless user -I have no idea who but I believe it was under threat) they have allowed to sign 5.0.2 again which means you can downgrade your Apple TV 2 and 3 to a 5.0.2 version via iTunes. Who knows how long they will keep the window open but I have downgraded my ATV early this morning. I couldn't post this earlier because I was out all day but I am doing it now.
    Here's how to do it:
    1) Connect your ATV to your computer via a Mini USB (not included with ATV but included with many other electronic devices) - in order for your ATV to appear in iTunes you must FIRST plug the USB cable to your computer and ATV and only THEN plug the power cable.
    2) Download your ipsw restore file from Apple.
    5.0.2 (ATV 2): AppleTV2,1_5.0.2_9B830_Restore.ipsw
    5.0.2 (ATV 3): AppleTV3,1_5.0.2_9B830_Restore.ipsw
    3) In iTunes select yout ATV, hold SHIFT and click on Restore
    4) Find and choose the downloaded IPSW file in the Open Dialog Box and hit Next
    5) As long as Apple still signs that version the Restore process will begin and will take a few minutes to complete.
    Enjoy!
    raadore

  • Quick select tool hangs and will not work

    All of a sudden the quick select tool will not work/hangs up has a mind of its own and wanders/ after installing an upgrade to Nik software Color Efex Pro 4. I put that in the trash as I could not find a way to unistall. Probably still part of it in other areas?
    Still did not work. Then I uninstalled PS 5.5 extended. Reinstalled to find it the same as before. All preference etc the same and a blank cach document show up in Bridge, did this before too. It is like I never uninstalled it.
    What gives. How do I get a clean copy of PS?

    You're welcome. 
    hiking11 wrote:
    …do you know how to find the installer on a Mac so I can uninstall some of the Nik software…
    There is no such thing as a system wide uninstaller on a Mac.  Only a few select applications, like some of Adobe's, install an application-specific Uninstaller, e.g. in the Utilities folder of your root level ./Applications folder.  I have no idea if Nik provides such an uninstaller or not.
    hiking11 wrote:
    …Where you are have a Great Christmas season…
    Well, thank you.    Actually, I'm not that far from you in Northern California, some 100 miles NE of San Francisco.  My user ID, Tai Lao, is just a phrase that means Too Old in Mandarin, and my signature, Wo Tai Lao Le, 我太老了, just reads I am Too Old in Mandarin too,    Happy holidays to you too/
    Wo Tai Lao Le
    我太老了

  • Macbook pro stuck boots to "no bootable device found insert boot disk and press any key macbook," and at the same time, booting to the Startup Manager (holding option while booting) will not work either.

    Not only will holding Option while booting not work, but all of the other boot tricks (safe mode, single user mode, etc), will not work. I am at a loss. I also don't have an optical drive in this particular MBP. I have an SSD where it once was.

    I know you have tried other booting types, but have you tried booting into recovery mode? Cmd+R or internet recovery? By any chance have you recently deleted/resized/changed format to a partition? Even if it was not the main one? Have you installed third party applications that could have messed up your system files? Or some sort of RAID software, Fusion Drive etc.? All of this info will help us to pinpoint your issue quicker and help you. Any change you noticed before this happened (even if it seems small), that you consider worth telling us would be greatly appreciated.
    Also, do you have access to another Mac besides this one(preferably)? Or do you have access to a Windows computer (7 or 8 preferably)?
    Do you hear the chime before the message appears?

  • My HP LaserJet 1536 Scanner will not work after upgrading to Windows 10

    I just upgraded to Windows 10, and now the scanner will not work, although I can still print.  I downloaded the latest driver, but this does not seem to help.  The error message I get states that scanner communication cannot be established. Please let me know if you have any suggestions. Thanks!

    Greetings , I saw your post regarding the problems you are having with scanning after upgrading to windows 10.
    I would start with the simple, have you tried just restarting the computer? Have you made sure your computer has all of it's windows updates? How can I tell if my computer is up to date? Most products do have updated software available for Windows 10, did you install the correct driver?HP LaserJet Full Feature Software and Driver I've also seen a few posts that say the Windows 8.1 driver will work for Windows 10 as well, so you could try that too.  HP provides a free tool called HP Print and Scan Doctor to diagnose and resolve printing and scanning problems. I recommend downloading and running the HP Print and Scan Doctor, if it doesn't fix it automatically let me know what errors or messages you receive.  Do you know if you are able to scan using Paint? To Scan from Paint: HP Multifunction Printers - How to Scan: Windows 8 
    (It's the same for Windows 10, from what I've been told)Right-click the Start button () in the lower left corner of the screen, click Search, and then type ...Click Paint in the results.Click File, and then click From scanner or camera.Select your printer, click OK, and then click Scan.  Have you tried just using the New Scanner app in Windows 10? It's the same as the one for Windows 8. Here are some resources;New Scanner app in Windows 10Scan app for Windows: FAQ
    And a Video link...    Please let me know if any of these steps resolved your issue, or if there is anything else I can do to help.  I look forward to hearing from you!  Thanks, 

  • I had a repair done on my MacBook Pro and had to have a new hard drive installed. The Apple Auth Repair Shop then updated the OS from 10.6.8 to 10.7.5. Now my iPhoto v 9.2.3 will not open and it sounds like it will not work with this OS. Can you plea

    I had a repair done on my MacBook Pro and had to have a new hard drive installed. The Apple Auth Repair Shop then updated the OS from 10.6.8 to 10.7.5. Now my iPhoto v 9.2.3 will not open and it sounds like it will not work with this OS. Can you please advise?

    You may need many other updates to retain compatibility with Lion. I suggest you reinstall Snow Leopard. Unfortunately, you will need to erase the drive first. Be sure to backup your data if you haven't done so already.
    Clean Install of Snow Leopard
    Be sure to make a backup first because the following procedure will erase
    the drive and everything on it.
         1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
             with your computer.  Insert the disc into the optical drive and restart the computer.
             After the chime press and hold down the  "C" key.  Release the key when you see
             a small spinning gear appear below the dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, click on Options button
             and select GUID, click on OK, then set the format type to MacOS Extended
             (Journaled, if supported), then click on the Apply button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. After you finish Setup Assistant will complete the installation after which
             you will be running a fresh install of OS X.  You can now begin the update process
             by opening Software Update and installing all recommended updates to bring your
             installation current.
    Download and install Mac OS X 10.6.8 Update Combo v1.1.

  • Perifials will not work with Windows 7

    I have a new HP h8 1214 PC WiFi with Windows 7 installed.  My old HP ScanJet 4850 and my HP Personal Media Driove 1600 will not install. My previous operating system was XP. 
    I would like to install the ScanJet 4850 because it can send slides and film strips to my computer to be used in a slide show with Adobe Photoshop Elements and  Adobe Premiere. I have started a slide show of these items and did not get all of the slides transferred before my old computer conked out.
    I would like to use my Personal Media Drive for backup and it also has pictures I would like to be able to obtain.
    I don't know if perifials that are not WiFi will install on a WiFi computer.  Apparently not!
    Any help will be greatly appreciated,
    flyingjewel

    The reason the CD will not work is evident. The CD is for Windows 98,  XP Home or XP Professional.
    The WIN 7 64bit downloaded driver file is what you need. Download and install the driver.
    Here is a link  ( see pg 5 and 11) that discussed the power supply for a PMD drive, your's may vary. But you must have a power supply (modular plug with cord), or brick/adapter (has AC cord into power supply, then another cord that supplies DC).
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

  • Wireless drivers will not work properly in Win XP

    Hi,
    I have a late 2007 white macbook and when I got the computer then I immediately installed Windows XP so I could have Microsoft Office. When I did so I installed the Boot Camp Drivers from the Mac instal disc 1. It worked fine for about a year, I don't use Windows much at all except for maybe powerpoint and for some reason the wireless internet stopped working.
    I've tried reinstalling and repairing the drivers to no avail. Some of them like the iSight camera work and the eject button/ right click with two fingers.
    The gray diamond for Boot Camp that used to appear in the windows toolbar (bottom right corner) does not load anymore. I'm not sure why not. that's probably the problem but I used the same install disc I used the first time (reinstalled them twice now) and this time it will not work completely.
    Windows XP wireless utility does not recognize the signal, when you click "refresh network list" nothing happens....it doesn't even search.
    Finally I tried installing the third party driver from Broadcom which has a wireless utility. this utility at least recognizes my network but cannot connect. the log for the utility just keeps saying:
    "Initializing Wireless State Machine"
    The network conects fie to OSX and the three windows computers in my house....there is no protection.
    Thanks for the help!

    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    *http://kb.mozillazine.org/Websites_look_wrong
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • Aperture creating new version of image for each adjustment applied!

    To anyone out there who can sort this one out, I will be forever grateful! Here's the problem. I'll be jamming away in Aperture, adjusting photos like a madman. After adjusting a random number of photos (it usually varies between 5-30 photos or so af

  • Message in BPM

    Hello everyone, I have two diff  interfaces both are outbound Interfaces to which there is common i/P IDOC , Both the interfaces are using BPM. When we trigger an IDOC from background SAP system , Interface 1 completes successfully . But The iNterfac

  • How to add a character before formula values in BEx.

    Hi Guys, Can anybody please let me know how to add a character before result of a formula. Ex. formula is 10/30*100 I want to see in report 33.3 % thanks in advance peter b

  • Logic express 7.2.1

    Why can't I update to 7.2.1? Is it because I purchased 7.1.1? mac book 1.1 13" 1.83 Intel Core Duo   Mac OS X (10.4.7)   1.25 GB DDR2 SDRAM

  • IPhoto crashing after update to Mavericks 10.9.4, iPhone not detected

    Macbook Air got a Mavericks update 2 days ago.  Today I tried to import photos from my iPhone and couldn't - iPhoto keeps crashing on open.  Image Capture won't detect my iPhone (nor will iTunes) - but the phone charges just fine when connected to th