Little problem.............two days trying to find the error

November 30 0
Advertisement
hey people, I am trying to get two values of two different tables, at put it in one that link both of them, I already have it working, but I am trying to make it simpler and smaller.
create or replace procedure baba
var_a number,
var_b varchar2
AS
BEGIN
insert into bebe ( c, d)
select (c, d from table_c, table_d where table_c.a = var_a and table_d.b = var_b);
END;
I am trying to make two select within one and the insert the value directly to the third table. three days on this.
When I compile it gives me the error that misses one bracket, weird.
Thanks.
Advertisement
Welcome to OTN. ;)
Always mention your DB version.
Now, regarding your question - why do you need to implement this using Procedure when a single DML will suffice?
Always, ask yourself about whether you should implement it using SQL or PL/SQL.
In general, try to achieve using SQL. If you can't then only go for PL/SQL.
Now,
create or replace procedure baba
var_a number,
var_b varchar2
AS
BEGIN
insert into bebe ( c, d)
select c, d
from table_c, table_d
where table_c.a = var_a
and table_d.b = var_b;
END;So, those braces i've removed.
It should work.
N.B.: Not Tested...
Regards.
Satyaki De.
Added: Also you need to use join condition between the two table - otherwise it will produce curtesian product. ;)
Edited by: Satyaki_De on Feb 20, 2010 10:54 PM
I am having a problem opening pdf document.  I get error message: "Adobe Reader has stopped working"

I am having a problem opening pdf document.  I get error message: "Adobe Reader has stopped working" then I get Windows is looking on line for a solution, but then my document closes. I tried uninstalling and reinstalling Adobe Reader XI, reboot

Problem: Failed to open the connection. Error Code 0x800002F4 (-2147482892)

Problem: Failed to open the connection. Error Code 0x800002F4 (-2147482892) This is on two (2) separate machines. These are NEW INSTALLATION development work stations (laptops). One is Vista (Visual Studio 2008 / Crystal Reports 2008), and the other

Error message in .docx : 'Open XML file cannot be opened because there are problems with the contents. Details Unspecific error Location: 2'

I have put a lot of work into a docx document on my Mac, but now can't open it as it gives the error message: 'the Open XML file cannot be opened because there are problems with the contents. Details, Unspecific error, Location: 2' When opening the o

Adobe CS4 won't open "An unexpected and unrecoverable problem has occurred because of a disk error.

Photoshop CS4 will not open, when I try and open it I get "An unexpected and unrecoverable problem has occurred because of a disk error. Photoshop will now exit." Bridge is working fine?No reset window came up it get's as far as initializing and

Photoshop suddenly does not print to Epson 3880 - PROBLEM: Cannot print from Photoshop  After restart error message appears:  - "There was an error opening your printer. Printing functions will not be available until you have selected a printer and reopen

PROBLEM: Cannot print from Photoshop After restart error message appears: - "There was an error opening your printer. Printing functions will not be available until you have selected a printer and reopened any documents." • All print commands ar

Problem to configure Blink Pro (App). Error SSL certificate verification error (PJSIP_TLS_ECERTVERIF) (503)

Problem to configure Blink Pro (App). Error SSL certificate verification error (PJSIP_TLS_ECERTVERIF) (503)Hi, William My question is if you can help me and support me to configure the Blink Pro App, I have a Mac Book Air, OS X 10.9.1. hope for your

I am having Macbook Pro, I have recently tried updating my operating system to OS Yosemite, but after that its giving problem in connecting to Wifi. The error is "Connection Time out Occurred". Its getting connected by Ethernet cable.

I am having Macbook Pro, I have recently tried updating my operating system to OS Yosemite, but after that its giving problem in connecting to Wifi. The error is "Connection Time out Occurred". Its getting connected by Ethernet cable.Take each o

There is problem loading the outline into the memory, error # 1,250,005

Hello, I am getting error message when opening ASO outline on edit mode in EAS 7.1.5 version. EAS server using weblogic and MYSql. Error Message: There is problem loading the outline into the memory, error # 1,250,005. Please let me know if any have

Hi I am using MAC OS Yosemite10.10.3 and I have a problem to update my photoshopCC cause of error U43M1D204 eventhough I have deleted AAm Updater/1.0/ but It still not worked.  How can I fix it.

Hi, I am using MAc OS 10.10.3 and I have a problem to update my photoshopCC because of error U43M1D204.  I have deleted AAm Updater/1.0/ but it still not worked.  How can I fix it please help.I too have only recently encountered this problem. I have

I am having a problem opening pdf files.  I get an error message saying   a problem has occurred with the licensing of this product. Restart your computer and re-launch your product. If this problem still occurs after restarting ... error code:213:19  Can

I am having a problem opening pdf files.  I get an error message saying a problem has occurred with the licensing of this product. Restart your computer and re-launch your product. If this problem still occurs after restarting ... error code:213:19Hi

Apple Logo and Progress Bar Stuck 1 out of 5 while Restoring my iPhone 5 to iOS8. How can i Do for This Problem. Sometime iTunes say An Unknown error occured (error -14)

Apple Logo and Progress Bar Stuck 1 out of 5 while Restoring my iPhone 5 to iOS8. How can i Do for This Problem. Sometime iTunes say An Unknown error occured (error -14) iTunes Version is 11.4The error that you are seeing has to do with your Internet

I'm having problems with a message that says: An error occurred while Attempting to create the directory: C:/program files/itunes/cd configuarion

I know this is a long story, but I'll be damned if I'm not going to get the most specific help I can (as Apple seems to specialize in assuming user error for all its demonic software). I've never had issues with iTunes before (barring a "Connect to i

Problem with Home Sharing.  Getting the error "The Requested URL was not Found on this Server"

I recently purchased an iPhone 5.  As I do with all of my AppleTVs, iPads, iPods and an iPhone 4 in my home, I connected the 5 to my home network and accessed the shared video library using home sharing.  My iTunes library is roughly 85% iTunes purch

Problem with Drive Encryption for HP ProtectTools - Error EE050014

Hello! I have a problem with starting up my HP. I am using a HP Probook 4530s, have had it for approximately 2 years now - this is a new problem that has never occured before. On startup, after swiping my finger/entering the password at the HP Protec

Problem with extract huge data in WEBI (Errors:WIO 30280 and ERR_WIS_30270)

Hi gurus, need your help. When we run the query for the report we get an error in Web Intellegence . This error may be two types. And their rotation occurs randomly. First error: There is no memory available. Please close document to free memory (WIO

I am receiving a "Problem loading page (The connection was reset)" error when I open certain websites. Sometimes I can only open the homepage and not the log in section for a website, othertimes the other way around.

Amongst other things, I've updated all Firewalls to grant Mozilla access, rebooted the computer, checked your FAQs but I am now running Trend Micro Titanium Internet Security (not the original Trend Micro, which your FAQ is out-of-date for anyways) a

Internal error 500 keeps coming up when I open Firefox. I tried uninstalling it and reinstalling it, but that did not solve the problem. How can I fix this error

a message of 500 internal error comes up when I open up Firefox and I cannot do anything. How can this problem be solved? I cannot use Firefox, so I have uninstalled it because it does in work on my computer, but it does work on my desktop and other

LiveCam.exe has encountered a problem and needs to close. Constant Error. HELP PLEASE

Alright so basically, my parents got a buy-one-get-one-free offer on webcams at christmas, and so they gave me one for my own as i lost my old one. Everything was working fine, seemed like a great camera. However, randomly one evening when i tried to

Problem with dsc shared shared variables and error 1950679023

I'm having trouble using shared variables on my laptop PC (with Windows XP) using Labview 8.2 and DSC.   I've set up a simple project with one VI and one shared variable library.  In the VI, I have  a while loop that writes a number from a front pane

Problems with remote control and user accounts - error 1759?

We're running: -XP Pro SP2 clients with Zen SP1 IR3a agent, 4.91 SP2 Netware client. -We are NOT running Middle Tier. -Novell servers are running Netware 6.5 SP7, E-directory 8.7.3.10b or 8.8. -Zen server is also SP1 IR3a. We have no problem using re