|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have one column which holds the Month (column_name is Mth) abbreviated as string (such as Jan, Feb etc).
I want to update another column so that a new column (Month) is updated with a number 1, 2, etc depending on Mth. I've been giving myself a headache with something like this so far... getting now where... any help would be great. UPDATE Rev2004Translation SET Rev2004Translation.Month = 1 WHERE Rev2004Translation.Mth = "Jan"; UPDATE Rev2004Translation SET Rev2004Translation.Month = 2 WHERE Rev2004Translation.Mth = "Feb" It's for an Access DB. |
|
#2
|
|||
|
|||
|
For starters I disagree with your table design (it isn't normalized) but that isn't your problem
UPDATE Rev2004Translation SET Rev2004Translation.Month = (IIF(Rev2004Translation.Mth = "Jan",1,IIF(Rev2004Translation.Mth = "Feb",2,.....))) S- |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Update 1 Column with Multiple SET & WHERE clauses? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|