Re: problem with insert

2006-08-06 Thread Doug
:23 PM Subject: Re: problem with insert Assuming then that the variable for the cat_id is myCatID then you are after this kind of thing: cfset mylist=Advertising,tools cfset myCatID = 1 cfloop list=#mylist# index=listItem cfquery datasource=classifieds INSERT INTO sub_categories

problem with insert

2006-08-05 Thread Doug
I know this is probably basic stuff, but I will ask anyway. I have two tables categories: [id] pri key (This table is populated with the categories already) category sub_categories [id] pri key cat_id FK to categories.id (This table is empty) sub_category I want to insert a comma

RE: problem with insert

2006-08-05 Thread Dave Francis
NO!!! You don't!!! Create another table. You'll thank me later. Ask Jochem. Ask Claude. -Original Message- From: Doug [mailto:[EMAIL PROTECTED] Sent: Saturday, August 05, 2006 9:26 AM To: CF-Talk Subject: problem with insert I know this is probably basic stuff, but I will ask anyway

Re: problem with insert

2006-08-05 Thread Doug
I cannot see why I would need another table. Can you explain a little further? - Original Message - From: Dave Francis [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Saturday, August 05, 2006 7:58 AM Subject: RE: problem with insert NO!!! You don't!!! Create another

Re: problem with insert

2006-08-05 Thread Jochem van Dieten
Doug wrote: I have two tables categories: (This table is populated with the categories already) [id] pri key category sub_categories (This table is empty) [id] pri key cat_id FK to categories.id sub_category I want to insert a comma delimeted list into the sub_categories

Re: problem with insert

2006-08-05 Thread James Holmes
: Doug [mailto:[EMAIL PROTECTED] Sent: Saturday, August 05, 2006 9:26 AM To: CF-Talk Subject: problem with insert I know this is probably basic stuff, but I will ask anyway. I have two tables categories: [id] pri key (This table is populated with the categories already) category

Re: problem with insert

2006-08-05 Thread Robertson-Ravo, Neil (RX)
To: CF-Talk Sent: Sat Aug 05 14:58:42 2006 Subject: RE: problem with insert NO!!! You don't!!! Create another table. You'll thank me later. Ask Jochem. Ask Claude. -Original Message- From: Doug [mailto:[EMAIL PROTECTED] Sent: Saturday, August 05, 2006 9:26 AM To: CF-Talk Subject: problem

Re: problem with insert

2006-08-05 Thread Doug
to convert it in the first place. - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Saturday, August 05, 2006 9:14 AM Subject: Re: problem with insert Doug wrote: I have two tables categories: (This table is populated

RE: problem with insert

2006-08-05 Thread Kevin Roche
Subject: Re: problem with insert ok I did this !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN cfset mylist=Advertising,tools cfloop list=#mylist# index=listItem cfquery datasource=classifieds INSERT INTO sub_categories (sub_category,cat_id ) VALUES (cfqueryparam value=#myList

Re: problem with insert

2006-08-05 Thread Doug
: problem with insert Doug, The order of the entries of fieldnames and values has to be the same. So if you write: INSERT INTO sub_categories (sub_category,cat_id ) The second value must be an integer. Kevin -Original Message- From: Doug [mailto:[EMAIL PROTECTED] Sent: 05

Re: problem with insert

2006-08-05 Thread James Holmes
[EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Saturday, August 05, 2006 2:49 PM Subject: RE: problem with insert Doug, The order of the entries of fieldnames and values has to be the same. So if you write: INSERT INTO sub_categories (sub_category,cat_id

Re: problem with insert

2006-08-05 Thread Doug
I want to insert each item individually into the table. - Original Message - From: James Holmes [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Saturday, August 05, 2006 6:34 PM Subject: Re: problem with insert No, from this: cfloop list=#mylist# index=listItem

Re: problem with insert

2006-08-05 Thread James Holmes
Message - From: James Holmes [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Saturday, August 05, 2006 8:41 PM Subject: Re: problem with insert For a given list of subcategories you want to insert, where is the cat_id coming from? -- CFAJAX docs and other useful articles

Re: Problem With Insert

2004-10-24 Thread Don
Joe's right, and you could really use one simple query to get it done like cfquery DATASOURCE=#mydbname# NAME=UpdateData UPDATE ImageData SET PageViews = PageViews + 1, ImageShowDate = GetDate() WHERE ImageId = #ListRandImage# /cfquery The only disadvantage is that ImageShowDate overrides

Re: Problem With Insert

2004-10-23 Thread Joe Rinehart
Phillip, It looks like you're inserting a new row into the table each time, in which case it'd only go to two. What I think you mean to do is update the row of the image returned by GetInfo3, in which case you'd want to use an UPDATE statement. Try this: cfquery datasource=applewood

Problem With Insert

2004-10-22 Thread Phillip Perry
I'm trying to update the pageviews + 1 every time a banner is shown on the browser. But for some reason my code stopped at 2. It wont go any higher. The first and second times the code updated correctly. It went from 1 pageview to 2 pageviews..now everything is 2 pageviews even though there are at

RE: Problem With Insert

2004-10-22 Thread Ewok
, ImageID, ImageShowDate ) VALUES ( #Val(NewPageViews)#, #ListRandImage#, #createodbcdate(now())# ) /cfquery -Original Message- From: Phillip Perry [mailto:[EMAIL PROTECTED] Sent: Friday, October 22, 2004 5:52 PM To: CF-Talk Subject: Problem With Insert I'm trying to update

still having a problem with insert

2004-02-25 Thread Steven Sharko
Error Executing Database Query. [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. The error occurred in D:\websites\serviceorders.cfm: line 127 125 : insert into clntnote (thisdate,subject,note,type,compid) 126 : values

RE: still having a problem with insert

2004-02-25 Thread Dave Watts
Subject: still having a problem with insert Error Executing Database Query. [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. The error occurred in D:\websites\serviceorders.cfm: line 127 125 : insert

RE: still having a problem with insert

2004-02-25 Thread Marlon Moyer
are right, I am being selfish, but the last time I checked, we don't have a whole lot of songs that feature the cowbell! -Original Message- From: Steven Sharko [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 8:38 AM To: CF-Talk Subject: still having a problem with insert

Re: still having a problem with insert

2004-02-25 Thread stas
Steven, you may need to surrround some of your insert values with single quotes as it seems judging from variable names that they are strings. - Original Message - From: Steven Sharko To: CF-Talk Sent: Wednesday, February 25, 2004 9:37 AM Subject: still having a problem with insert

Re: still having a problem with insert

2004-02-25 Thread cf
like ppl keep saying the word type is a reserved word and WONT work u will have 2 rename that field in your database, no ands, ifs or buts about it. read this, straight from the mothership http://www.macromedia.com/support/ultradev/ts/documents/insert_into.htm Error Executing Database Query.

RE: still having a problem with insert

2004-02-25 Thread Mark A. Kruger - CFG
- like the promise of mass rail transit. -Mark -Original Message- From: Steven Sharko [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 8:38 AM To: CF-Talk Subject: still having a problem with insert Error Executing Database Query. [MERANT][SequeLink JDBC Driver][ODBC Socket

RE: still having a problem with insert

2004-02-25 Thread Steven Sharko
:00apos;}apos;,apos;Service Ticket 3173 - apos;,apos;brSubmitted by apos;,apos;tapos;,) At 09:49 AM 2/25/2004, you wrote: Subject: still having a problem with insert Error Executing Database Query. [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver

RE: still having a problem with insert

2004-02-25 Thread Mark A. Kruger - CFG
AM To: CF-Talk Subject: still having a problem with insert Error Executing Database Query. [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. The error occurred in D:\websites\serviceorders.cfm: line 127 125 : insert

Re: still having a problem with insert

2004-02-25 Thread Jamie Jackson
Yup, that's a mess alright. Looks like your form might be screwy as well, or had some html in a field, or something. Check your form, fix your text field values in the sql (wrap them with single quotes). And once you've done that, don't use that SQL :P Instead, use the cfqueryparam version that I

RE: still having a problem with insert

2004-02-25 Thread Mark A. Kruger - CFG
a problem with insert I tried that and still got an error. Error Executing Database Query. [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. The error occurred in D:\websites\netpacq\serviceorders.cfm: line 127 125

RE: still having a problem with insert

2004-02-25 Thread Ian Skinner
A trick I used in the my youth to help me learn: Since you are using Access, use the query builder in Access to build the query, then change the view to SQL view and copy the SQL code from there and paste into your Cold Fusion cfquery... tag.A few simple modifications to incorporate the form

RE: still having a problem with insert

2004-02-25 Thread Philip Arnold
From: [EMAIL PROTECTED] like ppl keep saying the word type is a reserved word and WONT work u will have 2 rename that field in your database, no ands, ifs or buts about it. read this, straight from the mothership http://www.macromedia.com/support/ultradev/ts/documents/insert _into.htm

RE: problem with insert

2001-11-19 Thread Christopher Olive
: Re: problem with insert Even crazier.I just typed this out to check and just parsed it in query analyzer and get an error. WTF Line 2: Incorrect syntax near '123456789'. INSERT INTO customer VALUES '123456789' Doug - Original Message - From: Douglas L. Brown [EMAIL PROTECTED

Re: RESOLVED:: problem with insert

2001-11-18 Thread Douglas L. Brown
] Sent: Saturday, November 17, 2001 11:31 PM Subject: Re: RESOLVED:: problem with insert Doh! We learn from our mistakes don't we? heh heh! It can also be database specific, Oracle / SQL Server / MS SQL can all differ in syntax if not in logic. Quoting Douglas L. Brown [EMAIL PROTECTED

problem with insert

2001-11-17 Thread Douglas L. Brown
I have the following query and keep getting an error upon insert. The field type is varchar(10) and the one giving an error is custNum Error = Error Diagnostic Information ODBC Error Code = 37000 (Syntax error or access violation) [Microsoft][ODBC SQL Server Driver][SQL

Re: problem with insert

2001-11-17 Thread Peter Tilbrook
Looks like you are trying to insert numeric data as text into a number only field. You are using 'quotes' somewhere you shouldn't be. Quoting Douglas L. Brown [EMAIL PROTECTED]: I have the following query and keep getting an error upon insert. The field type is varchar(10) and the one

Re: problem with insert

2001-11-17 Thread Douglas L. Brown
, 2001 4:14 PM Subject: Re: problem with insert Looks like you are trying to insert numeric data as text into a number only field. You are using 'quotes' somewhere you shouldn't be. Quoting Douglas L. Brown [EMAIL PROTECTED]: I have the following query and keep getting an error upon insert

Re: problem with insert

2001-11-17 Thread Douglas L. Brown
PROTECTED] Sent: Saturday, November 17, 2001 4:36 PM Subject: Re: problem with insert The only numeric fields are ID, ZIP_CODE. That is why I cannot figure it out. I have an update that is the sam and works fine on the same table and the same columns. Here is the update. UPDATE

RESOLVED:: problem with insert

2001-11-17 Thread Douglas L. Brown
Didnt have () around my values to insert. Doug - Original Message - From: Douglas L. Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, November 17, 2001 4:36 PM Subject: Re: problem with insert The only numeric fields are ID, ZIP_CODE. That is why

Re: RESOLVED:: problem with insert

2001-11-17 Thread Peter Tilbrook
Doh! We learn from our mistakes don't we? heh heh! It can also be database specific, Oracle / SQL Server / MS SQL can all differ in syntax if not in logic. Quoting Douglas L. Brown [EMAIL PROTECTED]: Didnt have () around my values to insert. Doug

Re: Problem with Insert Using Select

2001-02-11 Thread Paul Hastings
that wont work - db would look for a field with the generated UUID as a name... you need to have a subselect: [snip] SELECT (select '#CreateUUID()#') as MyUUID, name, VersionID + 1 nope, you don't need a "subselect". in fact for some DBs (say sql server) you don't even need to have the

RE: Problem with Insert Using Select

2001-02-10 Thread andrew kopelman
to change, but this can be done by +1 it seems, thank you) From: Daniel Lancelot [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: RE: Problem with Insert Using Select Date: Fri, 09 Feb 2001 14:50:00 - that wont work - db would look for a field

RE: Problem with Insert Using Select

2001-02-10 Thread andrew kopelman
to change, but this can be done by +1 it seems, thank you) From: Daniel Lancelot [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: RE: Problem with Insert Using Select Date: Fri, 09 Feb 2001 14:50:00 - that wont work - db would look for a field

RE: Problem with Insert Using Select

2001-02-09 Thread Bob Silverberg
Message- From: andrew kopelman [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 11:00 PM To: CF-Talk Subject: Problem with Insert Using Select I want to insert new records into a table which has MyUUID as its primary key as well as a column, VersionId, which needs to be updated

RE: Problem with Insert Using Select

2001-02-09 Thread Daniel Lancelot
-Original Message- From: Bob Silverberg [mailto:[EMAIL PROTECTED]] Sent: 09 February 2001 05:49 To: CF-Talk Subject: RE: Problem with Insert Using Select You answered your own question in your last paragraph - you _can_ put constants and expressions in your select statement. Try something like

Problem with Insert Using Select

2001-02-08 Thread andrew kopelman
I want to insert new records into a table which has MyUUID as its primary key as well as a column, VersionId, which needs to be updated. Each new record should be identical to the old record, except for a new MyUUID and an incremented VersionID. For example, this old record: MyUUID: