Quote:
Originally Posted by Delerna
A number of problems
1) you cannot give the table you are updating an alias (as far as I know).
2) You can't give update a list of tables to update like that. You just get the error "Line1: syntax error near ,"
3) Even if that query did work it would update every record in both tables to the same values. Or is what you want to do?
I suggest that you simplify it and use two seperate update queries in a stored proc or udf
-
create proc UpdStudentAcademicQual @RegoNo as bigint,@FName as varchar(50),@LName as varchar(50),@InstituteNm as varchar(50),@University as varchar(50)
-
as
-
update Student
-
set FName=@FName,
-
LName=@LName,
-
where RegNo=@RegoNo
-
-
update AcademicQualification
-
set InstituteNm=@InstituteNm,
-
University=@University
-
where Regno=@RegoNo
-
Hi,
Thanks For this Solution.Your Previous three point I have clear regarding error.
I like to update different values of both the tables having same regno of both tables.
Can I Solve this using trigger but I don't know how to update two tables with different values with having same RegNo using trigger