This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select Id, FirstName + ' ' + LastName as Name, coalesce(FavoriteColor, 'Green') as FavoriteColor | |
| from Employees | |
| where LastName like '[whatever you passed in]%' | |
| order by LastName, FirstName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal IEnumerable<Employee> GetEmployees1(string lastName) { | |
| var query = | |
| from emp in context.Employee | |
| where emp.LastName.StartsWith(lastName) | |
| orderby emp.LastName, emp.FirstName | |
| select new Employee { | |
| Id = emp.Id, | |
| Name = emp.FirstName + ' ' + emp.LastName, | |
| FavoriteColor = emp.FavoriteColor ?? "Green" | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <body> | |
| <table> | |
| <% | |
| set conn=Server.CreateObject("ADODB.Connection") | |
| conn.Provider="Microsoft SQL Server" | |
| conn.Open "Server=SQLPROD;Database=HR;UserID=SuperDuperAdmin;Password=ABC123!!!" | |
| set rs=Server.CreateObject("ADODB.recordset") | |
| sql="SELECT ID, Name, FavoriteColor " & | |
| "FROM Employees " & |
NewerOlder