Click here to Skip to main content
15,896,153 members
Home / Discussions / Database
   

Database

 
QuestionCan stored procedures retrun more than one value. Pin
Satish - Developer18-Feb-08 23:03
Satish - Developer18-Feb-08 23:03 
AnswerRe: Can stored procedures retrun more than one value. Pin
J4amieC18-Feb-08 23:20
J4amieC18-Feb-08 23:20 
AnswerRe: Can stored procedures retrun more than one value. Pin
Giorgi Dalakishvili18-Feb-08 23:26
mentorGiorgi Dalakishvili18-Feb-08 23:26 
Generalquery + access database Pin
ritu432118-Feb-08 20:40
ritu432118-Feb-08 20:40 
GeneralRe: query + access database Pin
Paddy Boyd19-Feb-08 0:22
Paddy Boyd19-Feb-08 0:22 
Generalaccess database Pin
ritu432118-Feb-08 20:10
ritu432118-Feb-08 20:10 
GeneralRe: access database Pin
Kschuler19-Feb-08 10:52
Kschuler19-Feb-08 10:52 
GeneralProblem in Stored Procedure Pin
Syed Ali Raza18-Feb-08 19:11
Syed Ali Raza18-Feb-08 19:11 
Hi
I m using this procedure and want to insert data in multiple table.
First it insert data in ST_STUDENT which auto generates the 'Identity' value of 'Student_Code' which i want to use in other tables for 'Student_Code' field.
I m using this line for getting the last generated 'Student_Code' but it gives me this error
'Expects Parameter '@STUDENT_CODE" WHICH WAS NOT SUPPLIED"
what is wrong in my procedure.
Kindly Tell me

alter Procedure SP_INSERT_STUDENT_COMPLETEINFO_BYAGENT
@STUDENT_CODE varchar(4),
@FIRST_NAME VARCHAR(50),
@LAST_NAME VARCHAR(50),
@EMAIL_ADDRESS VARCHAR(50),
@HOME_PHONE VARCHAR(50),
@HOMEEXT VARCHAR(10),
@OFFICE_PHONE VARCHAR(50),
@OFFICEEXT VARCHAR(50),
@MOBILE VARCHAR(50),
@HIGHEST_EDUCATION_LEVEL VARCHAR(50),
@DOB DATETime,
@COUNTRY_OF_RESIDENCE VARCHAR(50),
@COUNTRY_OF_NATIONALITY VARCHAR(50),
@US_SECURITY_NUMBER VARCHAR(50),
@GENDER VARCHAR(20),
@MARITAL_STATUS VARCHAR(20),
@ETHNIC_GROUP VARCHAR(20),
AS

INSERT INTO ST_STUDENT(FIRST_NAME,LAST_NAME,EMAIL_ADDRESS,HOME_PHONE,HOMEEXT,OFFICE_PHONE,OFFICEEXT,MOBILE)
VALUES(@FIRST_NAME,@LAST_NAME,@EMAIL_ADDRESS,@HOME_PHONE,@HOMEEXT,@OFFICE_PHONE,@OFFICEEXT,@MOBILE)

SET @STUDENT_CODE =(SELECT @@IDENTITY)

Insert into ST_STUDENTBIODATA(HIGHEST_EDUCATION_LEVEL,DOB,COUNTRY_OF_RESIDENCE,COUNTRY_OF_NATIONALITY,
US_SECURITY_NUMBER,GENDER,MARITAL_STATUS,ETHNIC_GROUP,STUDENT_CODE)
VALUES(@HIGHEST_EDUCATION_LEVEL,@DOB,@COUNTRY_OF_RESIDENCE,@COUNTRY_OF_NATIONALITY,@US_SECURITY_NUMBER,@GENDER,@MARITAL_STATUS,
@ETHNIC_GROUP,@STUDENT_CODE)

GO

Regards
GeneralRe: Problem in Stored Procedure Pin
Paddy Boyd19-Feb-08 0:24
Paddy Boyd19-Feb-08 0:24 
Questioncall DB2 stored procedure? Pin
jchigg200018-Feb-08 4:35
jchigg200018-Feb-08 4:35 
AnswerRe: call DB2 stored procedure? Pin
Mike Dimmick18-Feb-08 7:08
Mike Dimmick18-Feb-08 7:08 
Questionhow to get the primarykey value of a table after copying a row Pin
Exelioindia18-Feb-08 2:38
Exelioindia18-Feb-08 2:38 
AnswerRe: how to get the primarykey value of a table after copying a row Pin
SimulationofSai18-Feb-08 3:40
SimulationofSai18-Feb-08 3:40 
GeneralRe: how to get the primarykey value of a table after copying a row Pin
Exelioindia18-Feb-08 9:33
Exelioindia18-Feb-08 9:33 
GeneralRe: how to get the primarykey value of a table after copying a row Pin
pmarfleet18-Feb-08 11:16
pmarfleet18-Feb-08 11:16 
QuestionC# MySQL ----parameter '?9' not found in the collection...huh? Pin
js8008518-Feb-08 2:17
js8008518-Feb-08 2:17 
AnswerRe: C# MySQL ----parameter '?9' not found in the collection...huh? Pin
sugo11-Apr-08 4:30
sugo11-Apr-08 4:30 
GeneralPassword! [modified] Pin
kibromg18-Feb-08 1:29
kibromg18-Feb-08 1:29 
GeneralRe: Password! Pin
Michael Potter18-Feb-08 6:10
Michael Potter18-Feb-08 6:10 
QuestionDynamic Parameters for report designed in SQL Server Reporting Services 2005 Pin
Senthil_M17-Feb-08 21:40
Senthil_M17-Feb-08 21:40 
GeneralRe: Dynamic Parameters for report designed in SQL Server Reporting Services 2005 Pin
r aa j18-Feb-08 2:18
r aa j18-Feb-08 2:18 
Questionsecurity in sql server 2000 database [modified] Pin
Sonia Gupta17-Feb-08 19:15
Sonia Gupta17-Feb-08 19:15 
GeneralRe: security in sql server 2000 database Pin
N a v a n e e t h17-Feb-08 19:42
N a v a n e e t h17-Feb-08 19:42 
GeneralRe: security in sql server 2000 database Pin
Sonia Gupta17-Feb-08 19:53
Sonia Gupta17-Feb-08 19:53 
GeneralRe: security in sql server 2000 database Pin
N a v a n e e t h17-Feb-08 21:10
N a v a n e e t h17-Feb-08 21:10 

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.