the SQL statement like requires a %.. for example.. select * from froo where name like 'G%' will return all names that starts with G.. So try something like select * from tbl where name like '% '; That will catch anything with a trailing space. Just a heads up..
On Jan 3, 2008 9:03 AM, morchella <[EMAIL PROTECTED]> wrote: > hey guys. > this is a 2 parter. > > i have a table i need to fix. i have no real idea how to do this. the > problem is the Contact filed. > > the first several thousand entries combine fnme & lname into this one field > from a xls file. > then maybe 20,000 entries only have a name with a space in the Contact > filed. > then some one caught the error in the xls file & made a tweak to it so the > remainding3k entries are fine again. > > so... > Part 1 > i need to find out how to do a where statement that looks for a single name > that could be any thing, a null or a single name with a space or any > combinations of space.... > > like 'Joe ', 'Dan ' but NOT 'James Dean' > right now my select to find the problem isn't really working.. > > SELECT rep_assigned, id, industry, Contact, Address, City, State, Zip > FROM Contacts > WHERE (Contact LIKE '') OR (Contact LIKE ' ') > > Part 2 > then i will need to do a find & update from the xls where Contact is a > partial match & Address is a full match. > this is the part that scares the crap out of me! > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295743 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4