Re: nested SQL update statement to replace CF script

2011-01-28 Thread Jason Durham
If _all_ children _aways_ get published (like your pseudocode indicates), why not just flag the parent category? If you want to do it all in SQL, try... http://msdn.microsoft.com/en-us/library/ms186243.aspx Jason Durham On Fri, Jan 28, 2011 at 1:16 AM, wabba must...@wabba.net wrote: Hi

nested SQL update statement to replace CF script

2011-01-27 Thread wabba
Hi all, read a lot, post rarely. Anyway, try to keep this simple as possible - I have a database of items stored within nested categories using a pivot table to establish parent/childs for the categories (the can virtually nest indefinitely, one child cat can be under multiple parents, etc).

Syntax Error In Update Statement

2008-05-23 Thread Patrick Hedgepath
Can anybody see the syntax error that CF8 keeps giving me for this query? The query was made by DW CS3 and worked until I added a new field by hand (Location). I can't see any reason it would not work. cfquery datasource=#DSN# name=UpdateCompany UPDATE HomeCareCompany SET Active=cfif

Re: Syntax Error In Update Statement

2008-05-23 Thread Charlie Griefer
On Fri, May 23, 2008 at 1:14 PM, Patrick Hedgepath [EMAIL PROTECTED] wrote: Can anybody see the syntax error that CF8 keeps giving me for this query? The query was made by DW CS3 and worked until I added a new field by hand (Location). I can't see any reason it would not work. ,

RE: Syntax Error In Update Statement

2008-05-23 Thread webmaster
I actually want that field to be a 0 if no data was entered on the form. -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2008 4:22 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement On Fri, May 23, 2008 at 1:14 PM, Patrick Hedgepath

Re: Syntax Error In Update Statement

2008-05-23 Thread Greg Morphis
What error does CF give? On Fri, May 23, 2008 at 3:14 PM, Patrick Hedgepath [EMAIL PROTECTED] wrote: Can anybody see the syntax error that CF8 keeps giving me for this query? The query was made by DW CS3 and worked until I added a new field by hand (Location). I can't see any reason it would

RE: Syntax Error In Update Statement

2008-05-23 Thread webmaster
One that is not very helpful :( Error Executing Database Query. Syntax error in UPDATE statement. The error occurred in C:\users\respiratorydiagnosticsllc.com\www\admin\EditPhysician.cfm: line 71 69 : '' 70 : /cfif 71 : WHERE ID=cfqueryparam value=#FORM.ID# cfsqltype=cf_sql_numeric 72

Re: Syntax Error In Update Statement

2008-05-23 Thread Charlie Griefer
:22 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement On Fri, May 23, 2008 at 1:14 PM, Patrick Hedgepath [EMAIL PROTECTED] wrote: Can anybody see the syntax error that CF8 keeps giving me for this query? The query was made by DW CS3 and worked until I added a new field by hand

Re: Syntax Error In Update Statement

2008-05-23 Thread Greg Morphis
[mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2008 4:22 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement On Fri, May 23, 2008 at 1:14 PM, Patrick Hedgepath [EMAIL PROTECTED] wrote: Can anybody see the syntax error that CF8 keeps giving me for this query? The query was made

RE: Syntax Error In Update Statement

2008-05-23 Thread webmaster
PROTECTED] Sent: Friday, May 23, 2008 4:30 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement On Fri, May 23, 2008 at 1:25 PM, [EMAIL PROTECTED] wrote: I actually want that field to be a 0 if no data was entered on the form. then the 0 value should be surrounded by single quotes

Re: Syntax Error In Update Statement

2008-05-23 Thread Greg Morphis
helpful :( Error Executing Database Query. Syntax error in UPDATE statement. The error occurred in C:\users\respiratorydiagnosticsllc.com\www\admin\EditPhysician.cfm: line 71 69 : '' 70 : /cfif 71 : WHERE ID=cfqueryparam value=#FORM.ID# cfsqltype=cf_sql_numeric 72 : /cfquery 73

RE: Syntax Error In Update Statement

2008-05-23 Thread webmaster
: Friday, May 23, 2008 4:30 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement Also.. what is location? Do yow know what a CLOB is? That's a HUGE character field.. can that not be a varchar? On Fri, May 23, 2008 at 3:25 PM, [EMAIL PROTECTED] wrote: I actually want that field to be a 0

Re: Syntax Error In Update Statement

2008-05-23 Thread morgan l
The query you posted (UPDATE HomeCareCompany) is not the query reporting the error ( UPDATE Physician ) On Fri, May 23, 2008 at 3:28 PM, [EMAIL PROTECTED] wrote: One that is not very helpful :( Error Executing Database Query. Syntax error in UPDATE statement. The error occurred in C

RE: Syntax Error In Update Statement

2008-05-23 Thread webmaster
Ack sorry :( Having the same problem with another DW created query on another page. Here is the correct error. Error Executing Database Query. Syntax error in UPDATE statement. The error occurred in C:\users\respiratorydiagnosticsllc.com\www\admin\EditCompany.cfm: line 71 69 : '' 70 : /cfif 71

Re: Syntax Error In Update Statement

2008-05-23 Thread Charlie Griefer
On Fri, May 23, 2008 at 1:32 PM, [EMAIL PROTECTED] wrote: Even if it is a numeric field in the database? I have tried removing the entire statement from the update query and it still gives an error. the cfsqltype you specified is CLOB. -- A byte walks into a bar and orders a pint. Bartender

Re: Syntax Error In Update Statement

2008-05-23 Thread Greg Morphis
that is not very helpful :( Error Executing Database Query. Syntax error in UPDATE statement. The error occurred in C:\users\respiratorydiagnosticsllc.com\www\admin\EditPhysician.cfm: line 71 69 : '' 70 : /cfif 71 : WHERE ID=cfqueryparam value=#FORM.ID# http://form.id/# cfsqltype

RE: Syntax Error In Update Statement

2008-05-23 Thread webmaster
- From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2008 4:37 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement If it's numeric in the DB it should NOT be cf_sql_clob On Fri, May 23, 2008 at 3:34 PM, morgan l [EMAIL PROTECTED] wrote: The query you posted (UPDATE

Re: Syntax Error In Update Statement

2008-05-23 Thread Charlie Griefer
On Fri, May 23, 2008 at 1:58 PM, [EMAIL PROTECTED] wrote: When I change it to CF_SQL_NUMERIC the error persists. Even if I remove the entire statement , Location=cfif IsDefined(FORM.Location) AND #FORM.Location# NEQ cfqueryparam value=#FORM.Location# cfsqltype=CF_SQL_NUMERIC maxlength=15

RE: Syntax Error In Update Statement

2008-05-23 Thread webmaster
-Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2008 5:06 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement On Fri, May 23, 2008 at 1:58 PM, [EMAIL PROTECTED] wrote: When I change it to CF_SQL_NUMERIC the error persists. Even if I remove

Re: Syntax Error In Update Statement

2008-05-23 Thread Greg Morphis
: Re: Syntax Error In Update Statement On Fri, May 23, 2008 at 1:58 PM, [EMAIL PROTECTED] wrote: When I change it to CF_SQL_NUMERIC the error persists. Even if I remove the entire statement , Location=cfif IsDefined(FORM.Location) AND #FORM.Location# NEQ cfqueryparam value=#FORM.Location

Re: Syntax Error In Update Statement

2008-05-23 Thread Charlie Griefer
Subject: Re: Syntax Error In Update Statement On Fri, May 23, 2008 at 1:58 PM, [EMAIL PROTECTED] wrote: When I change it to CF_SQL_NUMERIC the error persists. Even if I remove the entire statement , Location=cfif IsDefined(FORM.Location) AND #FORM.Location# NEQ cfqueryparam value

RE: Syntax Error In Update Statement

2008-05-23 Thread webmaster
added the additional field like I mentioned earlier. Then even removing the field does not help now. -Original Message- From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2008 5:26 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement Holy F!?!?!?! .. surely you

RE: Syntax Error In Update Statement

2008-05-23 Thread webmaster
I would assume it is because it is a keyword used in SQL or Database syntax. Again Dream Weaver wrote the code. -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2008 5:30 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement why

Re: Syntax Error In Update Statement

2008-05-23 Thread Charlie Griefer
. -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2008 5:30 PM To: CF-Talk Subject: Re: Syntax Error In Update Statement why is the column State in double quotes? On Fri, May 23, 2008 at 2:18 PM, [EMAIL PROTECTED] wrote: It is a number field

RE: Syntax Error In Update Statement

2008-05-23 Thread Bobby Hartsfield
: Syntax Error In Update Statement Well first off this was code generated by Dream Weaver using the testing server environment so yell at Adobe. Can I write it from scratch myself sure but I was trying to save time. All it appears to have done is waste time. Why would this give you a heart attack

Re: how can I dynamically build field names string in a sql update statement?

2007-07-01 Thread rhymes with 'loud'
me to one logical conclusion about your code: The column_string value you're building isn't sound. Dump what you believe to be a properly build column_string, try pasting it directly into an update statement, and see what error you get then. Better yet, just examine it and see

how can I dynamically build field names string in a sql update statement?

2007-06-28 Thread david cowen
Hi, I'm trying to construct a dynamic sql server update statement on a table with a large number of fields, most of them type bit. First I evaluate all the yes/no fields and convert them to 1/0. Then I build a string of column (field) names and values, e.g, {name of field1}=0, {name

Re: how can I dynamically build field names string in a sql update statement?

2007-06-28 Thread Charlie Griefer
define bombs and do a cfoutput on #column_string# to see exactly what SQL you're generating. On 6/28/07, david cowen [EMAIL PROTECTED] wrote: Hi, I'm trying to construct a dynamic sql server update statement on a table with a large number of fields, most of them type bit. First I evaluate

RE: how can I dynamically build field names string in a sql update statement?

2007-06-28 Thread Bobby Hartsfield
. ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: david cowen [mailto:[EMAIL PROTECTED] Sent: Thursday, June 28, 2007 6:44 PM To: CF-Talk Subject: how can I dynamically build field names string in a sql update statement? Hi, I'm trying

RE: how can I dynamically build field names string in a sql update statement?

2007-06-28 Thread David S. Cowen
field2=1, set field3=0 portion. -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Thursday, June 28, 2007 6:20 PM To: CF-Talk Subject: RE: how can I dynamically build field names string in a sql update statement? Well, without trying the code out or looking real

Re: how can I dynamically build field names string in a sql update statement?

2007-06-28 Thread Janet MacKay
If I remove the quote marks, then the program fails on line 0 of this routine; i.e., this code does not execute. With the quote marks, the routine gets executed but fails and there is a sql statement in the resulting error message. The sql statement has quote marks around the set field1=0, set

RE: how can I dynamically build field names string in a sql update statement?

2007-06-28 Thread Bobby Hartsfield
Message- From: David S. Cowen [mailto:[EMAIL PROTECTED] Sent: Thursday, June 28, 2007 9:03 PM To: CF-Talk Subject: RE: how can I dynamically build field names string in a sql update statement? If I remove the quote marks, then the program fails on line 0 of this routine; i.e., this code does

UPDATE Statement

2001-09-01 Thread Gonzo Rock
UPDATE trd SET seq='(seq+1)' WHERE tr_d = '#TheTr_id#' AND seq = '#InsertSeq#' This is my attempt to increment the column seq for a group of records bound by the WHERE Clause... It fails because the db can't seem to handle the seq+1 and I can't seem to find out how to do this. any

Re: UPDATE Statement

2001-09-01 Thread Don Vawter
take the quotes of the (seq +1) Don Vawter www.cyberroomies.com [EMAIL PROTECTED] - Original Message - From: Gonzo Rock [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, September 01, 2001 11:38 AM Subject: UPDATE Statement UPDATE trd SET seq='(seq+1)' WHERE tr_d

Re: UPDATE Statement

2001-09-01 Thread Gonzo Rock
: UPDATE Statement UPDATE trd SET seq='(seq+1)' WHERE tr_d = '#TheTr_id#' AND seq = '#InsertSeq#' This is my attempt to increment the column seq for a group of records bound by the WHERE Clause... It fails because the db can't seem to handle the seq+1 and I can't seem to find out how

Re: UPDATE Statement

2001-09-01 Thread Don Vawter
late night last night? lol Don Vawter www.cyberroomies.com [EMAIL PROTECTED] - Original Message - From: Gonzo Rock [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, September 01, 2001 12:43 PM Subject: Re: UPDATE Statement jeeze! Sheepish grin... At 11:42 AM 9/1/01

RE: Update Statement

2001-07-10 Thread Kevan . Windle
it in Oracle -Original Message- From: David Clay [mailto:[EMAIL PROTECTED]] Sent: 09 July 2001 23:54 To: CF-Talk Subject: Update Statement Need help updating table1 PDFID value with table2 orderno value where primary key in table1 equals primary key in table2. table1 primarykey=PDFID field=country

Update Statement

2001-07-09 Thread David Clay
Need help updating table1 PDFID value with table2 orderno value where primary key in table1 equals primary key in table2. table1 primarykey=PDFID field=country Table2 primarykey=PDFID field=orderno Any help with the SQL statement or CF code would be appreciated. Thank you Dave Clay

Update Statement

2001-05-16 Thread Joshua Tipton
I am tired why is this giving me an error? update ovdsave set ovdsave.updatedate = getdate() where ovdsave.sonum = (SELECT ovdtemp.SONUM FROM ovdtemp) and this way also gives me an error: update ovdsave set ovdsave.updatedate = getdate() from (SELECT

RE: Update Statement

2001-05-16 Thread Andy Ewings
are not the intended recipient, you are not authorised to disclose, copy, distribute, or retain this message. Please notify us on +44 (0)207 387 8890. -Original Message- From: Joshua Tipton [mailto:[EMAIL PROTECTED]] Sent: 16 May 2001 15:22 To: CF-Talk Subject: Update Statement I am tired why

RE: Update Statement

2001-05-16 Thread Bob Silverberg
Joshua, try: update S set S.updatedate = getdate() FROM ovdsave S INNER JOIN ovdtemp T ON S.sonum = T.SONUM Then go home and get some sleep :) Bob -Original Message- From: Joshua Tipton [mailto:[EMAIL PROTECTED]] Sent: May 16, 2001 10:22 AM To: CF-Talk Subject: Update Statement I am

Re: anyone see what is causing a Syntax Error is this update statement??

2001-05-06 Thread Tim Painter
Is price a number datatype? If so try removing the single quotes from '#price#' Tim P. - Original Message - From: Jeff Fongemie [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, May 05, 2001 6:57 PM Subject: anyone see what is causing a Syntax Error is this update

Re: anyone see what is causing a Syntax Error is this update statement??

2001-05-06 Thread Stephen Hait
This might be because desc is a reserved word in MS SQL. Check the docs for the platform you're on and see if this might be the problem. Regards, Stephen HTH, Stephen Hello cf-talk, This simple update is generating a syntax error i can't seem to resolve. What am I missing??

anyone see what is causing a Syntax Error is this update statement??

2001-05-05 Thread Jeff Fongemie
Hello cf-talk, This simple update is generating a syntax error i can't seem to resolve. What am I missing?? cfquery DATASOURCE=#Application.dsn# UPDATE #form.table# SET name='#name#', desc='#desc#', price='#price#' WHERE id=#form.id# /cfquery Best regards, Jeff

RE: anyone see what is causing a Syntax Error is this update statement??

2001-05-05 Thread Jason
Fongemie [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 05, 2001 3:58 PM To: CF-Talk Subject: anyone see what is causing a Syntax Error is this update statement?? Hello cf-talk, This simple update is generating a syntax error i can't seem to resolve. What am I missing?? cfquery DATASOURCE

Re: anyone see what is causing a Syntax Error is this update statement??

2001-05-05 Thread Howie Hamlin
- From: Jeff Fongemie [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, May 05, 2001 6:57 PM Subject: anyone see what is causing a Syntax Error is this update statement?? Hello cf-talk, This simple update is generating a syntax error i can't seem to resolve. What am I missing