|
-
Dec 28th, 2001, 05:18 AM
#1
Thread Starter
Evil Genius
SQL Synatax aarrrrrrgggghhhhhh !!!!
Code:
Col1 Col2
1 1
1 2
2 2
3 3
Here's what I'm basically trying to do, from what I can see, it doesn't look like I can do 2 set statements, and don't really want 2 sql strings in my coding, can anyone tell me a way to achieve the below please :
Code:
Update Table1
Set Col1=A
Where Col2 = 2 AND col1=1
Set Col1=B
Where Col2=2 and col1=2
-
Dec 28th, 2001, 08:11 AM
#2
Well ...
Sorry to disappoint you, but I don't think that's possible. You can use two Set statements with a comma between the fields, but they will have a common WHERE clause. So if you are going to update two fields based on two different criteria, you have to use two separate SQL statements.
.
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
|