Click here to Skip to main content
15,916,188 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL help for a newbie~ Pin
Arjan Einbu12-Aug-03 13:12
Arjan Einbu12-Aug-03 13:12 
GeneralRe: SQL help for a newbie~ Pin
Arjan Einbu12-Aug-03 13:27
Arjan Einbu12-Aug-03 13:27 
GeneralADO and 'Unhandled exception in <application> (MSDART.DLL) 0xC0000005: Access Violation' Pin
KalliMan12-Aug-03 1:40
KalliMan12-Aug-03 1:40 
GeneralRe: ADO and 'Unhandled exception in <application> (MSDART.DLL) 0xC0000005: Access Violation' Pin
Steve S12-Aug-03 1:52
Steve S12-Aug-03 1:52 
GeneralRe: ADO and 'Unhandled exception in <application> (MSDART.DLL) 0xC0000005: Access Violation' Pin
KalliMan12-Aug-03 4:35
KalliMan12-Aug-03 4:35 
GeneralRe: ADO and 'Unhandled exception in <application> (MSDART.DLL) 0xC0000005: Access Violation' Pin
Steve S12-Aug-03 5:40
Steve S12-Aug-03 5:40 
GeneralI thing, i found my solution. Pin
KalliMan12-Aug-03 5:49
KalliMan12-Aug-03 5:49 
GeneralI have an Error message, plz help Pin
Exceter11-Aug-03 17:01
Exceter11-Aug-03 17:01 
Hi,
plz, help me with the following, (the code is attached)
Trying to insert, I have the following message:


(1 row(s) affected)

Server: Msg 8152, Level 16, State 9, Procedure Trig_PUD, Line 8
String or binary data would be truncated.
The statement has been terminated.

the Code is:

CREATE TABLE PersonalFile
(
IDnum int identity(1,1) not null,
PersonalFile varchar(10) not null
CONSTRAINT PK_PersonalFile
PRIMARY KEY
)


CREATE TABLE University
(
PersonalFile varchar(10) not null
CONSTRAINT PK_UniversityPF
PRIMARY KEY
REFERENCES PersonFile,
University varchar(50) not null
)


CREATE TABLE Department
(
PersonalFile varchar(10) not null
CONSTRAINT PK_DepartmentPF
PRIMARY KEY
REFERENCES PersonFile,
Department varchar(50) not null
)


CREATE VIEW PUD
AS
SELECT P.PersonalFile, U.University, D.Department
FROM PersonalFile P, University U, Department D
WHERE (P.PersonalFile = U.PersonalFile) and (P.PersonalFile = D.PersonalFile)


CREATE TRIGGER Trig_PUD ON PUD
INSTEAD OF INSERT
AS
BEGIN
INSERT INTO PersonalFile(PersonalFile)
SELECT PersonalFile
FROM inserted
INSERT INTO University(PersonalFile,University)
SELECT University, PersonalFile
FROM inserted
INSERT INTO Department(PersonalFile, Department)
SELECT PersonalFile, Department
FROM inserted
END

insert into PUD(PersonalFile, University, Department)
values('123445', 'Univerdity1', 'Department1')

Best Regards,
exceter.
GeneralRe: I have an Error message, plz help Pin
Exceter11-Aug-03 17:49
Exceter11-Aug-03 17:49 
Generalprint Pin
deanoA11-Aug-03 16:24
deanoA11-Aug-03 16:24 
GeneralDatabase question Pin
Grindorin11-Aug-03 14:23
Grindorin11-Aug-03 14:23 
GeneralRe: Database question Pin
Arjan Einbu12-Aug-03 10:23
Arjan Einbu12-Aug-03 10:23 
GeneralRe: Database question Pin
Grindorin13-Aug-03 14:18
Grindorin13-Aug-03 14:18 
GeneralQuestion: using multi-thread in ADO.Net & C# Pin
yyf11-Aug-03 9:14
yyf11-Aug-03 9:14 
GeneralRe: Question: using multi-thread in ADO.Net & C# Pin
Mike Dimmick11-Aug-03 11:23
Mike Dimmick11-Aug-03 11:23 
GeneralDatabase Pin
Capper11-Aug-03 8:05
Capper11-Aug-03 8:05 
QuestionHow do i access different databases Pin
Venkatraman11-Aug-03 2:38
Venkatraman11-Aug-03 2:38 
AnswerRe: How do i access different databases Pin
Mike Dimmick11-Aug-03 3:59
Mike Dimmick11-Aug-03 3:59 
GeneralDeleted RowState and the XmlDataDocument... Pin
b33rdy11-Aug-03 0:31
b33rdy11-Aug-03 0:31 
Generalautonumbering index Pin
Jerome Conus10-Aug-03 19:44
Jerome Conus10-Aug-03 19:44 
GeneralRe: autonumbering index Pin
ZoogieZork10-Aug-03 19:54
ZoogieZork10-Aug-03 19:54 
GeneralRe: autonumbering index Pin
Jerome Conus10-Aug-03 19:56
Jerome Conus10-Aug-03 19:56 
GeneralRe: autonumbering index Pin
ZoogieZork10-Aug-03 20:15
ZoogieZork10-Aug-03 20:15 
GeneralSQL SPs With Conditionals Based on Parameters Pin
kcs9-Aug-03 17:44
professionalkcs9-Aug-03 17:44 
GeneralRe: SQL SPs With Conditionals Based on Parameters Pin
Mike Dimmick11-Aug-03 4:52
Mike Dimmick11-Aug-03 4:52 

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.