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
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).
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
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.
,
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
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
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
: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
[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
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
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
: 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
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
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
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
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
-
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
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
-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
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
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
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
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
.
-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
: 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
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
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
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
.
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
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
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
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
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 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
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
: 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
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
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
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
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
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
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
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
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??
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
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
-
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
46 matches
Mail list logo