5
Answers

how to muliply a column of a datatable with a value without looping..

hai..expert....

I have a datatable with more than 5000 rows. I want to muliply first column's value with 100. for this i hav used foreach loop. But it taks long time. Do we have any other option to multiply ???

thanks in advance........
Answers (5)
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 13y
If it cannot be done in the select statement as Vulpes suggests then there is something you are not telling us.
0
Suthish Nair

Suthish Nair

NA 31.7k 4.6m 13y
If SELECT statement will not help you, might LINQ to DataTable will.
0
Felipe Ramos

Felipe Ramos

NA 2.6k 91.4k 13y
Createa view of the table were you have a column that is your (First*100) [CompountColumn].
0
Soumya Surendran

Soumya Surendran

NA 245 0 13y
thats not possible in my case
0
Vulpes

Vulpes

NA 98.3k 1.5m 13y
You could multiply that particular column by 100 in your SELECT command when you retrieve the rows from the database.