Microsoft
Software
Hardware
Network
Question : aggregate in the set list of an UPDATE statement.
Hello, I get the following error with my statement below:
An aggregate may not appear in the set list of an UPDATE statement.
How can I fix the statement?
Update a
set LastComment = MAX(b.created)
from ReviewComments b
INNER JOIN #Temp a
ON a.[ReviewId] = b.[ReviewId]
Answer : aggregate in the set list of an UPDATE statement.
This should do:
Update a
set LastComment = b.created
from #Temp a
INNER JOIN ( SELECT [ReviewId], MAX(created) created FROM ReviewComments
GROUP BY [ReviewId]) b
ON a.[ReviewId] = b.[ReviewId]
Random Solutions
If there are multiple inf files on the computer which have the same VID/PID as your device, how does windows choose which driver to use?
how to schedule a daily task run stored procedure with sqlserver 2005
sql question
need to convert the following from asp to asp.net
XL Placing a value in an empty Cell with a Visual Basic Rprogram.
Alternative to "Can Grow" Property
Exchange 2007 SP2 permission issues
Access ADP: Suppress "The SELECT permission was denied on the object database schema 'dbo'" message
easy for experts.
Does wordpad support automation from vb.net?