Hi,
I have a query that is being run in SQL Server 2008. I needs to pull up the [studentnameid] and then join together the name as [lastname], [firstname] [Mi]. When it is run without joining the names I get 2978 records. When I run it with the following code, I get 78 records and the rest show null values. I’m sure my code is wrong and would appreciate input. I also have not idea wher the “TOp (100 percent” comes from as I didn’t intentionally add that. Thanks!
SELECT TOP (100) PERCENT IDStudentName, LastName + N’,’ + N’ ‘ + FirstName + N’ ‘ + Mi AS [Student Name]
FROM dbo.tblStudentNames
ORDER BY [Student Name]