School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,153 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,628 people online right now. Registration is fast and FREE... Join Now!




Multiplication

 

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

Rating  1
blueletter

9 May, 2008 - 11:50 AM
Post #1

New D.I.C Head
*

Joined: 28 Nov, 2005
Posts: 24


My Contributions
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.

User is offlineProfile CardPM
+Quote Post


baavgai

RE: Multiplication

9 May, 2008 - 12:29 PM
Post #2

Dreaming Coder
Group Icon

Joined: 16 Oct, 2007
Posts: 4,351



Thanked: 412 times
Dream Kudos: 550
Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua, Cheese

My Contributions
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.

CODE

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: 9 May, 2008 - 12:29 PM
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 04:48PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month