-
Aug 17th, 2013, 07:14 AM
#1
Thread Starter
Member
[RESOLVED] Is it possible to use 2 clause in one Update sql query using MySQL on VB6?
hello there..
based from the title, is it even posible?
here is some code :
Code:
SQL = "UPDATE table_a SET field_a='Completed'" _
& " WHERE field_b='Succesfull'"
KonekDb.Execute SQL, , adCmdText
so is that posible to add another clause after
Code:
field_b='Succesfull'
?
thnx for beforehand
-
Aug 17th, 2013, 07:44 AM
#2
Re: Is it possible to use 2 clause in one Update sql query using MySQL on VB6?
If you mean add another WHERE clause then no, it's not possible. You don't need to though because, just like in VB, a Boolean expression in SQL can contain as many conditions as you like, separated by AND and OR operators as appropriate, e.g.
Code:
WHERE (Column1 = @ValueA OR Column1 = @ValueB) AND Column2 = @ValueC
-
Aug 17th, 2013, 08:11 AM
#3
Thread Starter
Member
Re: Is it possible to use 2 clause in one Update sql query using MySQL on VB6?
Originally Posted by jmcilhinney
If you mean add another WHERE clause then no, it's not possible. You don't need to though because, just like in VB, a Boolean expression in SQL can contain as many conditions as you like, separated by AND and OR operators as appropriate, e.g.
Code:
WHERE (Column1 = @ValueA OR Column1 = @ValueB) AND Column2 = @ValueC
i see...
thnx for your explanation, really apreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|