Re: CFLOOP - why are there duplicates?
>I assume the insert is going directly into a table and not into a query? > >[mailto:[EMAIL PROTECTED] >Sent: 19 June 2008 20:35 >To: CF-Talk >Subject: Re: CFLOOP - why are there duplicates? > > >Thanks. I thought I was going crazy. Not a cflocation somewhere else is there ? Is the page definitely only being called once ?? Bob ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308214 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFLOOP - why are there duplicates?
I assume the insert is going directly into a table and not into a query? -Original Message- From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 19 June 2008 20:35 To: CF-Talk Subject: Re: CFLOOP - why are there duplicates? Thanks. I thought I was going crazy. >[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: >> That's why I'm showing the following after the first query and >> it confirms that it's the 100k >> #getmailids.recordcount# >> >> Strange isn't it? > >There isn't anything in the code you have shown so far that would >account for there to be more inserts then the number of records in the >getMailIds record set. So the search would have to be expanded to see >if there is anyway that this code is being run twice or does something >happen in the database to somehow cause duplication of data. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308164 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFLOOP - why are there duplicates?
Thanks. I thought I was going crazy. >[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: >> That's why I'm showing the following after the first query and >> it confirms that it's the 100k >> #getmailids.recordcount# >> >> Strange isn't it? > >There isn't anything in the code you have shown so far that would >account for there to be more inserts then the number of records in the >getMailIds record set. So the search would have to be expanded to see >if there is anyway that this code is being run twice or does something >happen in the database to somehow cause duplication of data. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307752 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFLOOP - why are there duplicates?
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: > That's why I'm showing the following after the first query and > it confirms that it's the 100k > #getmailids.recordcount# > > Strange isn't it? There isn't anything in the code you have shown so far that would account for there to be more inserts then the number of records in the getMailIds record set. So the search would have to be expanded to see if there is anyway that this code is being run twice or does something happen in the database to somehow cause duplication of data. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307751 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFLOOP - why are there duplicates?
That's why I'm showing the following after the first query and it confirms that it's the 100k #getmailids.recordcount# Strange isn't it? >Have you confirmed that the record set labeled 'getMailIds' does not >contain more records then you expect. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307750 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFLOOP - why are there duplicates?
SELECT DISTINCT mailprofiles.mailprofileID FROM dbo.mailprofiles INNER JOIN subscriptions ON mailprofiles.mailprofileID = subscriptions.mailprofileID WHERE (dateunsubscribed IS NULL OR datesubscribed > dateunsubscribed) AND newslettertypeID IN (10,11,1,12,16) #getmailids.recordcount# > > >INSERT INTO sub >( >mailprofileID, >newslettertypeID, >datesubscribed >) >vALUES >( >#getmailids.mailprofileID#, >681065, >#CreateODBCDateTime(now())# >) > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307748 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFLOOP - why are there duplicates?
Have you confirmed that the record set labeled 'getMailIds' does not contain more records then you expect. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307747 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFLOOP - why are there duplicates?
Not a dumb question ... could have been the issue. But it not in this instance. >dumb question but... gotta ask. are you inserting the 100 records >into the table that originally had 100 records (thus resulting in >200)? > >how do you know that the "getmailids" query had 100 records? can you >verify? are you getting 200 inserts or are you just ending up with >200 records in the table (if the latter, see the original question). >can you set a counter to zero before the cfloop, increment it by 1 >inside the loop, then output outside the loop to see exactly how many >times the loop iterates? output #getmailids.recordcount# to see if >the value you end up with is the same as the resulting counter >variable value. it *should* be... so the question becomes is that >number what you expected? > >On Thu, Jun 19, 2008 at 12:15 PM, <[EMAIL PROTECTED]> wrote: >> ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307746 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: CFLOOP - why are there duplicates?
What is the getmailids Query? You don't have it inside a mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2008 2:15 PM To: CF-Talk Subject: CFLOOP - why are there duplicates? I'm trying to us the output from a query to loop through and insert statement. My original query has 100k for a recordcount. When I run it through the insert statement below, I end up with 200k inserts. Just need another set of eyes. Thanks. INSERT INTO sub ( mailprofileID, newslettertypeID, datesubscribed ) vALUES ( #getmailids.mailprofileID#, 681065, #CreateODBCDateTime(now())# ) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307745 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFLOOP - why are there duplicates?
dumb question but... gotta ask. are you inserting the 100 records into the table that originally had 100 records (thus resulting in 200)? how do you know that the "getmailids" query had 100 records? can you verify? are you getting 200 inserts or are you just ending up with 200 records in the table (if the latter, see the original question). can you set a counter to zero before the cfloop, increment it by 1 inside the loop, then output outside the loop to see exactly how many times the loop iterates? output #getmailids.recordcount# to see if the value you end up with is the same as the resulting counter variable value. it *should* be... so the question becomes is that number what you expected? On Thu, Jun 19, 2008 at 12:15 PM, <[EMAIL PROTECTED]> wrote: > I'm trying to us the output from a query to loop through and insert statement. > My original query has 100k for a recordcount. When I run it through the > insert > statement below, I end up with 200k inserts. Just need another set of eyes. > > Thanks. > > > >INSERT INTO sub >( >mailprofileID, >newslettertypeID, >datesubscribed >) >vALUES >( >#getmailids.mailprofileID#, >681065, >#CreateODBCDateTime(now())# >) > > > > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307740 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CFLOOP - why are there duplicates?
I'm trying to us the output from a query to loop through and insert statement. My original query has 100k for a recordcount. When I run it through the insert statement below, I end up with 200k inserts. Just need another set of eyes. Thanks. INSERT INTO sub ( mailprofileID, newslettertypeID, datesubscribed ) vALUES ( #getmailids.mailprofileID#, 681065, #CreateODBCDateTime(now())# ) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307739 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4