Hi All,

i try to use temporary table but the store proc keep showing me no result which i have pretty sure the select statement have records.

Code:
DELIMITER $$

DROP PROCEDURE IF EXISTS `travel`.`spTagLine2`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `spTagLine2`()
BEGIN
	
DECLARE STR_LENGTH INT(3); 
DECLARE T_LENGTH INT(10);
DECLARE DONE BOOLEAN default 0;
DECLARE TAGLINE VARCHAR(100);
DECLARE DELIMITER_STR VARCHAR(1);
DECLARE COUNT_TEST INT(2); 
DROP TABLE IF EXISTS TBL_TAG;
CREATE TEMPORARY TABLE TBL_TAG 
(
	tag_length INT(3),
	tag varchar(100) NULL
); 	
INSERT INTO TBL_TAG
SELECT CHAR_LENGTH(Tagline), Tagline FROM travel.tbl_photo
WHERE Tagline IS NOT NULL;	
SELECT * FROM TBL_TAG;
	
END$$

DELIMITER ;
When i try to query
SELECT CHAR_LENGTH(Tagline), Tagline FROM travel.tbl_photo
WHERE Tagline IS NOT NULL;
it give me some result , but when i try to call using store proc, there have no data.

Anyone have idea what's wrong on this store proc ? FYI, i using MySQL 5.0

Thank you !