Click here to Skip to main content
15,891,316 members

Comments by Member 13863605 (Top 15 by date)

Member 13863605 10-Aug-18 8:41am View    
Hi,
You are still hard coding the cities! It has to be dynamic. By dynamic I mean there are hundred cities for examples and the user can choose any of them. E.g. if the user chooses Atl, then we will display all the sum of all the values of Atl, if the user selects Atl and NY, the we will display all the sum of all the values of Atl and NY and if the user selects Atl,Chicago and NY, the we will display all the sum of all the values of Atl, Chicago and NY.
So you are hard coding the cities in the temp table. That won't work because we don't know which city the user is going to choose.
Member 13863605 10-Aug-18 3:51am View    
NOTE: My cities name will be dynamic. So the user can select any city from ASP.Net drop down list option so the sum also has to be dynamic instead of adding manually for each city since we don't know which city the user is going to choose.

So your one I have to hard code which I can't. There are like hundred cities. I can't hard code for 100 cities. Please provide a solution which would be dynamic rather than hard coding it.
Member 13863605 9-Aug-18 14:13pm View    
Well it's you who is trying to make it difficult! This is t-sql not english literature that you are trying to say customers are the same thing as guests. I said clearly that these two are different tables!!!
Member 13863605 8-Aug-18 11:26am View    
I want to do it in grid view not SQL
Member 13863605 26-Jul-18 15:23pm View    
yes. I have provided my answer below