This topic is locked

Concatenate and update

12/18/2008 6:12:40 AM
ASPRunnerPro General questions
C
carlobianchi author

Hello
I 've two table :
one

server

message
two

server

field1

filed2
i need to update one.message with "two.fied1+two.field2" as after edit of two table
Can Anyone help me ?
i try to use :
string mesg
mesg = "Rif:" & dict("field1") "Rif:" & dict("field2")
strSQLMSG = "UPDATE one set message = & mesg where server = '" & dict("server") & "'"
dbConnection.Execute strSQLMSG
but it' wrong

E
enetsat 1/6/2009

Hello dude you can use
SELECT field1 + 'Field2 ' + Field3 + ' ' + Field4 as [anotherfield]

FROM TABLE1
anotherfield is the name of field that is concatenate
i hope help you

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=36511&image=1&table=forumreplies' class='bbc_emoticon' alt=':unsure:' />

J
Jane 1/6/2009

Hi,
see my changes below:

mesg = "Rif:" & dict("field1") & "Rif:" & dict("field2")

strSQLMSG = "UPDATE one set message ='" & mesg & "' where server = '" & dict("server") & "'"

dbConnection.Execute strSQLMSG