Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hi Group:Here is my dilema, I am pulling from a database a list of Users. I am using the list as part of an Application and showing the list of users in a drop down list. Here is the dilema, I need to put Select as the first choice in that drop down list instead of the user name ex. Adams, Joe. ----Problem is I tried to set that inside the ddl properties on Collection = "Select" True default. (doesn't work)I also tried to have it in the Vb.Net code as ddlExample.Items.Insert(0, "Select") it doesn't work. ------So, my only hope is to do it on the SQL side on the Selection criteria that right now is as follow:SELECT displayName, mail FROM GSP_LDAP_data WHERE (displayName NOT LIKE '_IT%') AND (displayName NOT LIKE '3%') ORDER BY displayNameI appreciate your help. Basically, I want to some how dynamically on that select statement create a record that shows "Select".Thank you.
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2009-07-02 : 14:04:48
I strongly think you can do this in vb.net but i cant guide you on it as i dont know .netIn sql, you will do like this
SELECT displayName, mailFROM(SELECT displayName, mail,1 AS SortOrder FROM GSP_LDAP_data WHERE (displayName NOT LIKE '_IT%') AND (displayName NOT LIKE '3%') UNION ALLSELECT 'Select',NULL,0)tORDER BY SortOrder,displayName