473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

how to solve this errors

Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE TRIGGER TEMP_CUST
  2.        AFTER INSERT ON TEMP_CUSTOMER REFERENCING
  3.        NEW AS NEW OLD AS OLD FOR EACH ROW
  4. DECLARE
  5.     v_count               NUMBER(5)  := 0;
  6.     v_cust_id             NUMBER(10) := 0;
  7. BEGIN
  8.     SELECT COUNT(*) INTO v_count FROM vfone.MOBILE WHERE MOBILE.mobile_no = :new.mobile_no;
  9.     -- When Mobile No is NOT found in Mobile Table means New Customer
  10.  
  11.     IF v_count = 0 THEN
  12.        SELECT MAX(NVL(CUSTOMER_ID,0) + 1) INTO v_cust_id FROM crimes.MOBILE where mobile.mobile_no= :new.mobile_no;
  13.     -- CUSTOMER_ID, SP_CUST_ID, PLAN, NAME, ADDRESS_1, ADDRESS_2, CITY, PIN, CUST_DATE
  14.        INSERT INTO crimes.CUSTOMER
  15.               VALUES(v_cust_id, :NEW.sp_cust_id, :NEW.PLAN, :NEW.NAME, :NEW.address_1,:NEW.address_2, :NEW.city, :NEW.pin, :NEW.cust_date, :NEW.mobile_no);
  16.        INSERT INTO crimes.MOBILE VALUES (:NEW.mobile_no, NVL(v_cust_id,0), '');
  17.     END IF;
  18.  
  19.     IF v_count > 0 THEN        -- Update Customer Data into Customer Table
  20.        UPDATE crimes.CUSTOMER SET
  21.           SP_CUST_ID = :NEW.sp_cust_id,
  22.           PLAN = :NEW.PLAN,
  23.           NAME = :NEW.NAME,
  24.           ADDRESS_1 = :NEW.address_1,
  25.           ADDRESS_2 = :NEW.address_2,
  26.           CITY = :NEW.city,
  27.           PIN = :NEW.pin,
  28.           CUST_DATE = :NEW.cust_date
  29.           where crimes.CUSTOMER.customer_id = :new.customer_id;
  30.     END IF;
  31. END;
  32. /
and the errors is
Expand|Select|Wrap|Line Numbers
  1. SQL> show errors;
  2. Errors for TRIGGER TEMP_CUST:
  3.  
  4. LINE/COL ERROR
  5. -------- ------------------------------------------------
  6. 5/77     PLS-00049: bad bind variable 'NEW.MOBILE_NO'
  7. 9/107    PLS-00049: bad bind variable 'NEW.MOBILE_NO'
  8. 14/41    PLS-00049: bad bind variable 'NEW.MOBILE_NO'
can any one correct this problem.
Aug 4 '10 #1
2 1864
amitpatel66
2,367 Expert 2GB
Can you describe your mobile table. I think the column name mobile_no is incorrect.
Aug 4 '10 #2
ya thanks...
i have solve it after i posted it to this site.In my temp_customer table there the mobile_no column was missing.
so i altered that table and it started working.
anz thanks for ur kind reply sandip
Aug 4 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
102
by: Skybuck Flying | last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C compilers produce so many error messages as soon as a closing bracket is missing. The response was simply because the compiler...
3
by: walkeraj | last post by:
I'm trying to compile an open source game called IVAN , and I'm able to compile it from a makefile, but not from an IDE. I have attempted to recreate the way the makefile compiles the project as...
1
by: dhina.jayavelu | last post by:
Hi, I Executed my project Developed in "C" with Valgrind tool with memory check option it shows these errors i don't know how to solve these errors.After getting these errors i try to put free()...
1
by: shivoshea | last post by:
Using the upsizing wizard to migrate an Access database to SQL Server has caused me some problems, I was wondering if any one could help me out with what these errors mean and how i could solve...
3
by: thalinx | last post by:
Hi can ayone help me with this program, cause i dont know how to solve the compiling errors here. thanks # include<stdlib.h> # include<conio.h> # include<stdio.h> # define MAXCADENA 8 # define...
6
by: andrey.vul | last post by:
The error is LNK2001: unresolved external symbol "protected: static bool solver<typename, typename, int, int, int, int, int>::solution" (<vc++ mangled name>) Code (sudoku.cpp): // Sudoku.cpp :...
2
by: Manikandan | last post by:
Hi, I have a program written in .Net Framework 1.1 using Visual studio enterprise edition 2003. I tried compiling the same program in visual c# express edition 2005. I'm getting following...
1
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but...
9
by: Keith G Hicks | last post by:
I'm having a lot of trouble with "file in use" errors in my "folder watcher" project. Starting and stopping the watcher and reading my XML file work fine. Once the watcher is started, I'm reading...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.