Re: How would I do this in SQL?

2011-01-27 Thread Kelly
OOps I meant to mention this is a MS SQL 2000 DB. On 1/27/2011 1:33 PM, Kelly Matthews wrote: Ok so I haven't really written any code in tSQL yet that does major looping like I'm doing in CF. Figured I'd post this here and see if anyone had some input on how to convert this into tSQL so it

Re: How would I do this in SQL?

2011-01-27 Thread Brian Cain
Sorry if this is a repost. I am not sure it posted the first time. I do not think any looping is required. You should be able to do this using sub queries within the where clause. If you are using cfx_prod_custCat as a lookup table simply look for any category that is not listed in the

Re: How would I do this in SQL?

2011-01-27 Thread Brian Cain
I do not think any looping is required. You should be able to do this using sub queries within the where clause. If you are using cfx_prod_custCat as a lookup table simply look for any category that is not listed in the custcat_id field: UPDATE Categories SET hasproducts = 0 WHERE category

Re: How would I do this in SQL?

2011-01-27 Thread Kelly
I forgot to mention that this would be MS SQL 2000 On 1/27/2011 1:33 PM, Kelly Matthews wrote: Ok so I haven't really written any code in tSQL yet that does major looping like I'm doing in CF. Figured I'd post this here and see if anyone had some input on how to convert this into tSQL so

Re: How would I do this in SQL?

2011-01-27 Thread Kelly Matthews
Ditto on the repost, not sure if my first reply posted... Actually it's much more than that. There are a ton of categories that won't have products, however, if they are a parent of a sub category that has a product, they ultimately have products as well. This is why it requires nested

Re: How would I do this in SQL?

2011-01-27 Thread Brian Cain
Sorry that I answer didn't take inheritance into account. Is there a maximum number of levels of subcategories, or will it always be an unknown? I have done looping with tSQL in the past using cursors, and it really is a pain. You could use a UDF (User Defined Function) and return a table

Re: How would I do this in SQL?

2011-01-27 Thread Kelly Matthews
It can go up to 5 levels deep, no more than that. Re: the UDF, that's a good idea, I'll take a look at the link, thanks! Sorry that I answer didn't take inheritance into account. Is there a maximum number of levels of subcategories, or will it always be an unknown? I have done looping

Re: How would I do this?

2004-05-18 Thread Brook Davies
CFFLUSH? At 03:11 PM 5/18/2004, you wrote: Hello all, I am using ColdFusionMX on Solaris8/9 I need to query some resources that do not respond in a timely manner and as a fix, I can not cache the data. So what I would like to do is submit the request(queryies) to the various backend systems,

Re: How would I do this?

2004-05-18 Thread Troy Simpson
Oh, one other thing. How could I submit several requests to various back-end systems (RDBMS, IMAP, HTTP, etc. ) simultaneously. For example, I want to execute the following request simultaneously. All requests are independent of others.So I do not have to wait for one come back before

RE: How would I do this?

2004-05-18 Thread Barney Boisvert
, May 18, 2004 3:36 PM To: CF-Talk Subject: Re: How would I do this? Oh, one other thing. How could I submit several requests to various back-end systems (RDBMS, IMAP, HTTP, etc. ) simultaneously. For example, I want to execute the following request simultaneously. All requests

RE: How would I do this?

2004-05-18 Thread Shawn Grover
Message- From: Troy Simpson [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 18, 2004 4:36 PM To: CF-Talk Subject: Re: How would I do this? Oh, one other thing. How could I submit several requests to various back-end systems (RDBMS, IMAP, HTTP, etc. ) simultaneously. For example, I want to execute