![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
Hi, I know this is simple but I'm being a bit thick
I have these two columns (firstname, lastname) in the same table, I would like to join them and call it wholeName. So I thought it was this "SELECT firstname, lastname AS wholeName FROM table" but it doesn't work.....am I not correct? Cheers in advance |
| Sponsored Links |
|
|||
|
simbull wrote:
> Hi, I know this is simple but I'm being a bit thick > > I have these two columns (firstname, lastname) in the same table, I would like > to join them and call it wholeName. > > So I thought it was this "SELECT firstname, lastname AS wholeName FROM table" > > but it doesn't work.....am I not correct? > > Cheers in advance > No you are not correct. You need a concatenation character in there. What character that is will depend on your database. Here are two very common ones || and + I.E. SELECT firstname || lastname AS wholeName OR SELECT firstname + lastname AS wholeName If this is for display purposes you may want to also concatenate a space character ' ' into your result. |
|
|||
|
simbull wrote:
> many thanks ian > > so I do want a space, so it would be > > SELECT firstname + ' ' + lastname AS wholeName Assuming that + is your concatenation character, then yes that is how you would add a space. I presume this has worked for you by now. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise