The error "Incorrect syntax near the keyword 'AS'" can occur when you try to run SQL scripts that require SQL Server 2008 on an earlier version of SQL Server. In my case it occurred while installing NewsGator Social Sites. SharePoint 2010 supports SQL Server 2005 (in some scenarios), but NewsGator requires SQL Server 2008 SP1.