Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

read only substring 2

Status
Not open for further replies.

sqlpro

Programmer
Dec 30, 2003
297
0
0
NZ
i have variable with value
x="master.pkey"
how can i read only value master from it.
the variable can contain different values also
i mean someother.fldname
i wan to read only table name

cheers
 
x="master.pkey"
?left(x,atc(".",x)-1)
?right(x,len(x)-atc(".",x))

Brian
 
Thats even better Mike Lewis :)


cheers
 
this I understand

x="master.pkey"
?left(x,atc(".",x)-1)
?right(x,len(x)-atc(".",x))


This function has me baffled.. it works..but how? I think I have other uses for it.

? juststem(x)
? justext(x)

a function I cant find in my books
 
gentforreal,
Originally these were routines (written in "native" code)in the GEN* programs of FP 2.x. Then they appeared in FOXTOOLS.FLL in FPW. Since VFP 6.0 (it may have been SP3), they are now a part of VFP as native functions.

If you have an older vfersion of VFP, checkout the FOXTOOLS.HLP or FOXTOOLS.CHM file.

Rick


 
They were built to seperate the STEM of a file name from the EXTENSION. It works here for you because the tablename.fieldname mimics a filename.extension with both having tow parts and a '.' seperation.

Brian
 
Oh. they were created specifically for file names? Stem and extension....thats interesting.. it's fun to learn new commands that are useful. I still find it hard to believe its the first time I've seen it. Thanks for the explanation. :)

I'm trying to talk my boss into a big donation to this site.. wish me luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top