and thanks in advance for any help. I'm using Microsoft Query to interrogate Sage 50 tables. I'm trying to create a user defined field containing only the first digit of a customer account reference. I have been able to achieve this result when interrogating SAP tables, by using the Left or Mid functions. When I try exactly the same method with Sage, I get the error "column not found"
The SQL is as follows:
SELECT INVOICE.ACCOUNT_REF, LEFT(INVOICE.ACCOUNT_REF,1)
FROM INVOICE INVOICE
WHERE (INVOICE.ACCOUNT_REF Like "CHA002")
I'd expect the result of this to be "C" but I get
Column Not Found
Please help! I also will need to do similar to isolate the year from a date field - currently I get the same error here as well :-(
You may try this. Try to give some column name alias to your result column.
Also need to change
"to'.As You commented about SAGE
In SAGE you need to use
midfunctionmid$(EXP_STRING,EXP_POS,EXP_NB)or may beInstrwith same syntax.For more info on SAGE you may find this LINK.