Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-08-30 : 06:16:56
|
| Irena writes "helo!I have a problem while using alias in "UPDATE" queryi have a table Books and want to write such a query: UPDATE Books B SET Max_Time = (SELECT MAX(Max_Time) FROM Books WHERE Faculty = B.Faculty); but get a problem "Incorrect syntax near 'B'."(Books is legal table,I run queries on it)Can You help me please ...what is the problem can`t I use alias in "UPDATE" query? Thank You " |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-08-30 : 07:29:58
|
| this should do it :UPDATE BSET Max_Time = (SELECT MAX(Max_Time) FROM BooksWHERE Faculty = B.Faculty)FROM Books BGo with the flow & have fun! Else fight the flow :) |
 |
|
|
|
|
|