sql - Syntax error using LEN() with varchar -


can advise correct syntax below.

@test len(right(@test, charindex('/',@test) 1)1)  + ' ' + left(@test, charindex('/',@test) 1)  + ' ' +invoice_booking.dptr_date +  ' ' + invoice_booking_detail.destination_name [as] description 

i added len() want limit first result 1 character

i have declared @test

declare @test nvarchar(100) set @test = invoice_booking_detail.principal_passenger 

cheers

dave

wrong syntax near len(),left(),right()

@test len(right(@test, charindex('/',@test)))  + ' ' + left(@test, charindex('/',@test))  + ' ' +invoice_booking.dptr_date +  ' ' + invoice_booking_detail.destination_name [as] description 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -