If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Store Proc return no value

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-08-09, 10:52
alvincks alvincks is offline
Registered User
 
Join Date: Mar 2004
Posts: 74
Store Proc return no value

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 !
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On