|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
CONCAT query
Hi,
I have a really simple problem with CONCAT. I want to concatenate the 'forename' and 'surname' fields of my table with a space in between them to produce a derived 'fullname' column. I'm used to using MySQL in which this works:- SELECT CONCAT(forename, ' ', surname) as fullname etc But in MS SQL this fails:- SELECT {FN CONCAT(forename, ' ', surname)} as fullname ...because it doesn't recognise the quotes. I've looks everywhere for a fix. Anyone any ideas please?? Thanks |
|
#2
|
|||
|
|||
|
Code:
select forename + ' ' + surname as fullname concat only works in Mysql. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > CONCAT query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|