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 cust_location_info
SET custNum = '#Trim(custNum)#',
id = '#Trim(id)#',
loc_desc = '#Trim(loc_desc)#',
f_name = '#Trim(f_name)#',
l_name = '#Trim(l_name)#',
address_1 = '#Trim(address_1)#',
city = '#Trim(city)#',
state = '#Trim(state)#',
zip_code = '#Trim(zip_code)#',
phone_1 = '#Trim(phone_1)#',
ext_1 = '#Trim(ext_1)#',
email = '#Trim(email)#',
isDefault = 'yes'
WHERE custNum = '#custNum#'
AND ID = '#ID#'
----- Original Message -----
From: "Peter Tilbrook" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, November 17, 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. 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 Server]Line 12: Incorrect
> >
> > syntax near '59595098'.
> >
> >
> >
> >
> >
> >
> > <CFQUERY DATASOURCE="#application.dsn#" NAME="insert_cust_loc_info">
> > DECLARE @maxid int
> > BEGIN
> > SELECT @maxid = MAX(ID)
> > FROM cust_location_info
> > IF @maxid IS NULL
> > SELECT @maxid = 1
> > ELSE
> > SELECT @maxid = @maxid + 1
> > END
> >
> > INSERT INTO cust_location_info ( custNum,
> > id,
> > loc_desc,
> > f_name,
> > l_name,
> > address_1,
> > city,
> > state,
> > zip_code,
> > phone_1,
> > ext_1,
> > email,
> > isDefault )
> > VALUES '#Trim(custNum)#',
> > @maxid,
> > '#Trim(loc_desc)#',
> > '#Trim(f_name)#',
> > '#Trim(l_name)#',
> > '#Trim(address_1)#',
> > '#Trim(city)#',
> > '#Trim(state)#',
> > '#Trim(zip_code)#',
> > '#Trim(phone_1)#',
> > '#Trim(ext_1)#',
> > '#Trim(email)#',
> > 'yes'
> > WHERE custNum = '#Trim(custNum)#'
> >
> > </CFQUERY>
> >
> >
> > <CF_SIGNATURE
> > NAME="Douglas L. Brown"
> > EMAIL="[EMAIL PROTECTED]"
> > PHONE="714.538.6611"
> > WEB="http://www.carnivorepc.com">
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists