MySQL Forums
Forum List  »  Triggers

Re: Creating a trigger to search in another table...
Posted by: Rick Langley
Date: March 20, 2006 11:06PM

Thanks a bunch Rene van Geijn.

It is now letting me create the Trigger.

When I now try to insert data into the DATATABLE it brings up the error:
"ERROR 1329 (02000): No data to FETCH"

mysql> SELECT *
-> FROM GRIDTABLE;
+--------+---------+---------+----------+---------+
| title | lathigh | latlow | longhigh | longlow |
+--------+---------+---------+----------+---------+
| Area A | -20.000 | -21.000 | 32.000 | 31.000 |
| Area B | -21.000 | -22.000 | 32.000 | 31.000 |
| Area C | -22.000 | -23.000 | 32.000 | 31.000 |
| Area D | -23.000 | -23.500 | 32.000 | 31.000 |
| Area E | -20.000 | -21.000 | 33.000 | 32.000 |
| Area F | -21.000 | -22.000 | 33.000 | 32.000 |
| Area G | -22.000 | -23.000 | 33.000 | 32.000 |
| Area H | -23.000 | -23.500 | 33.000 | 32.000 |
+--------+---------+---------+----------+---------+
8 rows in set (0.01 sec)

mysql> SELECT *
-> FROM DATATABLE;
+-------+----------+--------------+-----------+------------+-------------------+

| ID | latvalue | NorthOrSouth | longvalue | EastOrWest | Title |

+-------+----------+--------------+-----------+------------+-------------------+

| 00001 | 20.30 | S | 31.20 | E | No title inserted |

+-------+----------+--------------+-----------+------------+-------------------+

1 row in set (0.00 sec)

mysql> INSERT INTO DATATABLE (ID, latvalue, NorthOrSouth, longvalue, EastOrWest,
Title)
-> VALUES (00002, 20.5, 'S', 31.5, 'E', 'Banana');
ERROR 1329 (02000): No data to FETCH
mysql>


This should output a new title of "Area A" shouldn't it?

Any ideas?

Q. What is big and has no (inter)-face?

A. My database.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Creating a trigger to search in another table...
2070
March 20, 2006 11:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.