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 August 3rd, 2004, 11:03 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default Shoakat

Hello Friends,]
I want to update multiple field names in the table.

I tried this
Update Table
Set FieldName = 'Africa'
Set FieldName ='12112'
where FieldName = 'eric'
It gives me an error. Can you please modify the code.
Thanks


 
Old August 3rd, 2004, 12:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Can you give the error message?

 
Old August 3rd, 2004, 01:20 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i am using SQL server. THe error it gives is as follows
Incorrect syntax near '='

 
Old August 3rd, 2004, 08:23 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

hi

Update Table Set FieldName='Africa' where FieldName='eric'




 
Old August 4th, 2004, 06:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Shoakat,

You don't have to use SET for each COLUMNNAME, Replace the second SET with ,(COMMA)

Your code.
Code:
Update Table
Set FieldName = 'Africa' Set FieldName ='12112'
where FieldName = 'eric'
Modified code
Code:
Update Table
Set FieldName = 'Africa', FieldName ='12112'
where FieldName = 'eric'
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
shoakat shoakat Classic ASP Databases 9 September 2nd, 2004 06:14 PM
shoakat shoakat Classic ASP Databases 2 August 6th, 2004 09:09 PM
shoakat shoakat Classic ASP Databases 0 August 3rd, 2004 11:07 AM
shoakat shoakat Classic ASP Databases 2 July 28th, 2004 03:59 PM
shoakat shoakat Classic ASP Databases 4 July 26th, 2004 04:36 PM





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