tonelm54
asked on
Creating a function to remove - from uuid
Good evening,
Ive been playing around with a function, which removes the - from the uuid() statment.
And then call it like
However everytime I try the above code I get an error similar to:-
Any suggestions on what Ive messed up with would be appriciated!
Thank you
Select uuid2();
Ive been playing around with a function, which removes the - from the uuid() statment.
delimiter //
CREATE FUNCTION uuid2()
RETURNS STRING
DETERMINISTIC
BEGIN
DECLARE strUUID STRING;
SET strUUID = REPLACE(uuid(),"-","");
return strUUID;
END//
delimiter ;
And then call it like
select uuid2();
However everytime I try the above code I get an error similar to:-
ERROR: Unknown Punctuation String @ 11
STR: //
SQL: delimiter //
Any suggestions on what Ive messed up with would be appriciated!
Thank you
Select uuid2();
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.