Prepare for your Next Interview
This is a discussion on how to get like this within the SQL Server forums, part of the Databases category; By useing one query i am getting data like this (here members are aggregate value) members city year 1000 bhel 2008 3000 guntur 2008 5000 hyderabad 2008 50 janana 2008 ...
|
|||
|
how to get like this
By useing one query i am getting data like this (here members are aggregate value) members city year 1000 bhel 2008 3000 guntur 2008 5000 hyderabad 2008 50 janana 2008 786876 karimnagar 2008 2000 nalgonda 2008 1000 tenali 2008 1000 vijayawada 2008 6000 hyderabad 2009 6000 guntur 2010 but i want to show like this (based on cityname,year) bhel guntur hyderabd ........... Year 1000 3000 5000 2008 6000 2009 6000 2010 can anyone help me
Last edited by boreddy : 04-03-2008 at 06:37 AM. |
| The Following User Says Thank You to boreddy For This Useful Post: | ||
| Sponsored Links |
|
|||
|
Re: how to get like this
Actually i send as table formate
but its came as like that any way i am getting some aggrigate values cites and years i want like this, city name column |
|
|||
|
Re: how to get like this
select cityname, years from <Table_name> where cityname like '%m%
If u want more than one column then use 'OR' clause , 'AND' clause. select cityname, years from <Table_name> where cityname like '%m% or years like '%85% select cityname, years from <Table_name> where cityname like '%m% and years like '%85% |