Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Allan Cerrudo
  Where is Allan Cerrudo?
 Las Pinas City
 Philippines
 Allan Cerrudo
 To: Rene Relucio
  Where is Rene Relucio?
 Quezon City
 Philippines
 Rene Relucio
 Tags
Subject: RE: PADL function replaces spaces with zeroes
Thread ID: 21953 Message ID: 21958 # Views: 1 # Ratings: 0
Version: Visual FoxPro 5 Category: General VFP Topics
Date: Saturday, April 05, 2003 12:01:17 PM         
   



INDEX ON DTOS(DATE) + PADL("0",INVOICENO)

Allan


> You try using PADL function. It fills up spaces at the lefts most with zeroes.
>
> Assuming the the field length of your invoice no is 5
>
> 101 = 00101
> 102 = 00102
> 1001 = 01001
> 1002 = 01002
> 1003 = 01003
> 105 = 00105
> 106 = 00106
> 1004 = 01004
>
> Rene-PCSO
>
> INDEX ON dtoc(DATE) + PADL("0",INVOICENO)
> Pls check Syntax using Help.
>
> > Is your invoice number field numeric or is it character?
> >
> > If numeric do this:
> >
> > INDEX ON dtoc(date,1)+str(Inv. No.) tag mytag
> >
> > If character do this
> >
> > INDEX ON dtoc(date,1)+Inv. No. Tag mytag
> >
> > Benny
> >
> >
> > > Dear ALL
> > >
> > > I have a table in which i store the invoice data as follows :
> > >
> > > Inv No. Date
> > >
> > > The Invoice no. has two series running parallel like the following example (both for different kind of products) :
> > >
> > > 101 2nd April
> > > 102 2nd April
> > > 1001 2nd April
> > > 103 2nd April
> > > 1002 2nd April
> > > 1003 3rd April
> > > 104 4th April
> > > 105 4th April
> > > 106 4th April
> > > 1004 5th April
> > > ... and so on
> > >
> > >
> > >
> > > If i index only on date field, sometimes the invoice nos. go up and down. I want to index in such a way that it should index date first and then inv no. .
> > >
> > > The invno field is of character type.
> > >
> > > Thanks in Advance
> > >
> > >
> > > Sudhir
> > >
> > >
> > >
> > >
> > >


COMPLETE THREAD

INDEX ON DATE + INVOICE NO. Posted by sudhir uppal @ 4/5/2003 8:35:02 AM
RE: INDEX ON DATE + INVOICE NO. Posted by Benny Thomas @ 4/5/2003 8:48:02 AM
RE: PADL function replaces spaces with zeroes Posted by Rene Relucio @ 4/5/2003 11:14:39 AM
RE: PADL function replaces spaces with zeroes Posted by Allan Cerrudo @ 4/5/2003 12:01:17 PM
Thankyou very much RE: INDEX ON DATE + INVOICE NO. Posted by sudhir uppal @ 4/5/2003 3:16:13 PM