TRIM function

Nevsy78

New Member
Hi all,

This is a slightly strange one so I didn't know where to put it.

I'm currently running some reports through a Progress Open Edge Driver in Access, and I've generally worked out how to set up some Pass Through Queries using the correct Progress syntax.

I've come across a field where I need to use a TRIM function though, and I'm not sure of the correct syntax to use. This is the standard Access Query SQL before I've converted it to a Pass Through Query (which then requires Progress syntax):

Code:
SELECT Trim([PUB_stock]![scode]) AS scode
FROM PUB_stock;

My question is does anyone know how to use the TRIM function or equivalent in the Progress syntax?

These are the changes I make as far as I know to convert it to Progress syntax:

Code:
SELECT Trim(PUB.stock.scode) AS 'scode'
FROM PUB.stock

But I'm getting a Syntax error. It's probably very simple but I am a very inexperienced SQL user.

Regards,
Nick
 

Vaalen

Member
I'm no SQL user, but when I tried this myself I found out that the AS 'scode' causes problems.

You should be able to use SELECT TRIM(field) from PUB.stock though. Still, this is SQL, not progress.

In progress you could use something like
FOR EACH PUB.stock no-lock:
display TRIM(PUB.stock.scode).
END.

Hope this helps
 

Nevsy78

New Member
Hi guys,

Thanks for getting back to me. I've dropped the quotes and still get the Syntax error.
Code:
SELECT TRIM(PUB.stock.scode) AS scode
FROM PUB.stock

I also dropped the AS 'scode' to see if the TRIM worked directly, but I still got a Syntax error
Code:
SELECT TRIM(PUB.stock.scode)
FROM PUB.stock

Not sure what to do next! May just have to run a Select Query off the Pass Through

Nick
 
Top