Click here to Skip to main content
15,900,616 members
Home / Discussions / Database
   

Database

 
Questionreading xml by sql function Pin
Sachin Pimpale4-Sep-07 1:49
Sachin Pimpale4-Sep-07 1:49 
AnswerRe: reading xml by sql function Pin
WoutL4-Sep-07 1:54
WoutL4-Sep-07 1:54 
Questionhow t o call a stored procedure inside a stored procedure Pin
bhattiprolu4-Sep-07 0:59
bhattiprolu4-Sep-07 0:59 
AnswerRe: how t o call a stored procedure inside a stored procedure Pin
John-ph4-Sep-07 1:17
John-ph4-Sep-07 1:17 
GeneralRe: how t o call a stored procedure inside a stored procedure Pin
bhattiprolu4-Sep-07 1:26
bhattiprolu4-Sep-07 1:26 
GeneralRe: how t o call a stored procedure inside a stored procedure Pin
John-ph4-Sep-07 1:30
John-ph4-Sep-07 1:30 
GeneralRe: how t o call a stored procedure inside a stored procedure Pin
bhattiprolu4-Sep-07 1:34
bhattiprolu4-Sep-07 1:34 
GeneralRe: how t o call a stored procedure inside a stored procedure Pin
John-ph4-Sep-07 1:46
John-ph4-Sep-07 1:46 
you can do both Insert and Update in single procedure. I'm not sure about why you want to do in 2 procs...ok... you can go through the below sample.

CREATE PROCEDURE sp_Update
(
@col1 varchar(20)
@ValuePassed varchar(50),
)
AS

declare @Id int
EXEC sp_Insert @ValuePassed, @Id OUTPUT

Update SomeTable
(col1, col2)
VALUES
(@col1, @Id)
RETURN
GO 


CREATE PROCEDURE sp_Insert

(
@ValuePassedIn varchar(50),
@Id smallint OUTPUT
)
 AS

INSERT INTO LookUpTable(column1) 
VALUES(@ValuePassedIn)
    
    SET @Id = Scope_Identity()
END
GO



Regards
J O H N Rose | [Rose]

"Even eagles need a push." David McNally

GeneralRe: how t o call a stored procedure inside a stored procedure Pin
bhattiprolu4-Sep-07 2:03
bhattiprolu4-Sep-07 2:03 
GeneralRe: how t o call a stored procedure inside a stored procedure Pin
John-ph4-Sep-07 2:57
John-ph4-Sep-07 2:57 
QuestionInsert data into database Pin
Tuanhung1894-Sep-07 0:35
Tuanhung1894-Sep-07 0:35 
AnswerRe: Insert data into database Pin
John-ph4-Sep-07 1:03
John-ph4-Sep-07 1:03 
AnswerRe: Insert data into database Pin
Rami Said Abd Alhalim4-Sep-07 6:26
Rami Said Abd Alhalim4-Sep-07 6:26 
QuestionSql server. varbinary or varchar Pin
Eli Nurman4-Sep-07 0:24
Eli Nurman4-Sep-07 0:24 
AnswerRe: Sql server. varbinary or varchar Pin
Colin Angus Mackay4-Sep-07 0:50
Colin Angus Mackay4-Sep-07 0:50 
GeneralRe: Sql server. varbinary or varchar Pin
Eli Nurman4-Sep-07 0:51
Eli Nurman4-Sep-07 0:51 
GeneralRe: Sql server. varbinary or varchar Pin
Pete O'Hanlon4-Sep-07 22:16
mvePete O'Hanlon4-Sep-07 22:16 
QuestionDeleting a row Pin
Suresh R..3-Sep-07 22:26
Suresh R..3-Sep-07 22:26 
AnswerRe: Deleting a row Pin
Blue_Boy3-Sep-07 22:38
Blue_Boy3-Sep-07 22:38 
AnswerRe: Deleting a row Pin
John-ph4-Sep-07 0:51
John-ph4-Sep-07 0:51 
QuestionConcurrency Control Pin
leminhphuong3-Sep-07 21:06
leminhphuong3-Sep-07 21:06 
AnswerRe: Concurrency Control Pin
Pete O'Hanlon3-Sep-07 22:04
mvePete O'Hanlon3-Sep-07 22:04 
Questioni want to pass parameter from one report to other Pin
salman kazi3-Sep-07 20:06
salman kazi3-Sep-07 20:06 
AnswerRe: i want to pass parameter from one report to other Pin
DLM@TD14-Sep-07 12:06
DLM@TD14-Sep-07 12:06 
QuestionRecursive Trigger Pin
John Gathogo3-Sep-07 19:48
John Gathogo3-Sep-07 19:48 

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.