ssl
ssl

Reputation: 125

How to concatenate two or more column values and show them in a single column in oracle

I have a requirement where we have added a new column to our vendor_implementation as implementation_name. I have to set this filed by combing two other fields in vendor_implementation table where field names are and type. The query is below, the result should like "Client create date 12/11/2017" Client(type) + create date(string) 12/11/2017(create_date). I have to insert a static string create date between the type and create_date. How can I achieve the below requirement.

UPDATE vendor_implementation
SET vendor_implementation.implementation_name = vendor_implementation.type + ' Created Date '  + TO_Char(vendor_implementation.create_date, 'MM/DD/YYYY')

Upvotes: 0

Views: 84

Answers (2)

Jan W
Jan W

Reputation: 66

Oracle SQL dialect uses || instead of +.

Upvotes: 1

Barbaros Özhan
Barbaros Özhan

Reputation: 65105

assuming type column is a also string

UPDATE vendor_implementation v
   SET v.implementation_name = v.type ||' Created Date '|| TO_Char(v.create_date, 'MM/DD/YYYY')

Upvotes: 1

Related Questions