Break Up String In BAQ Based On Line Feed

Hi all

I am trying to write a query which will provide a substring of an order line description based on the first line feed or carriage return found in the description.

Our order line descriptions will be something like the following:

"Connect Table - 1385w x 965d - low pressure laminate

Height: 590mm
Top Colour: Energise
Edge Colour: Energise"

I want to strip out and report the first line only, i.e. up until the first carriage return. That first line will be quite variable in length.

If anybody can help with the syntax for the calculated field in the query, it would be much appreciated.

Thanks Marty

This link has some good info. Basically, you should be able to get a character count for where you carriage return is (do a google search to find the possible codes for a carriage return, there are more than one, you’ll have to test). Then use that count for a trim of the rest of the field. I haven’t tested any of this, but most SQL will work in a BAQ. Some just take minor tweaks.

Thanks Brandon. I’ll have a look at that.