473,394 Members | 1,774 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,394 software developers and data experts.

Trigger & error #1329 No data - zero rows fetched, selected, or processed

Hi
I've a problem with trigger
Expand|Select|Wrap|Line Numbers
  1. CREATE TRIGGER `jos_vm_shopper_group_after_upd_tr` AFTER UPDATE ON `jos_vm_shopper_group` FOR EACH ROW
  2. BEGIN
  3. DECLARE orgPrice DECIMAL(9,5);
  4.      DECLARE newPrice DECIMAL(9,5);
  5.      DECLARE proId int;
  6.      DECLARE cur CURSOR FOR SELECT product_price,product_Id FROM jos_vm_product_price as t1 WHERE shopper_group_id=5;
  7.  
  8.  
  9. IF (NEW.shopper_group_id=6) THEN
  10. OPEN cur;
  11.      LOOP
  12.      FETCH cur INTO orgPrice,proId;
  13.      SET newPrice=((orgPrice*100)/(100-NEW.shopper_group_discount));
  14.  
  15.      UPDATE jos_vm_product_price AS t3 SET product_price=newPrice WHERE shopper_group_id=6 AND t3.product_id=proId;
  16.  
  17.      END LOOP;
  18.      CLOSE cur;
  19. END IF;
  20. END
trigger works but i get an error #1329 - No data - zero rows fetched, selected, or processed

Can someone help me?

MySQL v.5.1.54
May 31 '12 #1
2 4064
Rabbit
12,516 Expert Mod 8TB
If there's an error, then it's not working right?

Is your cursor supposed to use shopper group id 5 while the rest uses 6?
May 31 '12 #2
@Rabbit
ad1. Despite the fact it is a error UPDATE performed correctly
ad2. cursor takes the old price, rest update new price for other group
Jun 1 '12 #3

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

Similar topics

3
by: lkrubner | last post by:
Suppose I make a call to MySql and zero rows come back. How do I tell the difference between zero rows and failure?
4
by: Maddman | last post by:
Hello all. SQL 2000 newbie here. I've done a lot of development in Access, but the limitations of that program have me looking at upsizing to SQL 2000. In my current project I need to import...
6
by: yoohanman | last post by:
Hi, I have a select statment that correctly returns zero rows at times. I would like to be able to return the value 0 (a single row with the value 0) whenever the logic returns zero rows. ...
2
by: astro | last post by:
I got a message from a client. They tried to import some data into an Access application and got the following error: "The field is too small to accept the amount of data you attempted to add....
0
by: John Smith | last post by:
This is what I am trying to do: <asp:datagrid id="DataGrid1" runat="server" AutoGenerateColumns="False"> <Columns> <asp:BoundColumn Visible="False" DataField="id" ReadOnly="True"...
2
by: Curious Trigger | last post by:
Hello, if have an asp.net web page with a detailsview. This detailsview uses a sqldatasource connecting to a sql server 2005 database with a select statement simliar to this one: SELECT...
2
by: wugon.net | last post by:
Problem: after inser trigger encounter error sql0348 Env:db2 v8 + fp 13 + win xp Description: we build two after insert triggers DB2.TRG1, DB2.TRG2 on base table DB2.TEST1, insert data into...
5
by: Bruno Rafael Moreira de Barros | last post by:
function test1() { trigger_error('My error'); } application.php //code... test1(); //code...
4
by: getmeidea | last post by:
Hi all, I have run a batch file contains, mysql -uroot -proot -Dsample_db < "create_sp.sql" The "create_sp.sql" file contains definition for the stored procedure by the name...
1
by: preejith | last post by:
Error Code : 1329, No data - zero rows fetched, selected, or processed. MYSQL I am getting the following error while running a stored procedure in mysql5.0 Error Code : 1329 No data - zero rows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.