Solved

ORA-01008: not all variables bound

Posted on 2011-03-23
3
689 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 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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

828 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