View Single Post
  #5  
Old January 14th, 2005, 12:52 AM
John Spencer (MVP)
external usenet poster
 
Posts: n/a
Default

Try testing to see if there are at least 4 characters in the contract.

WHERE Len(Contract) 3



JL wrote:

Hi Melinda,

That is interesting. I try my query before I send it.
What do you get when you try the query with the table statement?

SELECT Left([Contract],Len([Contract])-3) AS JobCode;

It will ask you for Contract. Just type "ABCDEFG". The query should return
"ABCD".

"Melinda" wrote:

Thanks for the correction, but that hasn't helped. I'm still getting the
errors. Any more ideas?

"JL" wrote:

Hi Melinda,

You put the "-3" in the wrong bracket.

Should be,
SELECT Left([Contract],Len([Contract])-3) AS JobCode FROM lnkBILLEDBLIINVOICE;

Hope this will help.


"Melinda" wrote:

Hello,
I am trying to query out all but the last 3 characters of my contract name.
Here's the SQL I'm using:

SELECT Left([Contract],Len([Contract]-3)) AS JobCode
FROM lnkBILLEDBLIINVOICE;

I can't see anything wrong with it, but all I get is #Error in all of my
fields. Any ideas on what I'm missing? I'm using Access 97 on a Windows 98
machine.

Thanks!
Melinda