sql server - access unkown columns of a table and insert them into a new one -


i have table like:

item1 item2 item3  item4...  itemn     1     2     3      4...      n 

if need calculus variables lets powers , sqrt item1,item3, , insert in column 1 of new table, , same operations item2 , item4 , insert in column 2 of new table,... like:

new table       column1        column2       column3      .. columnsn-1        columnsn       item1*item3    item2*item4   item3*item5  .. itemn-1*item1  itemn *item2 

but column names variable (aka different tables) dont know how accomplish , values of specific columns, please me?

this way extract name , order of column:

select name, colorder syscolumns id = (select id sysobjects name = [tablename]) 

you can use manipulate data refering order in table instead of name


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -