Hello all
I need some help; I'm running the sp_spaceused command on various tables and saving the output to a file. So, I have an input file that has 3 rows - each row has 7 columns. I would like to 1) sort the file on the 4th column, 2) take the 4th column in the first row and add 25% to that number - without doing the calculation on the other rows 3) put the new number in the 1st row of the input file
Here is an example of the input file
db1 tbl1 179877 11776 10868 776 132
db1 tbl2 150911 17692 17512 112 68
db1 tbl3 106651 3168 3004 24 140
Here is what I want the result to be:
db1 tb2 150911
22115 17512 112 68
db1 tbl1 179877 11776 10868 776 132
db1 tbl3 106651 3168 3004 24 140
Any suggestions on how to do this?
tia