RoRo (Ro***********@gmail.com) writes:
Just let me warn you this is very complex and I'm sorry If I don't
explain enough detail but if anyone could help I would greatly
appreciate it.
This is the Table that is created in my database::
The Insert Statement for the data is very complex b/c I'm getting the
data from radio buttons in my webform...
Writing the INSERT statements for the few rows you posted is not
very complex. Possibly a little tedious.
Anyway, I am not sure how it could have helped.
Just know it works and the information is store like this for a
Metric(Project with the ID of 26).
MetricParameters:::
ParamID MetricID ParamValue Description
4 26 1 rstk
2 26 5 sre6dtk
6 26 1 seu
3 26 2 setj
...
MetricsCost::::
metricID
PrjID
.................................................. ......................
ActualHours(Cost in Hours)
26
15
1589
So with that I need a table that ends up like this:
Project Name Weighed Parameters Actual
Cost
Sys Para Elect ME I&T Cost in Hours
M1 1 1 1 1 500
As I cannot we how you get from the above to this table. I understand
that ParamValue above are weights, but the weights has to be applied
to something.
x = (A^T*A)^ -1 * A^T*b T==transpose -1==inverse matrix
Hm, transposing matrix is not really something you want to do in
SQL. Rows and columns are quite different things.
Maybe you should read the data into client level and work there? (Or
in a CLR stored procedure.)
But I think I have even less understanding of what is going on, so I
may be completely off-base.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx