Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 24th, 2003, 07:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default update syntax error

Hi there

I'm sure that there is a very simple answer to this syntax error but can anyone tell me what I have to do to rectify it?

UPDATE testing
SET dummy1 = camilla AND
 dummy2 = camilla2
AND dummy3 = huntw
WHERE dummyID = 1

Incorrect syntax near the word AND

Many thanks

Adam
 
Old July 24th, 2003, 07:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

UPDATE testing
SET dummy1 = 'camilla' AND
 dummy2 = 'camilla2'
AND dummy3 = 'huntw'
WHERE dummyID = 1

If dummyID is text type than u have to use WHERE dummyID ='1'

...but the Soon is eclipsed by the Moon
 
Old July 24th, 2003, 07:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

oops, sorry I supposed SELECT instaed of UPDATE. Here is the correct statement:

UPDATE testing
SET dummy1 = 'camilla',dummy2 = 'camilla2', dummy3 = 'huntw'
WHERE dummyID = 1

...but the Soon is eclipsed by the Moon





Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax error on UPDATE ktmai2001 Access 6 November 24th, 2008 12:45 PM
Syntax Error in the update statement annie_t Access ASP 1 February 1st, 2005 12:48 PM
Syntax Error in Update Louisa VB.NET 2002/2003 Basics 2 March 23rd, 2004 05:27 AM
UPDATE syntax Mitch SQL Server 2000 2 February 6th, 2004 05:08 PM
UPDATE statement returns syntax error AviatorTim Classic ASP Databases 2 January 8th, 2004 05:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.