[thelist] Updating two fields with SQL
Daniel J. Cody
djc at five2one.org
Mon Aug 21 12:44:11 CDT 2000
Minh Lee Goon wrote:
>
> Dear evolta,
> I don't know if this is syntatically legal, but it should be logically
> correct. I'd like to update two fields of a row in one SQL statement.
> I've been using the following (without much success):
> UPDATE TableName
> SET FirstField='New Value 1'
> AND SecondField='New Value 2'
> WHERE ID='#form.ID#'
Hey minh -
try this:
update tablename
set
firstfield='blah',
secondfield='blah2',
thirdfield='you get the picture'
where id='#form.id#'
that should be the syntax you're looking for.
.djc.
More information about the thelist
mailing list