In SQL Server the correct syntax for inserts is
INSERT INTO Tablename (field1, field2, fieldN...)
VALUES(value1, value2, valueN...)
If you are doing an update, try
UPDATE Tablename
SET field1 = value1,
field2 = value2,
fieldN = valueN
{WHERE clause optional}
HTH,
Jeff
----- Original Message -----
From: "Bushy" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 13, 2003 11:08 AM
Subject: re: <cfquery> not working after migrating from MySQL to MS SQL
What's wrong with this. It's giving me a syntax error. SYntax error near the
keyword 'SET'.
<cfquery name="update_alias" DATASOURCE="database">
INSERT database
SET
env_var=<cfqueryparam value="#ListGetAt(Line,1,'|')#"
cfsqltype="CF_SQL_LONGVARCHAR">,
destination=<cfqueryparam value="#ListGetAt(Line,2,'|')#"
cfsqltype="CF_SQL_LONGVARCHAR">
</cfquery>
This worked fine under mySQL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4