Solved

ORA-01008: not all variables bound

Posted on 2011-03-23
3
675 Views
Last Modified: 2012-05-11
Hello all;
the select stm work but when we try to use it an insert we get
ORA-01008: not all variables bound


variable vCA_MONTH    VARCHAR2(20 BYTE);
variable vCA_YEAR     VARCHAR2(20 BYTE);
variable vCreateby   VARCHAR2(20 BYTE);
variable vmodby      VARCHAR2(20 BYTE);
variable vBeginDate   varchar2(11);
variable vEndDate     varchar2(11);



EXEC :vCA_MONTH    :='January';
EXEC :vCA_YEAR     :='2010';
EXEC :vCreateby    :='aschema';
EXEC :vmodby       :='aschema';
EXEC :vBeginDate   :='01/01/2010';
EXEC :vEndDate     :='01/31/2010';

--'MM/DD/YYYY'

INSERT /*+ append*/
      INTO aschema.CA_REPORTING (dealer_NUMBER,
                               review_NUMBER,
                               provname,
                               kh_Total,
                               kh_start,
                               ca_month,
                               ca_year,
                               Z_CREATE_DATE,
                               Z_CREATED_BY,
                               Z_MODIFIED_BY,
                               Z_MODIFIED_DATE)
   SELECT   DISTINCT tm.provid AS dealer_NUMBER,
                     CB.review_NUMBER,
                     tm.provname,
                     qq.kh_Total AS kh_Total,
                     CB.kh_start AS kh_start,
                     :vCA_MONTH AS ca_month,
                     :vCA_YEAR AS ca_year,
                     SYSDATE,
                     :vCreateby,
                     :vmodby,
                     SYSDATE
     FROM   cschema.p01_tblmaster tm,
            bschema.pacs_review pp,
            bschema_reports.CA_start CB,
            (  SELECT   provid,
                        TO_CHAR (SUM (total), '99999999999.00') AS kh_Total
                 FROM   cschema.ordereview
                WHERE   billing_date BETWEEN TO_DATE (:vBeginDate,
                                                      'MM/DD/YYYY')
                                         AND  TO_DATE (:vEndDate, 'MM/DD/YYYY')
             GROUP BY   provid) qq
    WHERE       tm.provid = pp.dealer_number
            AND tm.provid = qq.provid(+)
            AND CB.dealer_NUMBER = PP.dealer_NUMBER
            AND CB.dda_start IS NULL
            AND CB.kh_start IS NOT NULL
0
Comment
Question by:it-rex
  • 2
3 Comments
 
LVL 11

Author Comment

by:it-rex
ID: 35201141
looks like a TOAD issue sqlplus is running fine!
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 35201333
>>looks like a TOAD issue sqlplus is running fine!

I'm glad to hear that.  I've been trying to find where the error is since you asked.

I'm not a Toad person but I believe there is a section that will 'execute as script' that should allow this to run.
0
 
LVL 11

Author Comment

by:it-rex
ID: 35201619
slightwv it is a bug with ,my TOAD,
even if you run as a script!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql query 5 68
Oracle Next Available Number 2 31
Export table into csv file in oracle 10 41
How to free up undo space? 3 26
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now