I figured since we are all programmers that every one can read minds. ;) I am running a SQL server using DTS to import from a text file. It has about 9000 records but I know it will get much larger.
Phillip Broussard Tracker Marine Group 417-873-5957 ----- Original Message ----- From: "Dan Haley" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, July 29, 2002 3:13 PM Subject: RE: SQL question > You didn't mention database ... > > In Oracle you could use: > > decode(instr(part_number, '.'), 0, part_number, substr(part_number, 1, > instr(part_number) - 1)) = other_part_number > > You're idea of loading a master part number may yield better results > depending on how big the tables are. > > Dan > > -----Original Message----- > From: Phillip B [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 29, 2002 1:06 PM > To: CF-Talk > Subject: OT: SQL question > > > I need to do this and don't know where to start. > > Compare part of a part number in one table to another table. The part > numbers look like this. > > 12345.123 > 12345.234 > 12345.654 > 02nt911dc.123 > 02nt911dc.054 > 02thq5 > 02thq7 > > The part before the dot is all I want to use to compare to the other table > which will only contain the first part. It would be something like this. > > 12345.123 = 12345 > 12345.234 = 12345 > 12345.654 = 12345 > 02nt911dc.123 = 02nt911dc > 02nt911dc.054 = 02nt911dc > 02thq5 = 02thq5 > 02thq7 = 02thq7 > > How would I do that using just sql statements? > > Maybe when I have the server import I could have it create an extra column > that can contain a trimmed version of the part number. A master number of > sorts. Just a thought. > > > Thanks > > Phillip Broussard > Tracker Marine Group > 417-873-5957 > > > > ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

