Solved

ORA-01008: not all variables bound

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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 …
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

813 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

10 Experts available now in Live!

Get 1:1 Help Now