General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Insonsistent Data Returned
I have a table with three fields:
DrawingNumber
DrawingRevision
TypeCode
I can have several records with the same drawingnumber but different revision levels example 899999 A, 899999 B, 899999 B1, 899999 B2 etc.
My goal is to find the maximum revision level. Keep in mind B is greater than B2 because B incororates the B1 and B2. I do this with a function in my SQL statement. My problem arises with the TypeCode. Say 899999 B2 is TypeCode 4 and 899999 B is TypeCode 3. When I run my SQL I get B okay but with a TypeCode of 4.
Here is my SQL statement:
Select dwgno, tCode, funct1(dwgno,Max(rev)) As rev From dwglisttbl Into Cursor myBales1 Group By 1
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only