What reasons do you have? This IS bad database modeling, if you disagree please tell me how I have to set relationships/indexes on those individual values?
Micha Schopman Software Engineer Modern Media, Databankweg 12 M, 3821 AL Amersfoort Tel 033-4535377, Fax 033-4535388 KvK Amersfoort 39081679, Rabo 39.48.05.380 ------------------------------------------------------------------------ ------------------------------------------------------------------------ ----- Modern Media, Making You Interact Smarter. Onze oplossingen verbeteren de interactie met uw doelgroep. Wilt u meer omzet, lagere kosten of een beter service niveau? Voor meer informatie zie www.modernmedia.nl ------------------------------------------------------------------------ ------------------------------------------------------------------------ ----- -----Original Message----- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: vrijdag 25 februari 2005 15:39 To: CF-Talk Subject: RE: sql question LOL, I have to disagree....while I don't think it is good design per say there may be a valid database theory behind it.... It does not break any rules at all if there is good reason to do it. -----Original Message----- From: Adam Haskell [mailto:[EMAIL PROTECTED] Sent: 25 February 2005 14:27 To: CF-Talk Subject: Re: sql question This is going to get off topic butany time you want to find an idividual value in this comma seperated list your design begins to enter the bad design area. And it does break normailization rules... Adam H On Fri, 25 Feb 2005 14:00:10 -0000, Robertson-Ravo, Neil (RX) <[EMAIL PROTECTED]> wrote: > Yes, strong comma separated lists in a DB is not ideal - though it is not > bad design as in some cases it does make sense - and it does not break any > 'rules'. > > -----Original Message----- > From: Adam Haskell [mailto:[EMAIL PROTECTED] > Sent: 25 February 2005 14:01 > To: CF-Talk > Subject: Re: sql question > > First off i want to point out that anytime you do something like it > should occur to you that this is probably not the best DB design and > could lead to more issues down the road...if this is indeed on of the > rare cases where this design makes sense. Then one option is to do > this CHARINDEX(','+item+',',search_item,0) > 0 > where search item would be something like ',11,' > You could also do a simular thing with LIKE.... ','+item+',' LIKE '%,11,%' > > Adam H > > On Fri, 25 Feb 2005 08:41:20 -0400, Protoculture <[EMAIL PROTECTED]> wrote: > > I have a list of items in a db field [items]... > > > > 1,11,14,12,13,17,15,18,19,16,4 > > > > Now I want to test that my item is one of those numbers thats is in that > field and select that row. See below. If I have one number (11), I want it > to select that row, so it needs to search the string of numbers in the field > [items], unless there is a way to use IN keyword in this case? any ideas? > > > > eq.. > > > > select * from myTable > > where items = 11 > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196518 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

