Jump to content

creating tables with columns and values from values in other tables


orise

Recommended Posts

Hi all,

            Does anyone know how to calculation values in a column of a table and store the output in another column of a different table i.e. I have item and value columns where an item and its value say 'Dealing securities' and '$3,000' respectively I want to be able to add the value of these and other items together saying in table balancesheet and store the value under the values with an item column in table averages say item 'fixedasset' with its value got from addition of two values in another table balancesheet.

 

Link to comment
Share on other sites

INSERT INTO destinationTableName (columnName1, columnName2, ...)
SELECT dataForCol1, dataForCol2, ...
FROM sourceTableName
WHERE conditions

 

If you can build the SELECT statement to return the columns and rows you want to INSERT into the other table, it is pretty much just a matter of combining the two statements. I'm sure there are some limitations (see the manual)

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.