RE: Help on Duty Roster
Han WOW, a few years out. Don't know how much help this will be but a few suggestions. I would start with these tables 1) Individual (ID,name, etc) 2) Exemptions (ID, exemption - Leave, Other duty, etc) 3) Dates (IndividualID, ExemptionID, startdate, enddate) ?4) Roster list ( the control number of when Individual last had duty) (Normally high number is up next- could possibly be added to Individual table) There are a number of calendar generators. You need to just find one that fits you best. You would generate the calendar. Loop through control numbers find highest one. Review exemptions if none for the date, place individual on duty (possibly rest to 1 at this time, you might need to have another table to temporally hold the information to accommodate changes). if individual exempt don't reset control number, go to next highest and repeat. When the roster is completed (monthly, quarterly) you could create temp tables to hold each time period. I have manually ran a number of duty rosters, but have never tried to completely automate one. Good luck, Rodney -Original Message- From: han peng [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 7:31 PM To: CF-Talk Subject: Help on Duty Roster Help help!! hi anyone tried to code a duty roster before..?? anyone can shed some light to how to get it up using a cost effective way? sigh.. i can only think of putting every single day, mth, year with its relevant fields into a table. but its going to be tedious if the duty roster need to be done up a few years in advance.. stressed han __ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Help with resolving a variable...
I believe it would be one of these or -Original Message- From: Kelly Matthews [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 1:09 PM To: CF-Talk Subject: RE: Help with resolving a variable... Ok wait still confused... Evaluate(WHAT?) For instance Evaluate(surname_Comm) doesn't work nor does Evaluate(#surname#_Comm) Sorry just not sure how to display it properly... Was using a CFSET tag like That gives an error Makes surnamecomm = to Evaluate(smith_comm) instead of just smith_comm I am probably missing something minor... -Original Message- From: Bryan Stevenson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 3:03 PM To: CF-Talk Subject: Re: Help with resolving a variable... Evaluate() Use that to find the value of the vars you are dynamically building the names for Bryan Stevenson VP & Director of E-Commerce Development Electric Edge Systems Group Inc. p. 250.920.8830 e. [EMAIL PROTECTED] - Macromedia Associate Partner www.macromedia.com - Original Message - From: "Kelly Matthews" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, January 16, 2002 11:46 AM Subject: Help with resolving a variable... > Ok we have a survey where we have to rate each person in 3 categories. > We have 50 people to rate. I set a comma delimited list of names and > then create a loop to create 3 questions > for each person, so we can rate each of the 50 people in the 3 categories. > Looks like this: > > > > style="background: white"> > style="background: BBE9FF"> > style="background: 9DCBFF"> > > > style="background: white"> > style="background: BBE9FF"> > style="background: 9DCBFF"> > > > style="background: white"> > style="background: BBE9FF"> > style="background: 9DCBFF"> name="#trim(Surname)#_Extr" value="4" style="background: 5785FF"> > > It creates this part fine and as you can see for each > category there are 3 radio buttons all > w/ the same name. So if the surname for the first person were smith the > first set of radio > buttons would be named smith_comm, 2nd set smith_cust, 3rd set smith_extr > It does this for all 50 people, works great. > > Here is the problem when I hit submit I want to loop through to > resolve all the values rather than have to type up 200 separate values > in the insert statement. > > However if I want to loop through on the insert page similarly to how > I am looping through on the form I can't resolve the variable. Because > if I pass a value named smith_comm > I can't loop through to get the value of smith_comm... > Meaning an insert statement like: > > > > INSERT INTO SCORES > (#trim(Surname)#_Comm) > VALUES > ('#trim(surname)#_comm') (obviously that won't work because it will > insert a value of smith_comm instead of say "3" How do I find the value of > smith_comm by looping through? Any ideas?? > > __ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Regular expression help
There was a at the bottom, must have gotten cut off. -Original Message- From: Bruce, Rodney (Contractor) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 1:05 PM To: CF-Talk Subject: RE: Regular expression help Here's a UDF I may not be the most eloquent but it does work. I used it to do tile casing. why my string is title ;o) //Changes a String to Title case Function TitleCase(title){ title = trim(title); //Caps first letter of string and Lower cases rest //for standardization Leadchar = UCase(RemoveChars(title,2,len(title))); title = RemoveChars(title, 1, 1); title = LCase(title); title = Leadchar & title; start = 1; //loops through string word by word to Cap first letter //uses space to tell when new word starts While (start LT len(title)){ place = REFindNoCase(" ", title ,start ); //place has to be less than length of string and //greater than 0 (no more words) if (place LT len(title) and place GT 0){ Frontpart= Removechars(title,place,len(title)); backpart = RemoveChars(title, 1,place); //if last part is one letter like a Middle initial if (len(backpart) gt 1){ nextchar= RemoveChars(backpart,2,len(backpart));backpart= RemoveChars(backpart,1,1); nextchar = Ucase(nextchar); title = frontpart& " " & nextchar & backpart; start = place +1; } else{ backpart = Ucase(backpart); title = frontpart &" " & backpart; start = place +1; } } else{ start = len(title); } } return title; } __ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Regular expression help
Here's a UDF I may not be the most eloquent but it does work. I used it to do tile casing. why my string is title ;o) //Changes a String to Title case Function TitleCase(title){ title = trim(title); //Caps first letter of string and Lower cases rest //for standardization Leadchar = UCase(RemoveChars(title,2,len(title))); title = RemoveChars(title, 1, 1); title = LCase(title); title = Leadchar & title; start = 1; //loops through string word by word to Cap first letter //uses space to tell when new word starts While (start LT len(title)){ place = REFindNoCase(" ", title ,start ); //place has to be less than length of string and //greater than 0 (no more words) if (place LT len(title) and place GT 0){ Frontpart = Removechars(title,place,len(title)); backpart = RemoveChars(title, 1,place); //if last part is one letter like a Middle initial if (len(backpart) gt 1){ nextchar = RemoveChars(backpart,2,len(backpart)); backpart = RemoveChars(backpart,1,1); nextchar = Ucase(nextchar); title = frontpart& " " & nextchar & backpart; start = place +1; } else{ backpart = Ucase(backpart); title = frontpart &" " & backpart; start = place +1; } } else{ start = len(title); } } return title; } __ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
OT: Excel
Sorry about the OT But does anyone know how to turn Excel spreadsheet cells into drop down menus? I see how to add an ActiveX control or a form combo-box, but I was told there is a way to turn the column into drop downs without having to add one to each cell. Thanks for any help __ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Efficient Logging Application
Jim I do the following to keep track of hits, monthly to my web pages: I have a table to hold the current monthly web pages info and an identical historical table. I call a tag that checks to see if the page is already in the table if not it creates a record with hits=1 I also maintain a session.pageshit. This is an array of pages that the current user has viewed, so if a user visits a page more than once in a visit, its only counted once. On the first of the month I have a scheduled task (cfm page) that transfers the month just ending information into a historical table and then cleans the current table to start over for the new month. Just one way, hope it helps with ideas Rodney -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 11:34 AM To: CF-Talk Subject: Efficient Logging Application I need to log views of dynamically generated pages in a MySQL database. We're just going to be logging on a monthly basis, so this means that each page will have one log record per month. A couple of ideas we're kicking around: 1. Every time a page is accessed on the site, we'll call a CF tag that will: Look to see if a log record exists for the page If it does increment the 'views' column else create a new record, with views=1 Since the record creation is only done on a monthly basis, this means that the vast majority of tag calls will simply do an update, yet must still do two queries, the first to see if the record exists. 2. Create all of the log records before-hand, on the first of each month. Biggest problem with that is that new items are constantly being added to the database, so new pages are possible. Since items are pulled from a couple dozen tables, with a couple dozen distinct maintenance applications, we'd need to modify those applications to add log records as new records are created. That's a lot of work. 3. Instead of updating a monthly log record directly, we thought we might just do an insert into a table of a new record for every single page view. At the end of the day, all the daily records would then be 'rolled' into the monthly logs. This way, no SELECT query is necessary. Not too sure of the relative efficiency, however, of an INSERT every time versus a SELECT, then an UPDATE. Any ideas or insights would be appreciated. Jim __ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validating forms (security)
Check out qForms: http://www.pengoworks.com/qForms/ I got this from another post on this list. It might help. -Original Message- From: joachim [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 11:24 AM To: CF-Talk Subject: Validating forms (security) Hi, I'm tuning a forum (as in security checks) but i'm quite confused about how one would handle form input. I know that one should always validate data before doing any operations with it, eg validating numbers (see also url hack). But how does one handle "plain text" ? For the "<", ">" characters would it be correct, If I state that replacing them with there html equivalent (< ) would be enough ? I've been searching the cf-talk archive and spitted out some forums (devex) (where btw I didn't even found number validation *cough* ) but to no success. I've never seen/found a way to pass in additional sql statements(or anything other for that matter) by filling out a form (aka plain text). And there's also the fact that for "SQL forum" it would be obvious that one would enter "drop table, create table," So what do you do then ? If anybody has any insights on this please enlighten me. BTW, I'm already using cfqueryparam in all my sql statements. Thanks alot, Joachim __ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Cryptogram
Also (sorry ;o) the flag and advertisement keep reappearing sometimes over part of the message, can make it hard to read.(this is in I.E. 5.5) -Original Message- From: Don Vawter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 1:26 PM To: CF-Talk Subject: Re: Cryptogram Known issue. Forgot to state in recent message that it is NS6 (still working on colors though) and IE 5+ (maybe 4+ havent tested) Uses way too much dhtml for NS4. Notice I am rewriting page constantly without server trip. I think it can be done in NS4 but havent done it yet. Thanks for heads up though - Original Message - From: "Bruce, Rodney (Contractor)" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 1:19 PM Subject: RE: Cryptogram > When I view the page with NS 4.7, the message (blue letters) and the > red > letters don't show up. > The boxes are empty. > > Works fine with IE 5.5 > > -Original Message- > From: Don Vawter [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 19, 2001 12:14 PM > To: CF-Talk > Subject: Re: Cryptogram > > > Well what fun would it be if the solution were already posted? > Kinda defeats the purpose of playing doesnt it. > > In any event. I have redone the ui so that it is all point and click no > dropdowns. Any comments on > which you like? > > http://www.vawter.com/cryptotwo.cfm (point and click) > http://www.vawter.com/crypto.cfm (dropdowns) > > > > > - Original Message - > From: "Scott Brady" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Wednesday, December 19, 2001 11:58 AM > Subject: Re: Cryptogram > > > > > > > > http://www.vawter.com/crypto.cfm > > > > The first time I visit the page, the solution is displayed. (When I > go to > a > > new crypto, the solution isn't given till I hit "Give Up") > > > > Other than that, pretty cool. > > > > Scott > > -- > > Scott Brady > > http://www.scottbrady.net/ > > > > > > __ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Cryptogram
When I view the page with NS 4.7, the message (blue letters) and the red letters don't show up. The boxes are empty. Works fine with IE 5.5 -Original Message- From: Don Vawter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 12:14 PM To: CF-Talk Subject: Re: Cryptogram Well what fun would it be if the solution were already posted? Kinda defeats the purpose of playing doesnt it. In any event. I have redone the ui so that it is all point and click no dropdowns. Any comments on which you like? http://www.vawter.com/cryptotwo.cfm (point and click) http://www.vawter.com/crypto.cfm (dropdowns) - Original Message - From: "Scott Brady" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 11:58 AM Subject: Re: Cryptogram > > > > http://www.vawter.com/crypto.cfm > > The first time I visit the page, the solution is displayed. (When I go to a > new crypto, the solution isn't given till I hit "Give Up") > > Other than that, pretty cool. > > Scott > -- > Scott Brady > http://www.scottbrady.net/ > > __ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cfselect question
Just my .02. But I mostly stay away form CFSELECT, because I don't use CFFORM you could just use Select State #name# This I believe would get you what you want. (but watch my typing, was just done on the spur of the moment ;o) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 12:49 PM To: CF-Talk Subject: cfselect question Does anyone know of a way to display a default field when using cfselect and a query first? I've put an option tag between the and tags and it displays it as the last entry. I would like it to display first. What I'm doing is using my states database to populate the select box, but I want it to default to "Select State" as the very first entry, but it's showing up last. Select State Sorry for such a simple post, but I'm fried and can't think of any way around putting it in the table itself. Thanks, Michael Corrigan Programmer Endora Digital Solutions www.endoradigital.com 630/942-5211 x-134 __ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Production server running way too slow (Long)
a possibility is: Check for a SQL.log file , by default its in the root dir i.e. C:\sql.log you might have ODBC tracing on and this will bring most servers to a craw. To check and disable: WIN2K: Go to Control Panel/Administrative Tools/Data Sources(ODBC) Click on the tracing tab and see if tracing is on if so just choose "Stop Tracing Now" -Original Message- From: Andrew Peterson [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 11:54 AM To: CF-Talk Subject: Production server running way too slow (Long) I am looking for some suggestions on how to speed up our website, which is alarmingly slow. Actually, it was working fine until we upgraded to CF 5.0 and moved to a new server. Only the ColdFusion templates are crawling, with even the simplest cfm templates taking 70 seconds or longer to load. I think my adjusting the CFIDE settings has only made it worse. Incidentally, vanilla html pages come up lightning fast. CF Verson: CF 5 Enterprise, Web Server: Win 2K Sp2, two Intel 550 mHz processors, 1 G Ram. Relevant Server settings: Limit Simultaneous Requests to: I've tried 5, 10, and 20. Template Cache Size: 5 KB (up from 1024 - and no real changes - may have made things worse) Cached Queries : 200 Limit cached database connection inactive time to 3 minutes ( I JUST changed this from 30) Maintain DB Connections: UN checked (cleared) All other settings I believe are set as default. Pages which, according to my debug settings, take a dozen or so *milli* seconds to process, take over 45 seconds for me to see in the browser. Our development server is having no problem. It too has CF 5 and, for the most part, identical settings. Our old production server is also having no problem. It is running CF 4.5. We're going primarily against DB2, but also have a few several smaller Access databases. It doesn't seem to matter which db is being hit; if it is *.cfm, it's slow. Our server.log (shown below) indicates that 10 queries took 38 seconds or longer to process in a 7 second time span. I take this to mean that every cfm template is crawling The server experiences about 4000-5000 user sessions daily. DB2 is being accessed via ODBC, but people accessing db2 via ODBC in MS Access are pulling up the same queries very quickly. Is there anything I can do, or should at least try, to speed things up? We also just moved the server behind a firewall and through a pix, but I'm told by networking that this is not a factor. Any help is greatly appreciated. Here's the server.log file sample. The index1.cfm file you see is our home page! It takes 60 seconds to load! HELP! Andrew 2001-12-12 14:21:40 Warning 1348 Template: D:\Web App\prod\html\QuickTake\cb\cb.cfm, Ran: 84 seconds. 2001-12-12 14:21:36 Warning 2868 Template: D:\Web App\prod\html\Vendor\VendWarrDetl.cfm, Ran: 38 seconds. 2001-12-12 14:21:35 Warning 1252 Template: D:\Web App\prod\html\Vendor\VendSumm.cfm, Ran: 63 seconds. 2001-12-12 14:21:34 Warning 2864 Template: D:\Web App\prod\html\Vendor\VendSumm.cfm, Ran: 63 seconds. 2001-12-12 14:21:33 Warning 2868 Template: D:\Web App\prod\html\index1.cfm, Ran: 51 seconds. 2001-12-12 14:21:33 Warning 2868 Template: D:\Web App\prod\html\Expert\Exp\EEParseForm.cfm, Ran: 54 seconds. 2001-12-12 14:21:33 Warning 2868 Template: D:\Web App\prod\html\index1.cfm, Ran: 56 seconds. 2001-12-12 14:21:33 Warning 2856 Template: D:\Web App\prod\html\index1.cfm, Ran: 60 seconds. 2001-12-12 14:21:33 Warning 2856 Template: D:\Web App\prod\html\Vendor\VendSumm.cfm, Ran: 71 seconds. 2001-12-12 14:21:33 Warning 2868 Template: D:\Web App\prod\html\index1.cfm, Ran: 50 seconds. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
OT: Exporting an Access report
Hello everyone I know this is OT, but I am using CF on the web site ;o} But the powers that be want to gather information from a web site into an ACCESS db and then use ACCESS to create the reports(no problems so far). Now they want the reports to be able to be reviewed using MS Word. After playing around some I can only find out how to export to Excel and then all the formatting is lost as well as the report headers and footers. Is there a way to export ACCESS reports with out losing all the formatting? My guess is that they want this so that the reports can be emailed around while reviewing and some don't have access to ACCESS. Thanks for any help, Rodney ~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Is CFGRAPH Crap?
I agree the tag is for basic usage. but it does have WIDTH and HEIGHT attributes, I believe that will change its size. at least they work for me. I only use it for simple pie charts and it works great for this. To get a little more flexibility for bar charts I use a tag written by BEN SPENCER ,I down loaded from the gallery. If you want I can send you the tag off list. Rodney -Original Message- From: Jay Jennings [mailto:[EMAIL PROTECTED]] Is the new CFGRAPH tag crap or is it just designed for very basic usage? Specifically, I need to increase the width of the graph -- partly to make more room for the labels in a vertical bar chart (and partly for aesthetics). I've searched the archives and have seen other people asking but no definitive answer. Should I just bag CFGRAPH or is it a little more robust than I'm thinking at this point? Thanks. jay ~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL delete help
Don Thanks for the suggestion, will just have to see what I can work out. Rodney -Original Message- From: Don Vawter [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 06, 2001 7:57 PM To: CF-Talk Subject: Re: SQL delete help makes it a bit more complicated doesn't it. You have no primary key in the table? If you had one you might be able to use a correllated subquery. In the absence of a key do define the items I don't see any way to do it like I proposed. You don't want to delete people but rather items and you show no key except for the date and it is certainly possible to have multiple rows with the same date. I don't know if something like the following works at all. I haven't ever tried to use a correllated subquery on a delete but you might want to try it out on some test data. Even if it works when you only have one item per day per person it can't possibly work for multiple items on a day. delete from tbl_person a where date_entered not in ( select top 12 datentered from tbl_person b where b.person_id=a.person_id order by dateentered desc ) - Original Message - From: "Bruce, Rodney (Contractor)" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, December 06, 2001 3:46 PM Subject: RE: SQL delete help > I think I see were you are going. > But I didn't give enough information I think. > > the table looks something like this: > > userid item1 item2 dateentered > 11121/1/00 > 11341/2/00 > 11671/3/00 > 12351/5/00 > <--and so forth---> > So if user 11 has 15 records I want to delete 3 of them (oldest) > but if I understand your query correctly, it would delete all but 12 users > from the table?? > I might have 50 user with any number of records each. > > Does this help or just thicken the mud :o? > > Thanks, > Rodney > > -Original Message- > From: Don Vawter [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 06, 2001 3:34 PM > To: CF-Talk > Subject: Re: SQL delete help > > > delete from tbl_person > where person_id not in ( > select top 12 person_id from tbl_person > order by dateentered desc > ) > > or something like that. The subquery chooses the 12 most recent and then you > just the rest. > > > - Original Message - > From: "Bruce, Rodney (Contractor)" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, December 06, 2001 3:24 PM > Subject: OT: SQL delete help > > > > Is there a way to delete a number of records in one SQL statement? > > i.e. I want to maintain a history of 12 records per user. Once a month > > when I run my scheduled tasks I would like to delete the oldest records > over > > the 12. > > > > Deleting the oldest record isn't a problem. but if I need to delete 4 > > records how would I do this with out looping over the query 4 times? > > > > using CF5/NT4.0/SQL7.0 > > > > Thanks > > Rodney > > > > > > ~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL delete help
I think I see were you are going. But I didn't give enough information I think. the table looks something like this: userid item1 item2 dateentered 11121/1/00 11341/2/00 11671/3/00 12351/5/00 <--and so forth---> So if user 11 has 15 records I want to delete 3 of them (oldest) but if I understand your query correctly, it would delete all but 12 users from the table?? I might have 50 user with any number of records each. Does this help or just thicken the mud :o? Thanks, Rodney -Original Message- From: Don Vawter [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 06, 2001 3:34 PM To: CF-Talk Subject: Re: SQL delete help delete from tbl_person where person_id not in ( select top 12 person_id from tbl_person order by dateentered desc ) or something like that. The subquery chooses the 12 most recent and then you just the rest. - Original Message ----- From: "Bruce, Rodney (Contractor)" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, December 06, 2001 3:24 PM Subject: OT: SQL delete help > Is there a way to delete a number of records in one SQL statement? > i.e. I want to maintain a history of 12 records per user. Once a month > when I run my scheduled tasks I would like to delete the oldest records over > the 12. > > Deleting the oldest record isn't a problem. but if I need to delete 4 > records how would I do this with out looping over the query 4 times? > > using CF5/NT4.0/SQL7.0 > > Thanks > Rodney > > ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
OT: SQL delete help
Is there a way to delete a number of records in one SQL statement? i.e. I want to maintain a history of 12 records per user. Once a month when I run my scheduled tasks I would like to delete the oldest records over the 12. Deleting the oldest record isn't a problem. but if I need to delete 4 records how would I do this with out looping over the query 4 times? using CF5/NT4.0/SQL7.0 Thanks Rodney ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
CFCONTENT problem with Netscape 6.0
Hello all I hope someone might have run into this and know a way around it. This code works in I.E. 4.x+, and Netscape 4.5 But in Netscape 6.0 , the form and request scope vars are being dropped. the form.vars and request.vars are fine before the but are lost after and this is only happening in Netscape 6.0. Does anyone know how to work around this with out having to drop all the vars into session.vars? thanks for any help Rodney ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Dynamic form fields
Thanks for all the suggestions. unfortunately I am not at my development server so can't test. but I am going to change the code to look like this. If you see anything that will not work please let me know. On the form: get ids On the action page: get ids form["name_#getids.id#"] again thanks for the help. -Original Message- From: Steven Dworman [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 1:37 PM To: CF-Talk Subject: RE: Dynamic form fields you learn something everyday. thanks for the insight -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:17 PM To: CF-Talk Subject: RE: Dynamic form fields First off, I don't know if CF willbe happy with form fields named with that syntax. I know PHP uses that syntax, but I can't promise it will work in CF... but... try it. :) Secondly, please, please, please do _not_ use Evaluate to get dynamic form fields. Remember that form fields are stored in a structure. You can rewrite #evaluate('form.name[#getids.id#]')# as: Form["name[#getids.ids#]"] Not only will the code be quicker, it will also be much easier to read. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Steven Dworman [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 03, 2001 3:11 PM > To: CF-Talk > Subject: RE: Dynamic form fields > > > try > > #evaluate('form.name[#getids.id#]')# > > -Original Message- > From: Bruce, Rodney (Contractor) [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 03, 2001 2:15 PM > To: CF-Talk > Subject: Dynamic form fields > > > hello all > > Hope you can help with a little problem. > > I have on a field that is named using an id. > > On the form I have: > > get ids > > > > > > > > On the action page I have: > > get ids > > > > > #form.name[getids.id]# > > > I get "error resolving parameter form.name. > I can see all my form fields listed in the debugging info at > bottom of page. > i.e. > name[1] = 1 > name[2] = 2 > > What am I missing? > > Thanks all > Rodney > > > > > ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Dynamic form fields
hello all Hope you can help with a little problem. I have on a field that is named using an id. On the form I have: get ids On the action page I have: get ids #form.name[getids.id]# I get "error resolving parameter form.name. I can see all my form fields listed in the debugging info at bottom of page. i.e. name[1] = 1 name[2] = 2 What am I missing? Thanks all Rodney ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL Syntax
Bruce If you wouldn't mind, I would like a copy of the document. I am getting ready to migrate a couple of Access Dbs to SQL, and it sounds like it might come in handy. Thanks, Rodney Bruce -Original Message- From: Bruce Sorge [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 12:01 PM To: CF-Talk Subject: Re: SQL Syntax I swear I attached the document. Stupid web based email application. I will send it to you off-line from my hotmail account Scott. -- Original Message -- From: "Bruce Sorge" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Thu, 29 Nov 2001 13:57:11 -0500 >This word document I have is invaluable. Check it out. > > >-- Original Message -- >From: "Scott Brady" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >Date: Thu, 29 Nov 2001 11:51:31 -0700 > >>> Does Access have different SQL syntax than SQL Server? >> >>Yes, there are some minor differences. Which is really annoying since >>they're both Microsoft products. I'd give you some examples, but I'd hate >>to get them wrong (I always have to use trial and error). >> >>Scott >> >>-- >>Scott Brady >>http://www.scottbrady.net/ >> >> > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists