Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1367 > unrolled thread
| Started by | "Tony Johansson" <johansson.andersson@telia.com> |
|---|---|
| First post | 2012-12-09 14:10 +0100 |
| Last post | 2012-12-09 08:39 -0500 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.databases.ms-sqlserver
Gow to write this select statement "Tony Johansson" <johansson.andersson@telia.com> - 2012-12-09 14:10 +0100
Re: Gow to write this select statement "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-12-09 08:39 -0500
| From | "Tony Johansson" <johansson.andersson@telia.com> |
|---|---|
| Date | 2012-12-09 14:10 +0100 |
| Subject | Gow to write this select statement |
| Message-ID | <ka22k2$g3k$1@dont-email.me> |
Hello!
Is it possible to write a select statement that return both FName and LName
as just FullName with a space in between
something like Select (FName + " " + LName) as FullName from employees
So I can use FullName when I bind to a dropdownlist
ddlEmployee.DataSource = backEnd.GetEmployees ();
C.DataTextField = "FullName ";
ddlEmployee.DataValueField = "EId";
ddlEmployee.DataBind();
//Tony
[toc] | [next] | [standalone]
| From | "Bob Barrows" <reb01501@NOSPAMyahoo.com> |
|---|---|
| Date | 2012-12-09 08:39 -0500 |
| Message-ID | <ka24ai$p3m$1@dont-email.me> |
| In reply to | #1367 |
Tony Johansson wrote: > Hello! > > Is it possible to write a select statement that return both FName > and LName as just FullName with a space in between > something like Select (FName + " " + LName) as FullName from > employees > So I can use FullName when I bind to a dropdownlist > ddlEmployee.DataSource = backEnd.GetEmployees (); > C.DataTextField = "FullName "; > ddlEmployee.DataValueField = "EId"; > ddlEmployee.DataBind(); > Just change the double-quotes to single quotes and you've got it. SELECT FName + ' ' + LName As FullName from employees
[toc] | [prev] | [standalone]
Back to top | Article view | comp.databases.ms-sqlserver
csiph-web