Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT Syntax
Message
From
26/05/2011 10:38:54
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SPT Syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01511825
Message ID:
01511825
Views:
79
I am back with another SPT issue. I have the following SQL to get the latest date from a set of related tables but I need the record index number and table that actually produces the result.
testconnString = "Select MAX(iDate) As iDate From (Select MAX(idate) As iDate From webprddt7.qms8dprevn Where edindex = 870871 And editeratn = 2" +;
" Union All Select MAX(idate) As iDate From webprddt7.qms8dcntrl Where edindex = 870871 And editeratn = 2" +;
" Union All Select MAX(idate) As iDate From webprddt7.qms8dvers1 Where edindex = 870871 And editeratn = 2" +;
" Union All Select MAX(idate) As iDate From webprddt7.qms8dpca Where edindex = 870871 And editeratn = 2" +;
" Union All Select MAX(idate) As iDate From webprddt7.qms8dica Where edindex = 870871 And editeratn = 2) td"
Next
Reply
Map
View

Click here to load this message in the networking platform