Still can't get the procedure to compile and run
Sorry still having issues.
Here is the whole sql, but I seriously suspect the problem is in the beginning somewhere, with one of the declarations.
Any help would be appreciated. Since I can get this to run without a stored procedure ( all except the execute immediate statement ), then I assume my logic is ok, but as I said, something is wrong near the top.
Thanks ,
Floyd
The sql is:
spool proc.err
CREATE OR REPLACE PROCEDURE floydw.loadtable_config AS
i pls_integer ;
sql_stmt VARCHAR2(4000);
all_names VARCHAR2(4000);
all_names2 VARCHAR2(4000);
TYPE typ_coltab IS TABLE OF dba_tab_columns%ROWTYPE INDEX BY pls_integer;
coltab_table typ_coltab ;
coltab_table2 typ_coltab ;
coltab_rec dba_tab_columns%ROWTYPE ;
CURSOR cur is SELECT *
FROM dba_tab_columns where owner='GWSTAGING_SENTRYPROD' and table_name='CONFIG' ;
BEGIN
i := 0 ;
OPEN cur ;
LOOP
FETCH cur into coltab_rec ;
exit when cur%notfound ;
i := i+1 ;
coltab_table(i) := coltab_rec ;
coltab_table2(i).column_name := '"' || coltab_table(i).column_name || '"' ;
END LOOP;
all_names := NULL;
all_names2 := NULL;
FOR j IN 1 .. i
LOOP
all_names := all_names || ',' || coltab_table(j).column_name;
all_names2 := all_names2 || ',' || coltab_table2(j).column_name ;
END LOOP;
all_names := SUBSTR (all_names, 2); -- Remove ', ' from beginning of list
all_names2 := SUBSTR (all_names2, 2); -- Remove ', ' from beginning of list
sql_stmt := 'insert into ' || coltab_rec.table_name ||' (' || all_names || ') SELECT ' || all_names2 || ' FROM "config"@sentry_l ;' ;
--dbms_output.put_line ('executing ' || sql_stmt) ;
execute immediate sql_stmt ;
END;
If I try to create it as is, I get:
SQL> show errors
Errors for PROCEDURE FLOYDW.LOADTABLE_CONFIG:
LINE/COL ERROR
7/3 PL/SQL: Item ignored
7/31 PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declared
10/14 PL/SQL: Item ignored
10/14 PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declared
11/18 PL/SQL: SQL Statement ignored
12/8 PL/SQL: ORA-00942: table or view does not exist
18/5 PL/SQL: SQL Statement ignored
18/20 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
21/5 PL/SQL: Statement ignored
LINE/COL ERROR
21/24 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
22/5 PL/SQL: Statement ignored
22/22 PLS-00487: Invalid reference to variable
'DBA_TAB_COLUMNS%ROWTYPE'
30/7 PL/SQL: Statement ignored
30/56 PLS-00487: Invalid reference to variable
'DBA_TAB_COLUMNS%ROWTYPE'
LINE/COL ERROR
31/7 PL/SQL: Statement ignored
31/61 PLS-00487: Invalid reference to variable
'DBA_TAB_COLUMNS%ROWTYPE'
37/3 PL/SQL: Statement ignored
37/33 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
Hi Floyd,
fwellers wrote:
Frank,
Does something in the compile errors I sent ( below again ), lead you to believe there is a permission issue ?
LINE/COL ERROR
7/3 PL/SQL: Item ignored
7/31 PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declaredYes. "PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declared" is the error you would get if you tried to say
TYPE typ_coltab IS TABLE OF dba_tab_columns%ROWTYPE INDEX BY pls_integer;wihtout privileges on dba_tab_columns.
The line above appears to be line 7 of your code.
"dba_tab_columns" appears to start in postion 29 (not 31) of that line, but you didn't post your code inside tags, so 2 characters of whitespace could easily have gotten lost in the posting.
Similar Messages
-
I am trying to download a book on my ipad. It says I need to install itunes. I have itunes already. I frequently get a message to re-install itunes. I do, but I still get the message, and I still can't get the book on my ipad.
you can download a new installer and serial number from Adobe at Adobe - CS2 Downloads
-
Firstly, I can't open iPhoto on my macbook as of a few days and could it have anything to do with a problem I have updating my iPhone's software as I've downloaded extra iCloud storage but I still can't get the iPhone to recognise the space for software
No. With the amount of information you've provided it's impossible to offer a potential solution. We can't see your computer so we need to know the details of your problem and setup, i.e.:
what version of iPhoto are you using?
what system version are you running?
what do you see when iPhoto opens?
what fixes have you tried?
where is your library located?
did you apply any updates or upgrades just prior to the problem occurring?
are you running a "managed" or "referenced" library?
what type of Mac?
how much free space on your boot drive?
For the iPhone issue ask in the iPhone forum.
OT -
I downloaded a film from ITunes in HD and had problems, I upgraded to the latest version of ITunes and have then downloaded the film again in SD on my Windows 7 computer, but I still can't get the film to play, any idea's what to do next?
I've been working at the same problem for hours now and it's really driving me crazy so any help would be greatly appreciated.It is working now. I no longer get the message about the item not being available in the US and I can access the store.
-
Just downloaded latest updates to Camera Raw for use with my new Sony RX100 M3 but still can't get the RAW files to open. Any suggestions?
Never mind, I finally got it working, thanks!
-
Hello - can anyone tell me why my iPad (4th Gen) screen will no longer rotate. I don't have a screen lock symbol next to the battery icon. I have the rotate icon on my desktop but still can't get the screen to rotate.
Double-click the Home button and swipe Task Bar to the right. Check the Rotation Lock on the far left of Task Bar.
http://i1224.photobucket.com/albums/ee374/Diavonex/ba23c598623fe4fd062a40e349af2 18d.jpg -
I have downloaded an audio talk from Audio Audible, and have authorised my computer to for my Audible Account, yet I still can't get the computer to play the download.
The apps I currently have are for the i phone and i pad but i would like to see this on this computer
On the Mac Air launch iTunes. Then connect either the iPad or iPhone.
Select the iPad or iPhone under Devices left side of the iTunes window in the source list.
Then select Apps from the menu on the right.
If you don't see the apps listed there, from your iTunes menu bar (top of your screen), click Store > Authorize This Computer.
See if that makes a difference... -
I got my iphone to start sending emails, but still can't get the ipad to do so.
You should take it right back to the Genius Bar. After they fix or replace it, make sure you can text, call and use all the functions before you leave the store.
-
I upgraded my Yahoo IM and after it uploaded, my homepage went from Firefox to the Yahoo homepage and I cannot get the Firefox homepage to come up. I have tried to reinstall Firefox, but the Yahoo homepage still comes up. How can I get the yahoo page off and get the Firefox page back on?
Here are instructions to [[How to set the home page#w_restore-the-default-home-page|restore the default home page]].
-
My MacBookPro has a white screen with a grey file folder in the center of the screen with a white question mark blinking in it. What does this mean? And how can I get my computer back up and running normal?
Start up in Safe Mode.
http://support.apple.com/kb/PH14204?viewlocale=en_US
Repair Disk.
http://support.apple.com/kb/PH5836
Reset PRAM.
http://support.apple.com/kb/PH14222 -
Can I get the Requisition Submitted Date and Time in Emails
Can I get the Requisition Submitted Date and Time in Emails
Hi,
Is there a way to get Requisition submitted Date and Time in Service Initiation Emails.Unfotunately, there is not a namespace that will return Submitted Date for a requisition or service. You can, however, get the start date:
#Requisition.StartedDate# or #Service.Requisition.StartedDate# -
My iPad2 side switch is acting up, it will only allow me to have either sound or rotate. If I unmute the rotate won't work, if I mute the rotate works. How can I get the iPad to unmute and rotate? I have restored, downloaded updates and rebooted.
You should be able to control the function that the side switch isn't controlling via the left-hand end of the taskbar : http://support.apple.com/kb/HT4085 - is the icon that appears there (notification mute or rotation lock) indicating that that function is 'off' ?
-
Can i get the iphone from USA and get it unlocked in India
can i get the iphone from USA and get it unlocked in INdia
No. Any locked phones purchased in the US cannot be unlocked.
You can just buy an unlocked phone direct from Apple in the US, but only if you are physically in the US.
Also, note that your warranty will only be valid in the US. -
I have tried to reindex my messages but I still can not get the search function to work in email
I have tried reindecing my messages by rebuilding the library but I still can't get my message function to work in mail. Any proposed solutions much appreciated.
Some of your user files (not system files) have incorrect permissions or are locked. This procedure will unlock all your user files, reset their ownership, and remove their access-control lists. If you've set special values for those attributes, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
Back up all data.
Step 1
If you have more than one user, and the one in question is not an administrator, then go to Step 2.
Enter the following command in the Terminal window in the same way as before (triple-click, copy, and paste):
{ sudo chflags -R nouchg,nouappnd ~ $TMPDIR..; sudo chown -R $UID:staff ~ $_; sudo chmod -R u+rwX ~ $_; chmod -R -N ~ $_; } 2>&-
This time you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
Step 2 (optional)
Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
Start up in Recovery mode. When the OS X Utilities screen appears, select
Utilities ▹ Terminal
from the menu bar. A Terminal window will open. In that window, type this:
res
Press the tab key. The partial command you typed will automatically be completed to this:
resetpassword
Press return. A Reset Password window will open. You’re not going to reset a password.
Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
Select your username from the menu labeled Select the user account if not already selected.
Under Reset Home Directory Permissions and ACLs, click the Reset button.
Select
▹ Restart
from the menu bar. -
I can't get the Fennic-2 build of Firefox installed on my Backflip (Motorola). I've updated my software to Android 2.1, beta 3 (build of j_r0dd). Any suggestions/
Sorry, Firefox 4 beta is not compatible with the Motorola Backflip.
For more details, and experimental (unoptimized) nightly build that might work with the Backflip, see:
https://wiki.mozilla.org/Mobile/Platforms/Android
Maybe you are looking for
-
HP 5510 wil not print in black ink after installing a new black ink cartridge
My HP 5510 printer will not print in black ink after installing an official HP black ink cartridge. I see other people have had the same problem. I have gone through all the troubleshooting suggestions. I would like to know if anyone has been abl
-
Satellite Pro P200-HD: How to use it with Win XP
I recently got the new Satellite Pro P200 HD from Getech. I asked Getech to change the OS to XP because my university will not support Vista. I was told that some of the functionality will be lost with XP, such as the hot key utility and I accepted t
-
How do i import and convert movies from my Sony DCR-SR40?
is there a qay to do this?
-
Landing page Action is called twice for single submit
I am having submit action in Anonymous page,while iam clicking that button it calls the action only once. but in the same thing is act different in Landing page,here it's calling the action twice.iam using portal server 6.1 and also iam doing custom
-
Can You Listen FOR while AS does something else too?
Play and control the playing of a QT movie while also listening with Speech recognitionServer to some word from the user. i heard AS cant multithread.......