cancel
Showing results for 
Search instead for 
Did you mean: 

Formatted search query adding spaces

Former Member
0 Kudos

Hello,

I have created a table U_Items in SBO database.

I was trying to run this query using formatted search.

SELECT ItemDesc

FROM U_Items T0

WHERE T0.ItemCode = RTRIM(LTRIM('$[$38.1.0]'))

When the query gets executed '$[$38.1.0]' is repalced

by 'N'A00001 '' value.

I want the value to be 'A00001' so that it can match the record in the U_Items. How can I get rid of the trailing spaces?

Thanks,

Sheetal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Sheetal,

Your query,

SELECT ItemDesc

FROM U_Items T0

WHERE T0.ItemCode = RTRIM(LTRIM('$[$38.1.0]'))

I think must be

SELECT ItemDesc

FROM [@U_Items] T0

WHERE T0.ItemCode = RTRIM(LTRIM($[$38.1.0]))

if this is a user defined table.

I think your query seems ok. It doesn't work?

Answers (0)