J
James Page
Hi all
Can anyone give me a starting point on how to acheive this:
I have two sql tables
Table 1:
Id
VehicleName
VehicleSpec
Registration
Year
Table 2:
Id
VehicleId
Photo
PhotoMIME
PhotoFilename
Table 1 has a relationship with table 2 (table1.Id - Table2.VehicleId)
Table 2 has many photos per vehicle (about 5-10)
I need to select all the vehicles from table1 but only return the first
photo for each vehicle from table2 and populate a GridView with the result.
Can anyone give me an example on how to acheive the above query?
I'll be using a stored procedure using VB.net & VS2008
Many thanks
Can anyone give me a starting point on how to acheive this:
I have two sql tables
Table 1:
Id
VehicleName
VehicleSpec
Registration
Year
Table 2:
Id
VehicleId
Photo
PhotoMIME
PhotoFilename
Table 1 has a relationship with table 2 (table1.Id - Table2.VehicleId)
Table 2 has many photos per vehicle (about 5-10)
I need to select all the vehicles from table1 but only return the first
photo for each vehicle from table2 and populate a GridView with the result.
Can anyone give me an example on how to acheive the above query?
I'll be using a stored procedure using VB.net & VS2008
Many thanks