how to solve Invalid procedure problem in query

A

amjad

Hi i am running below query but it gave me error message that invalid procedure i dont how to solve it i am bit sure that code is rit
SELECT count([PostCode]), Left$([Postcode],(Instr$([Postcode],' ')-1)
FROM MemPersonalDetail
GROUP BY Left$([Postcode],(Instr$([Postcode],' ')-1))
thanks
 
G

Gerald Stanley

An oddity in that it is objecting to Instr$ but is ok with
Instr
Try
SELECT count([PostCode]),
Left$([Postcode],(Instr([Postcode],' ')-1))
FROM MemPersonalDetails
GROUP BY Left$([Postcode],(Instr([Postcode],' ')-1));

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hi i am running below query but it gave me error message
that invalid procedure i dont how to solve it i am bit sure
that code is rite
SELECT count([PostCode]),
Left$([Postcode],(Instr$([Postcode],' ')-1))
FROM MemPersonalDetails
GROUP BY Left$([Postcode],(Instr$([Postcode],' ')-1));
thanks
.
 
J

Jeff Boyce

Amjad

Have you run the Left(...,(Instr()) expression against your data, outside of
this query? There's a chance that some of your data is missing the space ('
') your expression is looking for.
 
Top