Hi,
I have All the emp names in sqlServer in CAPS. I need to bind below ddList with the All the Names(except one name "RAJKUMAR") in Title-case.
Create PROCEDURE [dbo].[SP_ReservoirNamesInDDL]
AS
BEGIN
SET NOCOUNT ON;
declare @ResName varchar(20)
SELECT @ExceptThis = EmpName FROM Employee
if(@ExceptThis != 'RAJKUMAR')
SELECT substring(EmpName,1,1)+Lower(substring(EmpName,2,10)), EmpID as EmpName FROM Employee
else
SELECT EmpName,EmpID FROM Employee
END
<asp:DropDownList ID="ddlEmpID" runat="server" DataSourceID="SqlEmployeeDtls" OnDataBound="ddlEmpID_DataBound"
CausesValidation="True" OnSelectedIndexChanged="ddlEmpID_SelectedIndexChanged"
DataTextField="EmpName" DataValueField="EmpID">
</asp:DropDownList>
please suggest the solution (without changing anything in DB table).
thanks in advance...