- Local time
- Today, 03:49
- Joined
- Feb 28, 2001
- Messages
- 30,437
There is an old adage - "the right tool for the right job" - and your problem is that you are trying to use a power drill to drive a nail when you needed a pneumatic nail gun.
You want to multiply a column by a given constant. OK, the general syntax is
UPDATE tablex SET columny = columny * givenconstant ;
But will you ever need to undo this? Will there ever be a time when you want to return to the original values and multiply by a different constant? You said that you wanted to multiply by a constant in a table. Would this constant change later - i.e. be not constant? Billy, you ask for simple things because you are demonstrating a type of tunnel vision. The reason you are getting a dart-board full of seemingly different answers is that your question doesn't really convey what you REALLY wanted.
We tend to think in ways to generalize problems. You are looking at a specific problem for which many general solutions are possible but you don't recognize them as such. And that's OK, because in problem-solving, the first and most important step is to convey the nature of the problem so that you can have a meeting of minds between the problem presenter and the problem solver. Somehow I get the impression that your problem has not fully reached this point quite yet.
You want to multiply a column by a given constant. OK, the general syntax is
UPDATE tablex SET columny = columny * givenconstant ;
But will you ever need to undo this? Will there ever be a time when you want to return to the original values and multiply by a different constant? You said that you wanted to multiply by a constant in a table. Would this constant change later - i.e. be not constant? Billy, you ask for simple things because you are demonstrating a type of tunnel vision. The reason you are getting a dart-board full of seemingly different answers is that your question doesn't really convey what you REALLY wanted.
We tend to think in ways to generalize problems. You are looking at a specific problem for which many general solutions are possible but you don't recognize them as such. And that's OK, because in problem-solving, the first and most important step is to convey the nature of the problem so that you can have a meeting of minds between the problem presenter and the problem solver. Somehow I get the impression that your problem has not fully reached this point quite yet.