Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Formatted search query adding spaces

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

Former Member
Former Member replied

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?

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question