Link to home
Start Free TrialLog in
Avatar of zachvaldez
zachvaldezFlag for United States of America

asked on

combine 2 column fields in a query

i would like to combine data in Artival and departure fields in a table into a result set using a query.
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

i would like to combine data in Artival and departure fields in a table into a result set using a query.  

you could try such as:

select field1 + '  ' + field2 combinedField from src

Open in new window


or using Concat function:

select concat(field1 , '  ' , field2) combinedField from src

Open in new window


but you must check what's the data type of the fields to be combined, if it's not in char/varchar, you would need to convert/cast it first.
ASKER CERTIFIED SOLUTION
Avatar of Andrei Fomitchev
Andrei Fomitchev
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial