Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
UPDATE Voting Set Davg=(("+ Davg +"*no_of_voting)+ " " )/(no_of_voting+1),Cavg=(("+Cavg+"*no_of_voting )+ " ")/(no_of_voting+1),Favg=(("+Favg+"*no_of_voting)+ "")/(no_of_voting+1) WHERE BrandName='"+Dropdownlist4.SelectedItem.Value+"'";
Posted
Comments
thatraja 4-Dec-10 3:27am    
what's the error message? mention that in your question.
sandipapatel 4-Dec-10 3:27am    
Confusion for parameters used here.
Whats no_of_voting?

u can try different expression for evaluation at run time. Follow the given link:
http://michielvoo.net/blog/expressions-vs-statements-part-2-asp-net-code-block-types/

1 solution

For one, you use a double quote instead of an apostrophe for quotes. Second, you try to multiply a string by a field. Can't tell you what else is wrong without some error messages. Also, it would be useful if you actually explained your problem rather than just stating that you have a problem and posting some code we know nothing about. You should also state which type of SQL you are using... not sure why you tagged this question with C#.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900