Hi DB People,
I have a stored procedure that converts a specific id into another format (some conditions and bit-wise operations). Now I need to put this in a SELECT statement.
I'm not sure how to do it other than make an INOUT parameter and then use that variable in the SELECT.
The SP converts this: EP001234561234 to something like 1234567
I searched google and wasn't able to do this:
or any variation there of.
Right now my SP outputs that single integer ID.
Let me know what my options are! Thanks a whole bunch guys,
Dan
I have a stored procedure that converts a specific id into another format (some conditions and bit-wise operations). Now I need to put this in a SELECT statement.
I'm not sure how to do it other than make an INOUT parameter and then use that variable in the SELECT.
The SP converts this: EP001234561234 to something like 1234567
I searched google and wasn't able to do this:
Code:
SELECT field1, field2 FROM myTable WHERE field1 = CALL mySP("SP001234560000");
Right now my SP outputs that single integer ID.
Code:
CALL mySP('EP003876510246'); +-----------+ | SomeID | +-----------+ | 134605379 | +-----------+ 1 row in set (0.00 sec)
Dan
Comment