Solved

ORA-01008: not all variables bound

Posted on 2011-03-23
3
702 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Author Comment

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

691 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