Click here to Skip to main content
15,867,330 members
Home / Discussions / Database
   

Database

 
GeneralRe: large database Pin
Mycroft Holmes18-Jul-15 0:45
professionalMycroft Holmes18-Jul-15 0:45 
GeneralRe: large database Pin
V.18-Jul-15 8:25
professionalV.18-Jul-15 8:25 
GeneralRe: large database Pin
Jörgen Andersson20-Jul-15 11:01
professionalJörgen Andersson20-Jul-15 11:01 
AnswerRe: large database Pin
GuyThiebaut18-Jul-15 1:19
professionalGuyThiebaut18-Jul-15 1:19 
GeneralRe: large database Pin
V.18-Jul-15 8:23
professionalV.18-Jul-15 8:23 
GeneralRe: large database Pin
GuyThiebaut18-Jul-15 8:37
professionalGuyThiebaut18-Jul-15 8:37 
QuestionSQL Linq, updating multiple records Pin
jkirkerx15-Jul-15 10:50
professionaljkirkerx15-Jul-15 10:50 
QuestionSave value of PREPARE into a variable Pin
Jassim Rahma14-Jul-15 22:23
Jassim Rahma14-Jul-15 22:23 
Hi,

I have below code:
SQL
WHILE i < total_rows DO
    SET @param_employee_number = (SELECT employee_number FROM earned_leaves LIMIT i,1);

    PREPARE query_statement FROM 'CALL sp_populate_leave_summary(?)';
    EXECUTE query_statement USING @param_employee_number;

    -- UPDATE earned_leaves SET earned_leave = returned_by_EXECUTE
    SET i = i + 1;
END WHILE;

I want to save the value returned by the EXECUTE into a variable in order to use it in the next UPDATE statement.

How can I do this please?

Thanks,
Jassim[^]

Technology News @ www.JassimRahma.com

AnswerRe: Save value of PREPARE into a variable Pin
Wendelius14-Jul-15 22:45
mentorWendelius14-Jul-15 22:45 
GeneralRe: Save value of PREPARE into a variable Pin
Jassim Rahma15-Jul-15 22:22
Jassim Rahma15-Jul-15 22:22 
GeneralRe: Save value of PREPARE into a variable Pin
Wendelius15-Jul-15 22:51
mentorWendelius15-Jul-15 22:51 
AnswerRe: Save value of PREPARE into a variable Pin
jschell15-Jul-15 10:45
jschell15-Jul-15 10:45 
QuestionSome help with SQL to Linq Conversions Pin
jkirkerx13-Jul-15 7:04
professionaljkirkerx13-Jul-15 7:04 
AnswerRe: Some help with SQL to Linq Conversions Pin
Richard Deeming13-Jul-15 7:18
mveRichard Deeming13-Jul-15 7:18 
GeneralRe: Some help with SQL to Linq Conversions Pin
jkirkerx13-Jul-15 7:34
professionaljkirkerx13-Jul-15 7:34 
General[Got It] Pin
jkirkerx13-Jul-15 7:58
professionaljkirkerx13-Jul-15 7:58 
GeneralRe: Some help with SQL to Linq Conversions Pin
Richard Deeming13-Jul-15 8:00
mveRichard Deeming13-Jul-15 8:00 
QuestionSQL Linq, query and then take result to query again Pin
jkirkerx10-Jul-15 7:43
professionaljkirkerx10-Jul-15 7:43 
Answer[Solved] Pin
jkirkerx10-Jul-15 8:53
professionaljkirkerx10-Jul-15 8:53 
QuestionSELECT then INSERT data in a matrix way Pin
Farhad Eft9-Jul-15 9:14
Farhad Eft9-Jul-15 9:14 
AnswerRe: SELECT then INSERT data in a matrix way Pin
Richard Deeming9-Jul-15 9:22
mveRichard Deeming9-Jul-15 9:22 
GeneralRe: SELECT then INSERT data in a matrix way Pin
Farhad Eft9-Jul-15 10:51
Farhad Eft9-Jul-15 10:51 
QuestionSQL Linq, concepts of writing queries Pin
jkirkerx8-Jul-15 8:55
professionaljkirkerx8-Jul-15 8:55 
AnswerRe: SQL Linq, concepts of writing queries Pin
Richard Deeming8-Jul-15 10:46
mveRichard Deeming8-Jul-15 10:46 
GeneralRe: SQL Linq, concepts of writing queries Pin
jkirkerx8-Jul-15 12:32
professionaljkirkerx8-Jul-15 12:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.