Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > fileds add
 

fileds add

now i have a question

two tables ,contractbase and payment

thefield 'paymoneysum' in contractbase

the field 'paymoney' in payment

you konw you must pay money ina contract

how can i add paymoney to paymoneysum

this is fields add which the fields in different tables.

kylinqiu  Tuesday, July 31, 2007 1:21 AM

Get the sum of paymoney from payment and insert into paymoneysum in contractbase.

You can acheive this using insert into...(select from...) statements.

for eg:,

INSERT INTOcontractbaseSELECT SUM(paymoney) FROM payment

(This sample works when there is only 1 field (paymoneysum) in comtractbase)

Regards,

Deepa Hoysala

Deepa Hoysala  Wednesday, August 01, 2007 12:42 PM

Get the sum of paymoney from payment and insert into paymoneysum in contractbase.

You can acheive this using insert into...(select from...) statements.

for eg:,

INSERT INTOcontractbaseSELECT SUM(paymoney) FROM payment

(This sample works when there is only 1 field (paymoneysum) in comtractbase)

Regards,

Deepa Hoysala

Deepa Hoysala  Wednesday, August 01, 2007 12:42 PM

You can use google to search for other answers

Custom Search

More Threads

• Is there a bug w/ the DataGridView?
• Datagridview startup sorting state
• How to wrap long text in comboboxcolumn in datagridview
• Filter DGV by combobox programmatically
• DataGrid column with a different..
• Programmatically add Collection to Column of DataGridView
• Combobox value selection problem?
• Retreiving absolute X Y coord when mouse clicking into a datagridview
• Streaming data to a DataGridView like in Sql Server Management Studio
• PDF File Open Issue (File not visible)