Multiplication

need to multiply two columns and return the value to a third one

Page 1 of 1

1 Replies - 1225 Views - Last Post: 09 May 2008 - 01:29 PM Rate Topic: *---- 1 Votes

#1 blueletter  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 28-November 05

Multiplication

Post icon  Posted 09 May 2008 - 12:50 PM

At work they have me working on a database. I have it all done except for a the last stored procedure. I need to be able to multiply to columns in the same table then returning that value to a third column. I am having trouble thinking of how to pull two values then returning the product to another field. I know there is no direct way to multiply values so there has to be a workaround that I have not thought of. I know its got to be simple but I cant seem to grasp the idea of simple procedures over the difficult ones. If you could give me a source or a outline of what the code will look like that would be much appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: Multiplication

#2 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5801
  • View blog
  • Posts: 12,639
  • Joined: 16-October 07

Re: Multiplication

Posted 09 May 2008 - 01:29 PM

I usually would lead you on and try to let you figure it out, but this one's too short not to be a gimme.

select col1, col2, col1*col2 as col3
   from table



Is this what you're looking for or am I missing something?

This post has been edited by baavgai: 09 May 2008 - 01:29 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1