Results 1 to 5 of 5

Thread: Problem with the database

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Location
    michigan
    Posts
    70

    Problem with the database

    Hi I am trying to develop a car database which has three tables like Cars, Engines and Tyres. I wanted to make a search from an ASP.NET page for particular type of car. The car has fields like carid, carname the Engine has fields like engine number engine name and CarID , The Tyres have fields like Carid and TyreName.


    My question is I want to write a query that searches for the kind of car but my query gives all the results of the same car name. I dont want all the results but I just want one row to be given called the primary with just one Car Name and itz respective features. How can I do that ??? I am looking for an optimal solution...


    Thanks for ur help in advance

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    If you have multiple records in the database for the same kind of car, then you will always get multiple records.

    BTW, it isn't tyre, it's tire.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Location
    michigan
    Posts
    70
    Is there anyway that I can just get 1 row from it...
    Thanx for ur reply ....

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    in your select statement just select the car name and group by it. Don't select engine type or tyre type etc...
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Location
    michigan
    Posts
    70
    Hi nswan,

    Thankx for ur reply....But I would also like to see what extra features does the car have ......Do I have to right separate queries for each columns ......I think it will work if we do this way....But is there any other optimal solution to do that ......thanks for ur replies

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