dbTalk Databases Forums  

Problem with LEN() function

comp.databases.paradox comp.databases.paradox


Discuss Problem with LEN() function in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Problem with LEN() function - 10-22-2010 , 08:31 AM






Pdox 4.5 for DOS

I'm scanning a field formatted as A12, which contains UPC codes (all
digits). Any record with 10 characters or less is valid, and I simply want
to know how many records are like that. I aimed the code below at a test
copy of my table. When it was done, it RETAINED a lot of records which were
<11 chars. Checking some of those in field view, I see no hidden chars. What
might be causing this?

Incidentally, if I change the LEN() test to >10, it still doesn't function
correctly. This script is purely informational. I simply need to know how
many records (out of 18,000) need "treatment". If it's a dozen, I'll ignore
them. If it's "a lot", I'll take other action.


tname.a = "c:\\eval\\dump"
VIEW tname.a
MOVETO [UPC]
EDITKEY
SCAN
IF LEN([])<11
THEN
DEL
ENDIF
MESSAGE "Checking field length ",RECNO(), " of ", NRECORDS(tname.a)
CANVAS ON CANVAS OFF
ENDSCAN
DO_IT!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.