select query cannot execute in cursor

Posted by Gow.Net under Sql Server on 3/4/2013 | Points: 10 | Views : 1928 | Status : [Member] | Replies : 6
hi
i am using backend as mysql server . In that i am using stored procedure and cursor but her my select query cannot execute for last record in table .here attach my code
i have table in three record when execute the procedure only two record execute
SELECT tech_type INTO check_type1  FROM vendor_tech  WHERE tech_type ='CORE' AND v_id=current_vendor_id;
SELECT tech_type INTO check_type2 FROM vendor_tech WHERE tech_type ='FRONTEND' AND v_id=current_vendor_id;
SELECT tech_type INTO check_type3 FROM vendor_tech WHERE tech_type ='FRONTEND' AND v_id=current_vendor_id;

when i remove INTO check_type1, INTO check_type2 , INTO check_type3 this option execute all record please give me a solution to solve this

gowthaman8870226416


Responses

Posted by: Vuyiswamb on: 3/6/2013 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Do you want to create 3 tables or you want to combine the data into one table ?

Thank you for posting at Dotnetfunda
[Administrator]

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sailajareddy on: 3/8/2013 [Member] Starter | Points: 25

Up
0
Down
gone thru the code. I did not find any mistake.
verify if you have 3 records in the table or not.
As I work in SQL SERVER , if u face scenario like this , we just write SELECT statements where ever required , to catch the error line.

So Try to write some select / print statement (in mysql) in the middle , to verify where it is failing.

@jayakumar - I have modified my response. Thanks for informing.

SailajaReddy

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 3/8/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
sailajareddy

this is my sql issue so can u put this Query in My Sql .

Mark as Answer if its helpful to you

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gow.Net on: 3/11/2013 [Member] Starter | Points: 25

Up
0
Down
hi Jayakumars i am using mysql only pa

gowthaman8870226416

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 3/11/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

Gow.net

tell me what is ur Requirement for this Query.

Mark as Answer if its helpful to you

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 3/12/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

gow.net

what is ur requirement for this Query?

Mark as Answer if its helpful to you

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response