Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with SemiComplex SQL String
Message
From
27/04/2007 14:29:25
 
 
To
27/04/2007 14:22:56
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01220500
Message ID:
01220506
Views:
20
>I need three fields from a remote data source.
>
>This is a data table of First Article Inspection records for our product part numbers.
>
>One part number can have multiple FAI's.
>
>RECSEQ = Sequiential Record Number
>FAILOC = FAI location
>FAISTATUS (Could be a 1 or 2)
>
>This SQL does not work because I don't have failoc or faistatus in the Group By section:
>
>Select Max(recseq) As recseq, failoc, faistatus From webprddt6.drawmfai Where part no = '860637-001' Group By partno
>
>This SQL does not work because it gives me the MAX recseq for the faistatus 1 and another for faistatus 2:
>
>Select Max(recseq) As recseq, failoc, faistatus From webprddt6.drawmfai Where part no = '860637-001' Group By partno, failoc, faistatus
>
>Please help.

Maybe you need in just:
Select Max(recseq) As recseq From webprddt6.drawmfai Where part no = '860637-001' Group By partno 
or you can get all data for this part_no
Select recseq, failoc, faistatus From webprddt6.drawmfai Where part no = '860637-001'
and then process the cursor on client side:
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform