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

Database

 
GeneralRe: SQL Server Interview Question and Answers - Need your valuable comments, real experience and suggestions Pin
Jörgen Andersson19-Mar-10 4:11
professionalJörgen Andersson19-Mar-10 4:11 
GeneralRe: SQL Server Interview Question and Answers - Need your valuable comments, real experience and suggestions Pin
Andy_L_J19-Mar-10 18:08
Andy_L_J19-Mar-10 18:08 
QuestionDatabase design for a private message system Pin
Joshua Tully18-Mar-10 19:35
Joshua Tully18-Mar-10 19:35 
AnswerRe: Database design for a private message system Pin
Wayne Gaylard18-Mar-10 21:21
professionalWayne Gaylard18-Mar-10 21:21 
GeneralRe: Database design for a private message system Pin
Joshua Tully18-Mar-10 22:24
Joshua Tully18-Mar-10 22:24 
GeneralRe: Database design for a private message system Pin
Wayne Gaylard19-Mar-10 1:48
professionalWayne Gaylard19-Mar-10 1:48 
Questionstored procedur to update multiple tables Pin
Enobong Adahada18-Mar-10 2:05
Enobong Adahada18-Mar-10 2:05 
Questionstored procedur to update multiple tables Pin
Enobong Adahada18-Mar-10 1:21
Enobong Adahada18-Mar-10 1:21 
Hi,
i have this stored prcedure to update multiple tables in sqlserver DB,
when i run it , i get an saying tbpassport,tbaccounts, tbpermanentaddress and tbcontactaddress cannot allow nulls.
this is the code, where am i getting it wrong.
CREATE PROCEDURE InsertEmployeeRecord
@emp_id char(5), @surname char(25), @fisrtname char(25), @middlename char(25),
@sex char(10), @date_of_birth char(12), @ministry_code char(3), @dept_code char(3), @nationality char(15),
@state_code char(3), @lga_code char(3), @designation char(15), @date_of_employment char(12),
@unit_code char(3), @employement_type char(15), @marital_status char(10), @religion char(10), @glevel char(10), @step char(8),
@picture image,@filename char(52), @bank_name char(52), @bank_code char(3), @sortcode char(9), @branch char(100), @account_no char(40),
@pcity char(45), @ptown char(45), @pstreet char(100), @pphone char(200),
@ccity char(45), @ctown char(45), @cstreet char(100), @cphone char(200)
AS
BEGIN
SET NOCOUNT ON
INSERT tbemployee (emp_id,surname,firstname,middlename,
sex,date_of_birth,ministry_code,dept_code,nationality,
state_code,lga_code,designation,date_of_employment,
unit_code,employment_type,marital_status,religion,glevel,step)
VALUES(@emp_id, @surname, @fisrtname, @middlename, @sex, @date_of_birth, @ministry_code, @dept_code, @nationality,
@state_code, @lga_code, @designation, @date_of_employment, @unit_code, @employement_type, @marital_status,
@religion, @glevel, @step)

INSERT INTO tbpassport (emp_id,filename,picture)
VALUES(@emp_id, @filename, @picture)

INSERT INTO tbaccounts (emp_id,bank_code,bank_name,sortcode,account_no,branch)
VALUES (@emp_id, @bank_code, @bank_name, @sortcode, @account_no, @branch)

INSERT INTO tbpermanentaddress (emp_id, city, town, street, phone)
VALUES (@emp_id, @pcity, @ptown, @pstreet, @pphone)

INSERT INTO tbcontactaddress (emp_id,city,town,street, phone)
VALUES (@emp_id,@ccity, @ctown, @cstreet, @cphone)
END
GO

thanks.
AnswerRe: stored procedur to update multiple tables Pin
Wayne Gaylard18-Mar-10 1:49
professionalWayne Gaylard18-Mar-10 1:49 
AnswerRe: stored procedur to update multiple tables Pin
The Man from U.N.C.L.E.18-Mar-10 7:38
The Man from U.N.C.L.E.18-Mar-10 7:38 
Questionlist all host names Pin
Mogamboo_Khush_Hua18-Mar-10 0:23
Mogamboo_Khush_Hua18-Mar-10 0:23 
AnswerRe: list all host names Pin
Eddy Vluggen18-Mar-10 2:40
professionalEddy Vluggen18-Mar-10 2:40 
QuestionStoredProcedures - which is fastest and why Pin
alwinSCH17-Mar-10 22:39
alwinSCH17-Mar-10 22:39 
JokeRe: StoredProcedures - which is fastest and why Pin
Mycroft Holmes17-Mar-10 23:27
professionalMycroft Holmes17-Mar-10 23:27 
GeneralRe: StoredProcedures - which is fastest and why Pin
alwinSCH17-Mar-10 23:53
alwinSCH17-Mar-10 23:53 
AnswerRe: StoredProcedures - which is fastest and why Pin
WoutL18-Mar-10 0:26
WoutL18-Mar-10 0:26 
GeneralRe: StoredProcedures - which is fastest and why Pin
alwinSCH18-Mar-10 0:50
alwinSCH18-Mar-10 0:50 
GeneralRe: StoredProcedures - which is fastest and why Pin
WoutL18-Mar-10 1:15
WoutL18-Mar-10 1:15 
GeneralRe: StoredProcedures - which is fastest and why Pin
Mycroft Holmes18-Mar-10 11:44
professionalMycroft Holmes18-Mar-10 11:44 
QuestionDataGridView problem with cell coloring [modified] Pin
Mattzimmerer17-Mar-10 15:54
Mattzimmerer17-Mar-10 15:54 
AnswerRe: DataGridView problem with cell coloring Pin
Luc Pattyn17-Mar-10 16:22
sitebuilderLuc Pattyn17-Mar-10 16:22 
GeneralRe: DataGridView problem with cell coloring Pin
Mattzimmerer17-Mar-10 18:58
Mattzimmerer17-Mar-10 18:58 
AnswerRe: DataGridView problem with cell coloring Pin
darkelv17-Mar-10 17:49
darkelv17-Mar-10 17:49 
AnswerRe: DataGridView problem with cell coloring Pin
Mattzimmerer18-Mar-10 9:41
Mattzimmerer18-Mar-10 9:41 
QuestionPrimary Indexed? Pin
Mike65432117-Mar-10 9:06
Mike65432117-Mar-10 9:06 

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.