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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -