Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 INSERT SQL

Author  Topic 

casstd
Starting Member

3 Posts

Posted - 2005-01-27 : 02:42:33
Hi,

I have table with ProjectID, Score, remarks for each project in temp table. The score contains sum of 5 contributions. Using sql statement i get 5 contribution out of score using contribution %.

Now i have to Insert or update another table with this 5 contributions value, projectID and remarks. Table name is module appraise.

1. Here i calculate the contribution
SELECT ContributionTypeSubID, score * .25 as Contribution1, score*.25 as Contribution2, score *.125 as Contribution3, score*.125 as contribution4, score*.25 as contribution5 from x_tblRCAppraisalPL

2. How do i get this 5 information and proposalid, remarks from x_tblRCAppraisalPL and insert to tblModuleAppraise?

Thank you.

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2005-01-27 : 02:50:42
insert into tblModuleAppraise <column list>
SELECT ContributionTypeSubID, score * .25 as Contribution1, score*.25 as Contribution2, score *.125 as Contribution3, score*.125 as contribution4, score*.25 as contribution5 from x_tblRCAppraisalPL

HTH

=================================================================

Our elections are free, it's in the results where eventually we pay. -Bill Stern, sports announcer (1907-1971)
Go to Top of Page
   

- Advertisement -