|
-
Mar 4th, 2004, 10:53 AM
#1
Thread Starter
Lively Member
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
-
Mar 4th, 2004, 11:19 AM
#2
Frenzied Member
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
-
Mar 4th, 2004, 01:08 PM
#3
Thread Starter
Lively Member
Is there anyway that I can just get 1 row from it...
Thanx for ur reply ....
-
Mar 5th, 2004, 06:22 AM
#4
Fanatic Member
in your select statement just select the car name and group by it. Don't select engine type or tyre type etc...
-
Mar 5th, 2004, 10:36 AM
#5
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|