need help finding lower case characters (1 Viewer)

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, 01:34
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
 

llkhoutx

Registered User.
Local time
Today, 03:34
Joined
Feb 26, 2001
Messages
4,018
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.
 

RUDOLFSUN

Registered User.
Local time
Today, 01:34
Joined
Dec 14, 2006
Messages
23
great thanks for that my job has become so much easier!
 

RUDOLFSUN

Registered User.
Local time
Today, 01:34
Joined
Dec 14, 2006
Messages
23
right I tried this out in xp and I get a Data Missmatch error.

what am I doing wrong
 

llkhoutx

Registered User.
Local time
Today, 03:34
Joined
Feb 26, 2001
Messages
4,018
What does
PHP:
this
mean?

Post what you tried.
 

RUDOLFSUN

Registered User.
Local time
Today, 01:34
Joined
Dec 14, 2006
Messages
23
the code that is mentioned above ASCleft([fieldname],2))>97<***
 

Fifty2One

Legend in my own mind
Local time
Today, 01:34
Joined
Oct 31, 2006
Messages
1,412
you are missing a (
ASCleft([fieldname],2))>97

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

DALeffler

Registered Perpetrator
Local time
Today, 02:34
Joined
Dec 5, 2000
Messages
263
Try this:

expr1: IIf(Val([fieldname]),1,Asc(Left([fieldname],1)))
in the criteria put
> 96 AND < 123
 

RUDOLFSUN

Registered User.
Local time
Today, 01:34
Joined
Dec 14, 2006
Messages
23
Ok tried that last post and I still get the same error,'data type missmatch'

the query then spits out just the value #name?
 

DALeffler

Registered Perpetrator
Local time
Today, 02:34
Joined
Dec 5, 2000
Messages
263
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.
 

RUDOLFSUN

Registered User.
Local time
Today, 01:34
Joined
Dec 14, 2006
Messages
23
same thins happens, now if i take the criteria out, it works fine and gives me the ASCII value
 

DALeffler

Registered Perpetrator
Local time
Today, 02:34
Joined
Dec 5, 2000
Messages
263
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...
 

RUDOLFSUN

Registered User.
Local time
Today, 01:34
Joined
Dec 14, 2006
Messages
23
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

Top Bottom