Results 1 to 6 of 6

Thread: how to get like this

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    9

    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.

  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: how to get like this

    Kindly post what you have tried so far to solve this .


  3. #3
    Junior Member
    Join Date
    Mar 2008
    Answers
    9

    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


  4. #4
    Junior Member
    Join Date
    Dec 2007
    Answers
    1

    Re: how to get like this

    select cityname, years from Table_name

    just go through this u get


  5. #5
    Junior Member
    Join Date
    Jul 2008
    Answers
    6

    Re: how to get like this

    select cityname, years from where cityname like '%m%

    If u want more than one column then use 'OR' clause , 'AND' clause.

    select cityname, years from where cityname like '%m% or years like '%85%

    select cityname, years from where cityname like '%m% and years like '%85%


  6. #6
    Junior Member
    Join Date
    Feb 2009
    Answers
    4

    Re: how to get like this

    select sum(members),city,year from tablename group by city,year


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact