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 Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

