need help finding lower case characters

Do you hate Madonna?

  • only sometimes

    Votes: 0 0.0%
  • only when she sings

    Votes: 0 0.0%

  • Total voters
    3

RUDOLFSUN

Registered User.
Local time
Today, 11:19
Joined
Dec 14, 2006
Messages
23
hello if any one can help me create a query that pick out lower case characters from the beggining of words, and the beggining of each word in a sentance , my christmas would be made!



Thanks in advance
 
you don't give enough information for a query.

Lower case alpha characters have values between 97 and 122 inclusive.

A query column would be istch:ASC(left(fieldName,1)); the criteria for that column would be >= 97 AND <= 122 to display them, or < 97 OR > 122 to omit them.

The ASC function converts a character to a numeric value.
 
great thanks for that my job has become so much easier!
 
right I tried this out in xp and I get a Data Missmatch error.

what am I doing wrong
 
the code that is mentioned above ASCleft([fieldname],2))>97<***
 
you are missing a (
ASCleft([fieldname],2))>97

in your query put
Expr1: ASC(left(fieldName,1))
in the criteria put
>= 97 AND <= 122
 
Try this:

expr1: IIf(Val([fieldname]),1,Asc(Left([fieldname],1)))
in the criteria put
> 96 AND < 123
 
Ok tried that last post and I still get the same error,'data type missmatch'

the query then spits out just the value #name?
 
Do you have empty records in your table?

If so, try this:
Expr1: IIf(IsNull([YourTableFieldNameGoesHere]),1,Asc(Left([YourTableFieldNameGoesHereAlso],1)))

and the criterea as before.
 
same thins happens, now if i take the criteria out, it works fine and gives me the ASCII value
 
Can you post your SQL statement?

The one I'm using for my query looks like this:

SELECT TRefs.tRef, IIf(IsNull([tref]),1,Asc(Left([tref],1))) AS expr1
FROM TRefs
WHERE (((IIf(IsNull([tref]),1,Asc(Left([tref],1))))>64 And (IIf(IsNull([tref]),1,Asc(Left([tref],1))))<91));

It works fime for me...
 
aha you absolute beauty i was just about to post the sql and ran it again and it worked fine!!

I could kiss you

now if I want to do that but for various words such as ,"Systems engineer cisco"

How would you pull the last two words out of the field

does this make sense?
 

Users who are viewing this thread

Back
Top Bottom