SQL query doubt
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: SQL query doubt

  1. #1
    Join Date
    Jul 2005
    Posts
    3

    SQL query doubt

    I have to display a data like

    A 1
    2
    3


    but where as i m getting the data like

    A 1
    A 2
    A 3

    can any one help me ASAP

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    More info. What's your table structure? Some example data?
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Jul 2005
    Posts
    3

    sql query doubt

    there are 15 fields out of which 6 fields are repeating
    i want them to appear once only
    and all the records are unique

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Thanks for the example data and table structure.

    I am only guessing at what you want, but here goes anyway...

    Code:
    SQL> select * from xyz
      2  order by x;
    
             X          Y          Z
    ---------- ---------- ----------
             0          3          3
             0          2          6
             0          1          9
             1          1          1
             1          0          4
             1          2         10
             1          3          7
             2          2          2
             2          0          8
             2          1          5
    
    10 rows selected.
    
    SQL> break on x
    SQL> /
    
             X          Y          Z
    ---------- ---------- ----------
             0          3          3
                        2          6
                        1          9
             1          1          1
                        0          4
                        2         10
                        3          7
             2          2          2
                        0          8
                        1          5
    
    10 rows selected.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  5. #5
    Join Date
    Jul 2005
    Posts
    3
    i m little in database side can u tell me what is this break
    can u give me full query

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width