Re: CFCode Night Part Deux

2008-11-15 Thread Erika L. Walker
I'll work on this tonight and see how I fare. I may be back! Thanks for all the help and suggestions. You guys are great as usual! :) On Sat, Nov 15, 2008 at 4:07 PM, Maureen <[EMAIL PROTECTED]> wrote: > If you're locked into a design and cannot add a table for > normalization, you can fake it w

Re: CFCode Night Part Deux

2008-11-15 Thread Maureen
If you're locked into a design and cannot add a table for normalization, you can fake it with a delimited list. I usually use a pipe character as a delimiter instead of a comma so I recognize the data as deliberate and not an accidental write from a form field that somehow gets more than one valu

Re: CFCode Night Part Deux

2008-11-15 Thread Erika L. Walker
I know. I have normalized data before in other stuff I've done... but it's been a LONG time. My brain is rusty. The Churvii crammed normalization into my head several times over the years. I had Inner and outer join down so good, I could do them in my sleep. It's amazing what you forget when you ha

Re: CFCode Night Part Deux

2008-11-15 Thread Deanna Schneider
You'll save yourself a million hours of headaches if you can normalize your data in the way that Maureen is describing. I'm a bit of a database design snob, but the the system you have? Man, I'd kill the database designer. :) On Sat, Nov 15, 2008 at 9:41 AM, Erika L. Walker wrote: > I'll have to t

Re: CFCode Night Part Deux

2008-11-15 Thread Erika L. Walker
I'll have to talk to you off-list about that... with the system I have I'm not too sure I can at this point. Heading out to run some errands and will be back later this afternoon. On Sat, Nov 15, 2008 at 2:33 AM, Maureen <[EMAIL PROTECTED]> wrote: > You have a many to many relationship between th

Re: CFCode Night Part Deux

2008-11-15 Thread Erika L. Walker
I believe I can! I will try that :) Thank you. On Sat, Nov 15, 2008 at 8:00 AM, Deanna Schneider < [EMAIL PROTECTED]> wrote: > If you can't normalize the data, can you at least create a sql > function to handle it? > > http://www.4guysfromrolla.com/webtech/031004-1.shtml > > This will fake it for

Re: CFCode Night Part Deux

2008-11-15 Thread Deanna Schneider
If you can't normalize the data, can you at least create a sql function to handle it? http://www.4guysfromrolla.com/webtech/031004-1.shtml This will fake it for you. On Fri, Nov 14, 2008 at 11:53 PM, Erika L. Walker <[EMAIL PROTECTED]> wrote: > Ack. I need sleep. Going to have to pick this up to

Re: CFCode Night Part Deux

2008-11-14 Thread Maureen
You have a many to many relationship between the businesses and categories so you need a relational table between them. Real simple - just two fields table name: business_to_category businessid - foreign key to the business table id categoryid - foreign key to the category table id I have the

Re: CFCode Night Part Deux

2008-11-14 Thread Erika L. Walker
Ack. I need sleep. Going to have to pick this up tomorrow. Perhaps brain will function better then. On Sat, Nov 15, 2008 at 12:46 AM, Erika L. Walker <[EMAIL PROTECTED]>wrote: > I got ya. Unfortunately I can't do that. Stuck with two tables. > > So I need to do sub-queries? > > > > On Sat, Nov 1

Re: CFCode Night Part Deux

2008-11-14 Thread Rob Parkhill
yup, I would then get your list from the cell, and Left join it on your category table to get the list of categories for each business. and for the second one, I would just bring back all the categorylists, and do a find function for each one, and throw the results in an array. Rob - sorry but cod

Re: CFCode Night Part Deux

2008-11-14 Thread Erika L. Walker
I got ya. Unfortunately I can't do that. Stuck with two tables. So I need to do sub-queries? On Sat, Nov 15, 2008 at 12:39 AM, Rob Parkhill <[EMAIL PROTECTED]>wrote: > You could loop the list and add a new table that was for BusinessCategory > with the following structure: > businessCategoryID

Re: CFCode Night Part Deux

2008-11-14 Thread Rob Parkhill
You could loop the list and add a new table that was for BusinessCategory with the following structure: businessCategoryID / businessID / categoryID then just find the businesses that have a categoryID Rob On Sat, Nov 15, 2008 at 12:35 AM, Erika L. Walker <[EMAIL PROTECTED]>wrote: > When a bu

Re: CFCode Night Part Deux

2008-11-14 Thread Rob Parkhill
yeah, normalizing it would make it straight forward and the left outer would then work. barring that then read the data into CF, and loop the list. or use the find function to find the category for the businesses for Q 2 Rob On Sat, Nov 15, 2008 at 12:29 AM, Zaphod Beeblebrox < [EMAIL PROTECTED]>

Re: CFCode Night Part Deux

2008-11-14 Thread Erika L. Walker
When a business edits their profile, they have the option of choosing more than one category via a checkbox. The checkbox value is an ID number correlating to the category. How else would I store that? On Sat, Nov 15, 2008 at 12:29 AM, Zaphod Beeblebrox < [EMAIL PROTECTED]> wrote: > sql doesn't d

Re: CFCode Night Part Deux

2008-11-14 Thread Zaphod Beeblebrox
sql doesn't deal well with lists in columns. You will probably have to read that in with a cfquery, parse the list inside the column and then loop through it using more cfquery tags. Any chance you could normalize that data? On Nov 14, 2008, at 11:22 PM, Erika L. Walker wrote: > A hopefully

CFCode Night Part Deux

2008-11-14 Thread Erika L. Walker
A hopefully simple problem for some here ... I have a table full of categories, assigned ID #'s. I store those category ID #'s in a comma delimited list in a field in a row of data for a business. A business can have more than one category. #1. I need to display a list of those businesses, along