MySQL Forums
Forum List  »  Stored Procedures

Re: Help - variable removing leading "0" in stored procedure
Posted by: John Constantine
Date: January 12, 2006 05:13AM

Sorted!!!

The problem isn't with the procedure at all.....

It was my own fault,

When calling the procedure I WAS doing this :

mysql> call P1(01234567890)//
+------------+
| @x |
+------------+
| 1234567890 |
+------------+
1 row in set (0.00 sec)

The answer was to explicitly specify the data, like so :

mysql> call P1('01234567890')//
+------------+
| @x |
+-------------+
| 01234567890 |
+-------------+
1 row in set (0.00 sec)

I triggered onto this when I did a selct on the original variable "p" within the procedure, and saw that no matter what I did it still got passed without the 0, so the user variable was never going to work.

Still, got there in the end.

Thanks

JC

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Help - variable removing leading "0" in stored procedure
1246
January 12, 2006 05:13AM


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.