none
how o fetch specific data from table RRS feed

  • Question

  • hi all


    here i hv a table
     id         name           age....
    1           anu              12
    2           anu              13
    34         radha        23
    12            anu            10


    like this i have so many records of same name anu in my table which have unique id ,,,
    but my task is to fetch the 3rd anus record without knowing id or age
    how can i fetch tha perticular  row's data
    pls help its urgent//
    Tuesday, January 20, 2009 10:54 AM

Answers

  • Hi Mabun, this forum is for software developers who are using the Open Protocol Specification documentation to assist them in developing systems, services, and applications that are interoperable with Windows. The Open Protocol Specifications can be found at: http://msdn2.microsoft.com/en-us/library/cc203350.aspx.

    Since your post does not appear to be related to the Open Protocol Specification documentation set we would appreciate it if you could try the MSDN 'Transact-SQL' forum at http://social.msdn.microsoft.com/forums/en-US/transactsql/threads/ instead to find the information you are looking for. Thanks!

    Regards,
    Bill Wesse
    MCSE, MCTS / Senior Escalation Engineer, US-CSS DSC PROTOCOL TEAM


    Escalation Engineer
    Tuesday, January 20, 2009 1:26 PM
  • Thanks Prakash! I hadn't encountered the 'top' keyword before. I haven't done ans SQL for several years.

    Regards,
    Bill Wesse
    MCSE, MCTS / Senior Escalation Engineer, US-CSS DSC PROTOCOL TEAM

    Escalation Engineer
    Wednesday, January 21, 2009 11:25 AM

All replies

  • Hi Mabun, this forum is for software developers who are using the Open Protocol Specification documentation to assist them in developing systems, services, and applications that are interoperable with Windows. The Open Protocol Specifications can be found at: http://msdn2.microsoft.com/en-us/library/cc203350.aspx.

    Since your post does not appear to be related to the Open Protocol Specification documentation set we would appreciate it if you could try the MSDN 'Transact-SQL' forum at http://social.msdn.microsoft.com/forums/en-US/transactsql/threads/ instead to find the information you are looking for. Thanks!

    Regards,
    Bill Wesse
    MCSE, MCTS / Senior Escalation Engineer, US-CSS DSC PROTOCOL TEAM


    Escalation Engineer
    Tuesday, January 20, 2009 1:26 PM
  •  Try with below, i guess uyou require the same

    SELECT top 3 FROM table_name where name = 'anu' order by id


    Prakash Nandwana,Bangalore,India
    Tuesday, January 20, 2009 1:32 PM
  • Thanks Prakash! I hadn't encountered the 'top' keyword before. I haven't done ans SQL for several years.

    Regards,
    Bill Wesse
    MCSE, MCTS / Senior Escalation Engineer, US-CSS DSC PROTOCOL TEAM

    Escalation Engineer
    Wednesday, January 21, 2009 11:25 AM
  • If my solution has satisfied you than, i can request you to give me ratings
    Prakash Nandwana,Bangalore,India
    Sunday, January 25, 2009 2:48 AM