Click here to Skip to main content
16,005,222 members
Home / Discussions / Database
   

Database

 
QuestionFind Exact match Pin
jebin k24-Sep-07 5:12
jebin k24-Sep-07 5:12 
AnswerRe: Find Exact match Pin
DerekFL24-Sep-07 7:50
DerekFL24-Sep-07 7:50 
QuestionSQL type statements without a connection Pin
Evan St. John24-Sep-07 4:34
Evan St. John24-Sep-07 4:34 
AnswerRe: SQL type statements without a connection Pin
Paddy Boyd24-Sep-07 4:48
Paddy Boyd24-Sep-07 4:48 
GeneralRe: SQL type statements without a connection Pin
Evan St. John24-Sep-07 4:59
Evan St. John24-Sep-07 4:59 
GeneralRe: SQL type statements without a connection Pin
Paddy Boyd24-Sep-07 5:02
Paddy Boyd24-Sep-07 5:02 
AnswerRe: SQL type statements without a connection Pin
Mike Dimmick24-Sep-07 5:08
Mike Dimmick24-Sep-07 5:08 
Questionproblem with create trigger Pin
Mohammed Elkholy24-Sep-07 2:28
Mohammed Elkholy24-Sep-07 2:28 
i try to create trigger on table to insert values in another table but
the is syntax error
(Msg 1046, Level 15, State 1, Procedure MoveStudentInfo, Line 20
Subqueries are not allowed in this context. Only scalar expressions are allowed.)

here is the trigger script




create trigger MoveStudentInfo on Temp_Code

after insert

as

declare @Stu_ID bigint ,@Stu_Code nvarchar(50)

select @Stu_ID=Stu_ID from inserted
select @Stu_Code=Stu_Code from inserted

insert into Student_Info (Stu_Code,Stu_Name,Sex,Nationality,Relagion,Address
,ZipCode,Phone,Mobile,Email,District,BirthPlace,BirthDate,Certificate_Type
,Certification,Department,Grad_Date,Total,Grade_Total,School_name,Stu_Image
,School_SeatNO,National_ID,Region,First_Choice,Second_Choice,Third_Choice
,First_Lang,Second_Lang)



values(@Stu_Code,(select Stu_Name,Sex,Nationality,Relagion
,Address,ZipCode,PhoneNO,Mobile,email,District,BirthPlace,BirthDate,Certificate_Type
,Certification,Department,Grad_Date,Total,Grade_Total,school_name,Stu_Image
,School_SeatNO,National_ID,Region,First_Choice,Second_Choice,Third_Choice
,First_Lang,Second_Lang from Student_Registry where Student_ID=@Stu_ID))


thnx for help

MD_NADA

AnswerRe: problem with create trigger Pin
kubben24-Sep-07 8:07
kubben24-Sep-07 8:07 
GeneralRe: problem with create trigger Pin
Mohammed Elkholy24-Sep-07 9:29
Mohammed Elkholy24-Sep-07 9:29 
GeneralRe: problem with create trigger Pin
kubben24-Sep-07 10:49
kubben24-Sep-07 10:49 
AnswerRe: problem with create trigger Pin
joemonvarghese24-Sep-07 20:31
joemonvarghese24-Sep-07 20:31 
QuestionDifference between Delete and Truncate? Pin
ganeshMohan23-Sep-07 20:43
ganeshMohan23-Sep-07 20:43 
AnswerRe: Difference between Delete and Truncate? Pin
John-ph23-Sep-07 21:18
John-ph23-Sep-07 21:18 
GeneralRe: Difference between Delete and Truncate? Pin
Pete O'Hanlon23-Sep-07 22:30
mvePete O'Hanlon23-Sep-07 22:30 
GeneralRe: Difference between Delete and Truncate? Pin
John-ph23-Sep-07 23:11
John-ph23-Sep-07 23:11 
GeneralRe: Difference between Delete and Truncate? Pin
Pete O'Hanlon23-Sep-07 23:29
mvePete O'Hanlon23-Sep-07 23:29 
GeneralRe: Difference between Delete and Truncate? Pin
kubben24-Sep-07 8:32
kubben24-Sep-07 8:32 
GeneralRe: Difference between Delete and Truncate? Pin
kubben24-Sep-07 8:35
kubben24-Sep-07 8:35 
GeneralRe: Difference between Delete and Truncate? Pin
ganeshMohan24-Sep-07 19:19
ganeshMohan24-Sep-07 19:19 
AnswerRe: Difference between Delete and Truncate? Pin
Mike Dimmick24-Sep-07 4:09
Mike Dimmick24-Sep-07 4:09 
AnswerRe: Difference between Delete and Truncate? Pin
Sathesh Sakthivel24-Sep-07 21:38
Sathesh Sakthivel24-Sep-07 21:38 
QuestionSQL Tuning Pin
Bad Programmer23-Sep-07 18:50
Bad Programmer23-Sep-07 18:50 
AnswerRe: SQL Tuning Pin
John-ph23-Sep-07 22:14
John-ph23-Sep-07 22:14 
QuestionRead Excel Sheet by oledb Pin
Rami Said Abd Alhalim23-Sep-07 2:16
Rami Said Abd Alhalim23-Sep-07 2:16 

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.