select * from foo
where fooid != substr(file, 1, position('.' in file) - 1);That works for postgres, if using Oracle use the instr() function instead of the position() function. On 11/11/05, Greg Morphis <[EMAIL PROTECTED]> wrote: > is it always .doc or . followed by a 3 digit extension? > select * from foo > where fooid != substr(file, 1, length(file) - 4) > That works if so... > > On 11/11/05, jonese <[EMAIL PROTECTED]> wrote: > > we have an upload system that stores an uploadid and then the filename > > of the file uploaded. > > > > the uploadid is just an int (100524) and filename is the uploadID plus > > the extention (100524.doc) > > > > I need a SQL script which will select those records where the uploadid > > doesn't equal the filename without the extension... > > > > anyone have any help / guidance? > > > > TIA jonese > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223977 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

