var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SQL troubles please help....
.Source = "select Development.[KinderNumber],Development.[Date],Development.[Client],Development.[MFG],Development.[Fixture],Development.[Dimensions (HxWxD)],Development.[MFG Price],Development.[Item Number], developmentpictures.[Image], developmentpictures.[Revision_ Letter]FROM developmentpictures, Development WHERE developmentpictures.[KinderNum]= Development.[KinderNumber]"
There is my SQL statement that looks to 2 tables and one table is info and the other houses REVISION LETTER and PICTURE.
What I need to do.....Is return the HIGHEST LETTER in the REVISION_Letter column for each ID# as of now I get all ID # 's with all revisions.
I need to set up a SQL statement that will return the highest revision letter for each ID#.
I tried to SELECT MAX(developmentpictures.[Revision_ Letter]) but it gave me a error?
The "Top" predicate might help...
Select TOP 1 MyField from MyTable order by MyField;
Hope this helps,
try this --
, D.[Dimensions (HxWxD)]
, D.[MFG Price]
, D.[Item Number]
, dp.[Revision_ Letter]
from Development D
join developmentpictures dp
on D.[KinderNumber] = dp.[KinderNum]
where dp.[Revision_ Letter] =
( select max([Revision_ Letter])
where [KinderNum] = dp.[KinderNum] )