ps. you'll still want to throw a trim in there if you have white space...

left(PrimaryIDSchoolIDSchoolYear, len(trim(PrimaryIDSchoolIDSchoolYear)) -
10)


> -----Original Message-----
> From: "Cantrell>,Adam" <[EMAIL PROTECTED] [mailto:"Cantrell>,Adam"
> <[EMAIL PROTECTED]]
> Sent: Tuesday, January 28, 2003 10:38 AM
> To: CF-Talk
> Subject: RE: how do I grab this record??
> 
> 
> If the length of the schoolID and school year never change, 
> let's say they
> make up 10 characters, then just subtract that from the 
> overall length - 
> 
> 
> left(PrimaryIDSchoolIDSchoolYear, 
> len(PrimaryIDSchoolIDSchoolYear) - 10)
> 
> 
> 
> 
> 
> > -----Original Message-----
> > From: Janine Jakim [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 28, 2003 10:24 AM
> > To: CF-Talk
> > Subject: how do I grab this record??
> > 
> > 
> > Ok- I know this is easy.
> > I have a PrimaryID that is varchar (it's imported from 
> > another database)
> > My program uses this unique identifier then concatenates 
> > other nesseary info
> > to make a new unique number for the student in other tables.
> > ie: PrimaryID + SchoolID + SchoolYear
> > Because it's a varchar I use the trim function to get rid 
> of the extra
> > spaces.
> > HOwever, to get demographics I need just the initial 
> > primaryID.  But now my
> > trim function is not allowing me to pull the info correctly.
> > For example before I decided to add trim I would do this to 
> > connect the
> > tables.
> > (LEFT(PrimaryIDSchoolIDSchoolYear, 16)
> > But because the spaces are now trimmed (the primaryids have 
> > anywhere from
> > 8-16 spaces used) this of course doesn't work because it is 
> > now pulling part
> > of the schoolid/schoolyear as part of the number....
> > Any way around it??
> > Thanks,
> > 
> > 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to